• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble running a simple session bean  RSS feed

 
Jacob Thomas
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run a simple stateless session bean given in the book Head First EJB. For this purpose, I am using j2sdkee1.3 and j2sdk1.4.2_08. I successfully started the j2ee server and managed to deploy the bean. But when I try to run the client, I get the following cryptic error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge
at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clinit>(IOR.java:79)
at com.sun.corba.ee.internal.core.IOR.<init>(IOR.java:218)
at com.sun.corba.ee.internal.iiop.messages.LocateReplyMessage_1_2.read(LocateReplyMessage_1_2.java:137)
at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPInputStream.java:126)
at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPCoonection.java:670)
at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.java:777)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.java:786)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostInfo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(InitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBInitRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_inital_references(InitalNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2358)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:55)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:154)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:16)
at AdviceClient.main(AdviceClient.java:10)


I have set my classpath to the following:
CLASSPATH=.;%J2EE_HOME%\lib\j2ee.jar

I would really appreciate if somebody could help me with this error. Thank you.
 
Andreas Schaefer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually that is not a J2EE question but a common Java problem. It is not enough to have the interface classes made available to the client even when this is the only thing you need to compile. During deserialization the objects underlying class must be made available to the client, too.
So please check out your app. server's documentation on what client archives you need.

-Andy
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!