ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lamey <cla...@localmatters.com>
Subject RE: NoClassDefFoundError for class Resources
Date Wed, 16 May 2007 21:13:38 GMT
My fault, I'm not "up" on EJBs and ear files.  In fact, I've just
managed to get rid of the single ear file I've ever worked with (I
inherited it).

Anyway, I was asking about your application.xml because whenever I had
to add a new jar to the ear deployment, I usually forgot to add it as a
java module to that file (it didn't use the manfiest classpath route).

Regardless, this is not specifically an iBATIS problem but rather a
JBoss/ear deployment issue.  There's nothing special about the iBATIS
jar that makes it different than other jars.  It really sounds to me
like a classloader level issue, where your EJB is at one level and can't
see the iBATIS jar at a different level.  Check both your ejb jar
manifest and your ear manifest to see if things are in the right places
and that the are no syntax errors.

Cheers,
Chris

On Wed, 2007-05-16 at 16:53 -0400, Steve Wooten wrote:
> I'm sorry I don't think I am following you here.
> My ejb deployment descriptor has my session and entity beans in it.
> I have no issue finding and using them.
> 
> I have other 3rd party jars deployed in my ear like commons-collections and
> I have no issue using those classes.
> 
> My application.xml for my ear deploys a war and an ejb jar as well as my 3rd
> party jars.  The manifest has the class path listed with those jars on it.
> 
> 
> -----Original Message-----
> From: Chris Lamey [mailto:clamey@localmatters.com] 
> Sent: Wednesday, May 16, 2007 4:21 PM
> To: user-java@ibatis.apache.org
> Subject: RE: NoClassDefFoundError for class Resources
> 
> What does your ear file's deployment descriptor look like?
> 
> On Wed, 2007-05-16 at 16:15 -0400, Steve Wooten wrote:
> > Thanks for the response but that is not the issue.
> > I am deploying an ear file.  All of the ibatis work is done in a session
> > bean so the web application knows nothing about it.
> > 
> > I have used ibatis 2.0.9 this way in other projects.
> > I have done many j2ee applications and I am pretty confident in using
> jboss.
> > 
> > Any other suggestions?
> > 
> > 
> > 
> > -----Original Message-----
> > From: Yee, Richard K CTR DMDC [mailto:Richard.Yee.ctr@osd.pentagon.mil] 
> > Sent: Wednesday, May 16, 2007 3:02 PM
> > To: user-java@ibatis.apache.org
> > Subject: RE: NoClassDefFoundError for class Resources
> > 
> >  This is caused by the fact that EJB classes are loaded by a different
> > class loader than the one used by the web application. Check your Jboss
> > documentation for using EJBs.
> > 
> > -Richard
> > 
> > 
> > -----Original Message-----
> > From: Steve Wooten [mailto:wootens@hughes.net] 
> > Sent: Wednesday, May 16, 2007 11:16 AM
> > To: user-java@ibatis.apache.org
> > Subject: NoClassDefFoundError for class Resources
> > 
> > Hello,
> > 
> > Has anyone else had this issue?
> > 
> > I am at a loss on how to solve it.  
> > 
> >  
> > 
> > I am attempting to use ibatis in a Session bean with JBoss.  
> > 
> > I have a helper class that loads the ibatis config with the following
> > code
> > 
> >             try {
> > 
> >                   ibatisConfigReader =
> > com.ibatis.common.resources.Resources
> > 
> >                               getResourceAsReader("SqlMapConfig.xml");
> > 
> >                   ibatisSqlMap = SqlMapClientBuilder
> > 
> >                               buildSqlMapClient(ibatisConfigReader);
> > 
> >             } catch (Exception ex) {
> > 
> >                   log.fatal("Exception reading ibatis config file", ex);
> > 
> >             }
> > 
> > I have all the ibatis jar file deploying with my ear so I know the file
> > "com/ibatis/common/resources/Resources exist."
> > 
> > The ibatis jar is deployed just like all my other 3rd party jars.  I
> > have no issues referencing them.
> > 
> > However when the above code is run I get
> > java.lang.NoClassDefFoundError: com/ibatis/common/resources/Resources
> > 
> >  
> > 
> > Please Help!
> > 
> >  
> > 
> > 
> > 
> 

Mime
View raw message