Hello All,
I'm using Weblogic 6 in conjunction with WebGain/VisualCafe and am having issues trying to use a stateless EJB I have written - basically Weblogic refuses to find one of my helper classes.
The Stateless EJB has a method defined in it which returns a 'ClassA'. ClassA is your run-of-the-mill Java class, it holds a couple of strings and is serializable. I have a small Jar file which contains a couple of helper files, of which 'ClassA' is one (it's in a seperate jar because it is used by a few EJBS).
I can deploy my stateless EJB to Weblogic 6 successfully and after adding the Jar file containing my 'helper' classes to the Classpath entry in the StartWeblogic batch file, weblogic 6 starts-up - reporting no errors.
However when I come to actually use an instance of the EJB my application reports a java.lang.NoClassDefFoundError stating that it cant find 'ClassA' (if I don't put the helper jar in my classpath - weblogic reports errors at startup, as would be expected).
I know it is a problem with Weblogic 6 because the stack-dump includes some weblogic classes, though as a point of interest I dont get any message in my weblogic server Dos box.
I fail to see what else I need to tell Weblogic - the jar it requires is in my Classpath when the server is run, the bean deploys sucessfully and Weblogic starts ok!
Can anyone help - it's driving me more than a little insane and I'm now questioning if Weblogic 6 even works!
Many Thanks In Advance
Stack sump portion follows -----
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
jectInputStream.java:106)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
jectInputStream.java:114)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:47)
at weblogic.rmi.internal.BasicRemoteRef.unmarshalReturn(BasicRemoteRef.j
va:136)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
f.java:251)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
f.java:225)
at
Discussions
EJB programming & troubleshooting: Weblogic 6 noClassDefFound - even though it is in the classpath
-
Weblogic 6 noClassDefFound - even though it is in the classpath (4 messages)
- Posted by: P Pimlico
- Posted on: September 27 2001 10:41 EDT
Threaded Messages (4)
- Weblogic 6 noClassDefFound - even though it is in the classpath by Cuong Tran on September 27 2001 17:30 EDT
- Weblogic 6 noClassDefFound - even though it is in the classpath by P Pimlico on September 28 2001 10:15 EDT
- Weblogic 6 noClassDefFound - even though it is in the classpath by duby rex on September 29 2001 12:23 EDT
- Weblogic 6 noClassDefFound - even though it is in the classpath by Thomas Christensen on November 21 2001 05:51 EST
- Weblogic 6 noClassDefFound - even though it is in the classpath by P Pimlico on September 28 2001 10:15 EDT
-
Weblogic 6 noClassDefFound - even though it is in the classpath[ Go to top ]
- Posted by: Cuong Tran
- Posted on: September 27 2001 17:30 EDT
- in response to P Pimlico
Try to put your helper classes in the same jar as your
ejb jar. -
Weblogic 6 noClassDefFound - even though it is in the classpath[ Go to top ]
- Posted by: P Pimlico
- Posted on: September 28 2001 10:15 EDT
- in response to Cuong Tran
Hi - thanks for the reply.
These classes are used by multiple EJB on the same server - and my companies configuration people would go mad if the same class file was located in multiple jars.
Because of the fact that our Weblogic cluster holds multiple applications I can't even put the jar in an EAR - because the jar would have to be in multiple EARs - another potential configuration nightmare.
Any other ideas?
-
Weblogic 6 noClassDefFound - even though it is in the classpath[ Go to top ]
- Posted by: duby rex
- Posted on: September 29 2001 12:23 EDT
- in response to P Pimlico
Since ur bean is deploped properly, I would suggest that U check up ur client.Is Class A in the classpath of ur client.
Regards
-
Weblogic 6 noClassDefFound - even though it is in the classpath[ Go to top ]
- Posted by: Thomas Christensen
- Posted on: November 21 2001 17:51 EST
- in response to P Pimlico
To my knowledge there is know other way. You either collect all your ejb's in one jar along with the utility/helper classes or you put these in all the ejb-jars.
You can achieve this using the build tool Ant, with the tag <ejbjar> using its <support> nested tag.
- Thomas