• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems getting examples running on RI

 
Pascal Lafond
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One month ago on my old desktop I got everything running without a hitch using a version of SDK1.4 and J2EE 1.3.1 on XP. I followed the books instructions to the letter and everything worked.

Now on my brand new machine things are not going very well.
Setup is
WinXP, j2sdkee1.3.1 and jdk1.3.1_17 (as posted on http://www.coderanch.com/t/160071/java-EJB-SCBCD/certification/Sun-RI-NoClassDefFoundError by Jonny Andersson)
I also tried using j2sdk1.4.2_04 but received the exact same result.

My environment variables are as follows
J2EE_HOME=C:\j2sdkee1.3.1
JAVA_HOME=C:\jdk1.3.1_17
CLASSPATH=%J2EE_HOME%\lib\j2ee.jar
PATH=<..long path stuff..>;%JAVA_HOME%\bin;%J2EE_HOME%\bin


Everything works up to page 58 where we run the Advice client and I get the following error.

C:\work\Cert\advice>java -classpath %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(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.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:29)
at AdviceClient.main(AdviceClient.java:15)

I also tried to add the following code in my AdviceClient as sugested by Roger Cavallo in http://www.coderanch.com/t/160436/java-EJB-SCBCD/certification/Almost-have-AdviceClient-run-but.

It compiled but I got 23 a different error when run.

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:3700");
Context ic= new InitialContext(env);
Object o = ic.lookup("Advisor");


Help would be appreciated. I guess I won't try any of the deployment code for now and just keep reading.
 
vikas prasad
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
try this may be it might help. cause it works for me with windows XP

CLASSPATH C:\j2sdkee1.3.1\lib\j2ee.jar;D:\Certification\projects\advice

D:\Certification\projects\advice This is the folder where you will have your AdviceAppClient.jar file. see do not put the jar file name ok just the path to the directory. ok

J2EE_HOME C:\j2sdkee1.3.1

JAVA_HOME C:\jdk1.3.1_16

PATH C:\j2sdkee1.3.1\bin;C:\jdk1.3.1_16\bin;

ok now compile
javac -classpath %CLASSPATH%; AdviceAppClient.jar AdviceClient.java

and run the program
java -cp %CLASSPATH%; AdviceAppClient.jar AdviceClient

bingo....
it will run.
cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic