aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Head First EJB - Chapter 1 Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Head First EJB - Chapter 1 Application" Watch "Head First EJB - Chapter 1 Application" New topic
Author

Head First EJB - Chapter 1 Application

Cliff DeRose
Greenhorn

Joined: Jan 08, 2004
Posts: 13
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
Shibu Raj
Greenhorn

Joined: Jan 24, 2005
Posts: 17
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

Joined: Jan 08, 2004
Posts: 13
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
Shouvanik Haldar
Greenhorn

Joined: Jun 16, 2010
Posts: 19
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


Shouvanik Haldar
SCJP 1.5
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1096
    
  10

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.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First EJB - Chapter 1 Application