Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what can cause this Exception?

9 views
Skip to first unread message

C. L.

unread,
Sep 19, 2001, 1:46:51 PM9/19/01
to
java.lang.NoClassDefFoundError: javax/ejb/EJBHome
since this class should be packed inside the jdk1.3 used by was 4.01, how
come I can get this excpetion?

Starting EJB
jar:
/home/alerts/WebSphere/AppServer/installedApps/UAEAdminEJB10.ear/UAEAdminEJB
10.jar
[01.09.19 13:04:40:710 EDT] 7af26475 EJBEngine X WSVR0040E: addEjbModule
failed for
com.ibm.ejs.models.base.config.applicationserver.impl.EJBModuleRefImpl
(desiredExecutionState: START) (uri: UAEAdminEJB10.jar)
java.lang.NoClassDefFoundError: javax/ejb/EJBHome
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.access$300(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled
Code))
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.jav
a:223)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.jav
a:203)
at
com.ibm.ws.classloader.EJBJarClassLoader.preloadInterfaces(EJBJarClassLoader
.java(Compiled Code))
at
com.ibm.ws.classloader.ClassLoaderManager.createIfNecessary(ClassLoaderManag
er.java:208)
at
com.ibm.ws.classloader.ClassLoaderManager.lookupClassLoader(ClassLoaderManag
er.java:226)
at com.ibm.ws.runtime.Server.getClassLoader(Server.java:710)
at com.ibm.ws.runtime.EJBEngine.addEjbModule(EJBEngine.java(Compiled Code))
at com.ibm.ws.runtime.Server.startModule(Server.java:487)
at com.ibm.ws.runtime.StandardServer.startModule(StandardServer.java:349)
at
com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:321)
at
com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:364
)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:728)
at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:522)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:63)

[01.09.19 13:04:41:162 EDT] 7af26475 EJBEngine I WSVR0037I: Starting EJB
jar:
/home/alerts/WebSphere/AppServer/installedApps/UAEClientEJB10.ear/UAEClientE
JB10.jar
[01.09.19 13:04:41:169 EDT] 7af26475 EJBEngine X WSVR0040E: addEjbModule
failed for
com.ibm.ejs.models.base.config.applicationserver.impl.EJBModuleRefImpl
(desiredExecutionState: START) (uri: UAEClientEJB10.jar)
java.lang.NoClassDefFoundError: javax/ejb/EJBHome
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.access$300(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled
Code))
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.jav
a:223)
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.jav
a:203)
at
com.ibm.ws.classloader.EJBJarClassLoader.preloadInterfaces(EJBJarClassLoader
.java(Compiled Code))
at
com.ibm.ws.classloader.ClassLoaderManager.createIfNecessary(ClassLoaderManag
er.java:208)
at
com.ibm.ws.classloader.ClassLoaderManager.lookupClassLoader(ClassLoaderManag
er.java:226)
at com.ibm.ws.runtime.Server.getClassLoader(Server.java:710)
at com.ibm.ws.runtime.EJBEngine.addEjbModule(EJBEngine.java(Compiled Code))
at com.ibm.ws.runtime.Server.startModule(Server.java:487)
at com.ibm.ws.runtime.StandardServer.startModule(StandardServer.java:349)
at
com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:321)
at
com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java:364
)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:728)
at com.ibm.ws.runtime.StandardServer.main(StandardServer.java:522)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:63)


Alex Matthews

unread,
Sep 19, 2001, 3:17:35 PM9/19/01
to
It's probably a missing class referred to in your home interface - an
exception or method parameter.

I guess the error is being reported against javax.ejb.EJBHome because
the object implementing your home interface is being cast to an EJBHome,
but the actual class (your home interface) cannot be loaded.

Alex,

C. L.

unread,
Sep 20, 2001, 8:59:35 AM9/20/01
to

"Alex Matthews" <al...@xelacom.com> wrote in message
news:3BA8EF4F...@xelacom.com...

> It's probably a missing class referred to in your home interface - an
> exception or method parameter.
>
> I guess the error is being reported against javax.ejb.EJBHome because
> the object implementing your home interface is being cast to an EJBHome,
> but the actual class (your home interface) cannot be loaded.
>
It is because that I have to include j2ee.jar and ejbcontainer.jar into my
startserverscript file. This way solved my problem I can access the ejb
beans I created since they are installed and loaded successfully.
But there is another problem came up, if I put ejbcontainer.jar into my jvm
classpath, it will let allow me to start the server. there is a conflict
between ejbcontainer and bootstrap.jar. why?

after I move ejbcontainer.jar to startServer.sh script file (in ext.dir ).
the server started up and loaded ejb bean successfully but I cannot access
the administraion page through the web administration tool

Any idea to solve this ?

Alex Matthews

unread,
Sep 20, 2001, 9:28:00 AM9/20/01
to
Yes, stop messing with the WebSphere JARs - this will give you nothing
but trouble - you should never need to do this.

Next, read the classpath documentation in section 6.4.1 of the
InfoCenter - this is required reading for all WebSphere developers, by
the way.

Having read and understood that document, can you see why the changes
you have made got you as far as you did, but then caused the next
problem? Are you trying to reference classes not in the EJB JAR file in
your home interface? Where are these classes - in an EAR? An external
JAR?

Alex.

0 new messages