users@glassfish.java.net

Re: NoClassDefFoundError javax/resource/spi/ResourceAdapter

From: Bhaarat Sharma <bhaarat.s_at_gmail.com>
Date: Thu, 17 Dec 2009 07:23:40 -0500

I am using Sun GlassFish App Server v2.1 (9.1.1) (build b60e-fcs)

weird part is that I configured the app server to suit needs of my
application and everything was working fine. But when I restarted my
machine thats when I started getting this error.

I've made sure that the class is there in lib/javaee.jar. Could it be that
it is conflicting with other classes? I added jconn2.jar, msutil.jar,
ojdbc14.jar, msbase.jar and mssqlserver.jar to domains/domain1/lib folder.
Also, My app uses xml's so I had to add xalan.jar, xercesImpl.jar and
xml-apis.jar to jdk6/jre/lib/ext

any ideas?


wow..i fixed it. before sending the email out i figured i'd try one more
thing. we were moving to Sun App Server 8.2 to Glassfish V2. On 8.2 we had
the following system-classpath: ${com.sun.aas.installRoot}/
lib/install/applications/jmsra/imqjmsra.jar${path.separator}${com.sun.aas.imqLib}/jaxm-api.jar${path.separator}${com.sun.aas.imqLib}/fscontext.jar${path.separator}${com.sun.aas.antLib}/ant.jar

So I added it to glassfish as well. I just removed it now and am able to
restart the server.

questions arising from this: i dont think any of the jars i had added to
system-classpath have conflicting ResourceAdapters so why did removing them
work? or is it that if something is added to glassfish then it starts to
ignore jar's in side the lib and not mentioned in system-classpath?


On Wed, Dec 16, 2009 at 11:14 PM, Jagadish Prasath Ramu <
Jagadish.Ramu_at_sun.com> wrote:

> javax/resource/spi/ResourceAdapter is a Java EE API (connectors).
> In v2, it will be within GF_HOME/lib/javaee.jar
>
> * Which version, build of GlassFish are you using ? (asadmin version
> --verbose)
> * Can you make sure that the javax/resource/spi/ResourceAdapter class is
> available in lib/javaee.jar ?
>
> Thanks,
> -Jagadish
>
> On Wed, 2009-12-16 at 22:59 -0500, Bhaarat Sharma wrote:
> > I am getting the following stacktrace when trying to bring my server
> > up.
> >
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at com.sun.enterprise.server.PELaunch.main(PELaunch.java:415)
> > Caused by: java.lang.NoClassDefFoundError:
> > javax/resource/spi/ResourceAdapter
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> > at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> >
> >
> >
> >
> > I dont know which exact jar is missing? what is PELaunch.java? has
> > anyone come across this error before?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>