• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Head First EJB - Chapter 1 Application

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,

I have been trying to find out why I keep getting this error. I've read a few posts on this board, and searched google to no avail so maybe someone can help.

I followed the instructions in Chapter 1 exactly. I have version 1.3.1 of the J2EE sdk/RI server (as the book requires). I was able to deploy everything successfully. When I tried to run the client application, it blew up and gave me the following error. Am I missing something in the classpath perhaps?

%CLASSPATH% = C:\j2sdkee1.3.1\lib\j2ee.jar
Both the AdviceClient.class and AdviceAppClient.jar are in the current directory

Looking at the first line of the error, where can I find the
com.sun.corba.se.internal.util.JDKBridge class?

C:\Projects\advice>java -cp .;%CLASSPATH%;AdviceAppClient.jar AdviceClient
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge
at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clin
it>(IOR.java:90)
at com.sun.corba.ee.internal.core.IOR.<init>(IOR.java:238)
at com.sun.corba.ee.internal.iiop.messages.LocateReplyMessage_1_2.read(L
ocateReplyMessage_1_2.java:137)
at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPIn
putStream.java:126)
at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPConnect
ion.java:671)
at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.jav
a:778)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(Init
ialNamingClient.java:786)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostIn
fo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(I
nitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBIn
itRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialRefe
rences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_r
eferences(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.ja
va:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120
)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:15)
at AdviceClient.main(AdviceClient.java:9)

Any help would be appreciated.
Cliff
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

Make sure that you include appserv-rt.jar in the class path for the client application. This jar contains the jndi.properties file which contains all bootstrapping properties for the Application servers naming services.

Thanks
Shibu
 
Cliff DeRose
Greenhorn
Posts: 13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response. That didn't fix my problem, however, I did find the root cause of the problem. The class (JDKBridge) that wasn't being found can be found in:

C:\j2sdk1.4.2_08\jre\lib\rt.jar

After adding that to my classpath, the program worked fine.

Cliff
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir,

I used the same approach. But, I am getting a new error. Please reply.

F:\EJBProject\advice>set CLASSPATH=c:\j2sdkee1.3.1\lib\j2ee.jar;c:\j2sdk1.4.0\jre\lib\rt.jar;C:\j2sdkee1.3.1\nativelib

F:\EJBProject\advice>java -cp %CLASSPATH%;AdviceAppClient.jar;. AdviceClient
ERROR! Shared library ioser12 could not be found.
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.sun.corba.se.internal.util.RepositoryId
at com.sun.corba.ee.internal.orbutil.RepIdDelegator.getStandardRMIUnchunkedId(RepIdDelegator.java:90)
at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.writeValueTag(CDROutputStream_1_0.java:1515)
at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:987)
at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:638)
at com.sun.corba.ee.internal.iiop.CDROutputStream.write_value(CDROutputStream.java:268)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:29)
at AdviceClient.main(AdviceClient.java:11)




Regards,
Shouvanik
 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shouvanik,
The post that you have replied to is more than 8 years old. I don't think the problem faced then would be the same and I don't think you are using the same version of the software. I would suggest to you create a new topic with more details.
 
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic