Jul 12th, 2012, 05:02 PM
Initialization / Class Loading / Generics problem
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...
[Loaded sun.reflect.generics.scope.Scope from C:\Program Files\Java
[Loaded sun.reflect.generics.scope.AbstractScope from C:\Program Files\Java
[Loaded sun.reflect.generics.scope.ClassScope from C:\Program Files\Java
[Loaded sun.reflect.generics.factory.GenericsFactory from C:\Program Files