-
Jul 12th, 2012, 05:02 PM
#1
Initialization / Class Loading / Generics problem
Hi
I have a mix of annotation and Xml configuration in a Spring Integration & Batch project and am seeing problems (a looping cyclical bean creation path) in a deployed version of a project that works when run through Intellij.
Keeping it brief for now, I produced complete DEBUG logs and was (eventually) able to see where the two diverged deep in the Spring bean initialization code. I found that on the working (.class / jar mix) version the genericInfo field on SqlPagingQueryProviderFactoryBean.class was not null whereas on the non-working version (only jars) it was null at which point the Spring code paths separated.
It looks to me as though it's a class-loading problem which makes some sense given the different (jar / .class) packaging.
Running with -verbose I found that on the intellij version there were classes loaded from sun.reflect.generics.scope. being loaded, as below, whereas if everything's loaded from jars then no classes at all from sun.reflect.generics.scope. are loaded (and the genericInfo field remains null as above).
Anyone come across class-loading issues like this?
Thanks for any ideas...
Ewan
...
[Loaded
org.springframework.batch.item.database.support.Sq lPagingQueryProviderFactoryBean
from file:/C:/dev/FOOetc/BARetc/target/classes/]
[Loaded sun.reflect.generics.scope.Scope from C:\Program Files\Java
\jdk1.6.0_29\jre\lib\rt.jar]
[Loaded sun.reflect.generics.scope.AbstractScope from C:\Program Files\Java
\jdk1.6.0_29\jre\lib\rt.jar]
[Loaded sun.reflect.generics.scope.ClassScope from C:\Program Files\Java
\jdk1.6.0_29\jre\lib\rt.jar]
[Loaded sun.reflect.generics.factory.GenericsFactory from C:\Program Files
\Java\jdk1.6.0_29\jre\lib\rt.jar]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules