Have you found any solution to your problem?
I might be having a similar problem myself.
Please see the configuration of the project bellow:
The error I get is:
| + common-beans.xml
| + com.a.b.c (package)
| + BaseClass.class
| + ImplClass_1.class |
| + ImplClass_2.class | - BaseClass is visible and the beans are instantiated
| + ImplClass_2.class |
+ com.x.y.z (package)
+ ImplClass_4.class - BaseClass is NOT visible and I get the following error
The bean definition for BaseClass is written in common-beans.xml which is placed in libA.jar:
Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.x.y.z.ImplClass_4] for
bean with name 'implClass_4' defined in class path resource [implClass_4-beans.xml]: problem with class file or
dependent class; nested exception is java.lang.NoClassDefFoundError: com/a/b/c/BaseClass
The bean definition for ImplClass_4 is written in implClass_4-beans.xml which is placed in libB.jar:
<bean abstract="true" id="abstractBaseClass" class="com.a.b.c.BaseClass">
Any suggestions are welcome.
<bean id="implClass_4" class="com.x.y.z.ImplClass_4" parent="abstractBaseClass">
Thanks in advance!