*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes PLS help -urgent  Prob with headfirst Advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "PLS help -urgent  Prob with headfirst Advice" Watch "PLS help -urgent  Prob with headfirst Advice" New topic
Author

PLS help -urgent Prob with headfirst Advice

priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
I tried compiling the sample program in Headfirst - (Advice). I was able to generate the class file after the successful compilation, but failed in running the AdviceClient.

The command given is
java -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClient

I am getting NoClassFound Exception. Below is the full error message:


C:\EJBDEMO\projects\advice>java -classpath %CLASSPATH%;AdviceAppClient.jar Advic
eClient
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/inte
rnal/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(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_initial_references(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at AdviceClient.go(adviceclient.java:18)
at AdviceClient.main(adviceclient.java:11)

I tried all the solutions given for similar problems in the following sites:

http://www.coderanch.com/t/158486/java-EJB-SCBCD/certification/head-first-ejb-pg-client

http://wickedlysmart.com/HeadFirst/HeadFirstEJB/HeadFirstEJBNotes.html

Still I couldn't solve the problem. My settings are
Classpath-
C:\jdk1.3.1\bin;C:\jdk1.3.1\lib;c:\j2sdkee1.3.1\lib\j2ee.jar;.;C:\j2sdkee1.3.1\lib;C:\j2sdkee1.3.1\lib\system;C:\j2sdkee1.3.1\lib\cloudscape

J2EE_HOME-
C:\j2sdkee1.3.1

Java_Home-
C:\jdk1.3.1

PATH-
C:\j2sdkee1.3.1\bin

Please help me to resolve this problem. Its killing my sleep for long days....
Thanks
Priya

[ March 09, 2007: Message edited by: priya pratheep ]
[ March 09, 2007: Message edited by: priya pratheep ]
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
remove any other jre if installed on your machine.
this problem occurs if you have any other jre installed other than 1.3.1_19
run time should be like this

java -version
java version "1.3.1_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_19-b03)
Java HotSpot(TM) Client VM (build 1.3.1_19-b03, mixed mode)
priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
HI Gowher amin naik

We have jre 1.3.1 only .
But when trying "java -version"

java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode)

Actually no such version existing .
I don't know from where it is comming

Still i cant't run my adviceclient
thanks in advance...pls help
priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
Anybody please help me...I send private message also to brilliant people like you
there is no response
please help urgent !!!
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
if java -version shows jre 1.5.0_09 that means it is installed on your machine.
You have to remove jre 1.5.0_09 and your problem will be solved.
priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
Hi gowher amin naik

Actually i removed all jre version from system except 1.3.1....
To make sure,I removed all Java from the system and installed jdk jsdk and jre of version 1.3.1...after restart Still java version shows 1.5
I don't know from where it is getting...
pls help
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
You need C:\jdk1.3.1\bin in your PATH and at the beginning of your path. After you do that try java -version again. If you still have problems then please show us your actual path and other settings.

(Don't remove C:\j2sdkee1.3.1\bin from your path, just add the jdk to the beginning.)

(This may not be hurting anything, but you do not need a bunch of bin and lib directories in your classpath. You do need the j2ee.jar and dot: c:\j2sdkee1.3.1\lib\j2ee.jar;.)


Originally posted by priya pratheep:
\
Still I couldn't solve the problem. My settings are
Classpath-
C:\jdk1.3.1\bin;C:\jdk1.3.1\lib;c:\j2sdkee1.3.1\lib\j2ee.jar;.;C:\j2sdkee1.3.1\lib;C:\j2sdkee1.3.1\lib\system;C:\j2sdkee1.3.1\lib\cloudscape

J2EE_HOME-
C:\j2sdkee1.3.1

Java_Home-
C:\jdk1.3.1

PATH-
C:\j2sdkee1.3.1\bin

priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
Hi Carol Enderlin

thank you for your reply...I really fed up with this prob....

Regarding version
I uninstall jre 1.5 from my system and instal 1.3....
I am using windows XP, From control panel -- java -- i changed there to 1.3 also..
Still java -version is showing 1.5

My Setting are
Path :: C:\Sun\SDK\jdk\bin;C:\jdk1.3.1\bin;c:\j2sdkee1.3.1\bin;
Classpath :: C:\j2sdkee1.3.1\lib\j2ee.jar;.
java_home :: c:\jdk1.3.1
j2ee_home :: c:\j2sdkee1.3.1

I am getting the error
C:\EJBDEMO\projects\advice>java -classpath %classpath%;AdvAppClient.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(IIOPInputStream.java:126)
at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPConnection.java:671)
at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.java:778)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.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.java:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at AdviceClient.go(AdviceClient.java:28)
at AdviceClient.main(AdviceClient.java:15)
pls help
thank you
priya
priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
Hi Carol
please reply
priya
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
EaseUp!

If this is your path, it would look for java from C:\Sun\SDK\jdk\bin before it would look in C:\jdk1.3.1\bin since it comes before C:\jdk1.3.1\bin in the path :

Path :: C:\Sun\SDK\jdk\bin;C:\jdk1.3.1\bin;c:\j2sdkee1.3.1\bin;

Can you change it to this? :

C:\jdk1.3.1\bin;c:\j2sdkee1.3.1\bin;C:\Sun\SDK\jdk\bin
priya pratheep
Greenhorn

Joined: Mar 07, 2007
Posts: 13
Hi Carol

I don't know how to express my happiness ....At LAST it is working...
After giving three weeks of pain.......
In System variables (environment variable) path was not correct that causes the problem..............
Once again thanks

Priya
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
That's great news!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PLS help -urgent Prob with headfirst Advice
 
Similar Threads
advice client run prob...pls help...com/sun/corba/se/inte
Head First EJB Chapter 1 : Advice Application Problem, Please Help
Why do i get this Exception?
Not Able To Run The Advice App Client given in Head First EJB
AdviceClient again!!