Discussion:
Startup class problem
(too old to reply)
Nitin Deore
2004-12-17 04:21:36 UTC
Permalink
I have webservice deployed through an .ear file. Service is built and deployed properly.
I have configured startup class which resides in the same .ear file.
This .ear file is there on the classpath in the startweblogic.cmd as well as on the bea\weblogic81\common\bin\commEnv.cmd.
But the server is not able to find the class file. It throws the following exception at the startup

<Dec 15, 2004 6:14:24 PM GMT+05:30> <Critical> <WebLogicServer> <BEA-000286> <Fa
iled to invoke startup class "MyStartup Class", java.lang.ClassNotFoundException
: com.anthem.enb.genericservice.service.Test
java.lang.ClassNotFoundException: com.anthem.enb.genericservice.service.Test
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.
java:156)
at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.j
ava:36)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:1
21)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassS
ervice.java:116)
at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentSt
artupService.java:22)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
We have tried giving the following path to access .jar file (which contains startup class) from .ear file
bea\user_projects\domains\Projects\applications\ws_EnBRewrite.ear\EnBRewrite.jar
Still it throws the same exception.
How does the weblogic server refer to the .jar file from .ear file?
Please suggest the solution for the same.

-Nitin
Veerendra S
2004-12-17 12:50:35 UTC
Permalink
Hi,

I dont think the server will pick up the jar inside the ear file. You will
have to specify the path to an extracted jar file.

~ Veerendra
Post by Nitin Deore
I have webservice deployed through an .ear file. Service is built and deployed properly.
I have configured startup class which resides in the same .ear file.
This .ear file is there on the classpath in the startweblogic.cmd as well
as on the bea\weblogic81\common\bin\commEnv.cmd.
But the server is not able to find the class file. It throws the following
exception at the startup
<Dec 15, 2004 6:14:24 PM GMT+05:30> <Critical> <WebLogicServer> <BEA-000286> <Fa
iled to invoke startup class "MyStartup Class",
java.lang.ClassNotFoundException
: com.anthem.enb.genericservice.service.Test
com.anthem.enb.genericservice.service.Test
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.
java:156)
at
weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.j
ava:36)
at
weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:1
21)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at
118)
at
weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassS
ervice.java:116)
at
weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentSt
artupService.java:22)
at
weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
We have tried giving the following path to access .jar file (which
contains startup class) from .ear file
bea\user_projects\domains\Projects\applications\ws_EnBRewrite.ear\EnBRewrite.jar
Still it throws the same exception.
How does the weblogic server refer to the .jar file from .ear file?
Please suggest the solution for the same.
-Nitin
jirey
2004-12-21 15:34:23 UTC
Permalink
Hi

The ear file can't be located at the classpath ....
You must deploy the ear file using the hot deploy or console options.

In the classpath you can put jar files or exploded directories. Remember that ear file is a file that contains other files (jar and war)


Jin

Loading...