Closed mubasherusman closed 6 years ago
Hi,
These are log lines, there are no exceptions.
Thanks, Daniil
But My code get into infinite loop.
Your original post tells that you cannot instantiate class because of exceptions with providing log, which contains no exceptions. Now you say there is infinite loop in your code. There is not much I can do about it.
When This line
factory.manufacturePojo(PersonalInformation.class);
executes, It get into infinite loop and constantly logging following log. I waiting about 10 minutes and it still constantly logging again and again same line.
14:09:59.371 [http-nio-9090-exec-2] WARN uk.co.jemos.podam.api.PodamFactoryImpl - Loop in class com.vend.sb.commons.model.PersonalInformation production detected. Resorting to uk.co.jemos.podam.api.NullExternalFactory external factory
Then I can only guess PersonalInfo contains reference(s) to a list or map of PersonalInfos. Anyhow the process is not infinite. You can reduce depth of filling by overriding DataProviderStrategy.getMaxDepth(), which is 3 by default.
Personal Info do not have any such list which mapped back to itself, however inner objects do have a reference back to PersonalInfo. e.g.
PersonalInfo {
id,
name
ProductDetails pd;
}
ProductDetails {
id
name
List <PersonalInfo> list
}
So you a have a loop PersonalInfo -> ProductDetails -> List
Hello, I have simple Pojo Graph.
There is lot of custom objects.
So I am getting the following Excepions
2018-02-20 14:09:28.000 INFO 67284 --- [nio-9090-exec-2] o.s.c.s.ClassPathXmlApplicationContext : Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1f2bf318: startup date [Tue Feb 20 14:09:27 PKT 2018]; root of context hierarchy 2018-02-20 14:09:28.055 INFO 67284 --- [nio-9090-exec-2] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [META-INF/spring/podam.xml] 14:09:59.371 [http-nio-9090-exec-2] WARN uk.co.jemos.podam.api.PodamFactoryImpl - Loop in class com.vend.sb.commons.model.PersonalInformation production detected. Resorting to uk.co.jemos.podam.api.NullExternalFactory external factory
Here is my usage
PodamFactory factory = new PodamFactoryImpl(); PersonalInformation pInformation = factory.manufacturePojo(PersonalInformation.class);
What is wrong or What is missing?
I am using Latest Release Version.