I understand Piotr.

Anyway, by default, if you have the dependency in the SU's pom.xml, the jar is 
present
in the SU classloader.
For exemple, I have heavily used this behavior with CXF-SE to proxy EJB and 
include 
the EJB's stub in the SU.

Please, could you attach the raised exception (NoClassDefFound or 
ClassNotFound) ?

Thanks
Regards
JB

On Friday 09 January 2009 - 12:09, Piotr Jagielski wrote:
> 
> Hi Jean,
> 
> I tried adding classpath entry but it doesn't help. I also read in
> http://servicemix.apache.org/classloaders.html that lib/*.jar are added to
> SU'a classpath by default - is this correct?
> 
> Adding ibatis.jar to SMX lib directory of course helps, but I'd prefer to
> find some better solution. On 3.2.1 it was not necessary to do it.
> 
> Regards
> 
> 
> Jean-Baptiste Onofré wrote:
> > 
> > Hi Piotr
> > 
> > Do you have ibatis dependency in the SU's pom.xml ?
> > 
> > Overwise, you can put :
> > - ibatis.jar in the SMX lib directory (loaded by classworlds)
> > - add a <classpath/> entry in the xbean.xml
> > 
> > Regards
> > JB
> > 
> > 
> > On Friday 09 January 2009 - 11:48, Piotr Jagielski wrote:
> >> 
> >> Hi all,
> >> 
> >> I'm trying to migrate existing services from 3.2.1 to 3.3.
> >> While deploying SA on 3.3 NoClassDefFoundError occurs while instantiating
> >> some IBatis references from xbean.xml - which doesn't happen on 3.2.1. I
> >> have ibatis.jar in SU lib directory.
> >> 
> >> I searched through code and found some changes in AbstractXbeanDeployer
> >> in
> >> 3.3 :
> >> 
> >> ClassLoader classLoader = component.getClass().getClassLoader();
> >> Thread.currentThread().setContextClassLoader(classLoader);
> >> ...
> >> applicationContext.refresh();
> >> su.setApplicationContext(applicationContext);
> >> // Use SU classloader
> >> Thread.currentThread().setContextClassLoader(su.getConfigurationClassLoader());
> >> initApplicationContext(applicationContext);
> >> 
> >> So it looks like refresh() method is called with component's class loader
> >> and classes from within SU jars are not loaded - and NoClassDefFound is
> >> raised.
> >> This problem is related to servicemix-jsr181, IBatis classes on
> >> servicemix-camel are loaded without errors.
> >> 
> >> Any suggestions?
> >> 
> >> Regards,
> >> Piotr
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/SU-deployed-on-servicemix-jsr181-2008.01-couldn%27t-find-classes-from-jars-included-in-SU-lib-directory-tp21379285p21379285.html
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >> 
> > 
> > -- 
> > Jean-Baptiste Onofré (Nanthrax)
> > BuildProcess/AutoDeploy Project Leader
> > http://buildprocess.sourceforge.net
> > [email protected]
> > PGP : 17D4F086
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/SU-deployed-on-servicemix-jsr181-2008.01-couldn%27t-find-classes-from-jars-included-in-SU-lib-directory-tp21379285p21379692.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
[email protected]
PGP : 17D4F086

Reply via email to