wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes AdviceClient again!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "AdviceClient again!!" Watch "AdviceClient again!!" New topic

AdviceClient again!!

Prabu S Arumugam
Ranch Hand

Joined: Apr 30, 2006
Posts: 49
C:\Prabu\mycode\J2EE\EJB\AdviceApp\Advice>java AdviceClient
Context Created!!!
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge
at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clin
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
at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPIn
at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPConnect
at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.jav
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(Init
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostIn
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(I
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBIn
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialRefe
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_r
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.ja
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:19)
at AdviceClient.main(AdviceClient.java:10)

Changed the business method name to getTheMessage as there were posts asking to change it from getAdvice-some conflict with Inteface name Advice:

Context Created!!!
is being printed out.. so Initial Context part is OK..
is there some problem with JNDI look up (Advisor).. ??!!
& this is AdviceClient.java:
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import headfirst.*;
import javax.ejb.*;

public class AdviceClient {

public static void main(String[] args) {
new AdviceClient().go();

public void go() {
Context ic = new InitialContext();
System.out.println("Context Created!!!");

Object o = ic.lookup("Advisor");
System.out.println("Lookup DONE!!!");

AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o,AdviceHome.class);
System.out.println("Narrowing DONE!!!");

Advice advisor = home.create();
System.out.println("Remote Object Created!!!");

catch (Exception ex) {



This is my CLASSPATH:

C:\Prabu\mycode\J2EE\EJB\ADVICE~1\Advice>echo %CLASSPATH%
C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\Program Files\QuickTime\QTSystem\QTJava.zip;C:\j2sdkee1.3.1\lib\j2ee.jar;C:\Prabu\mycode\J2EE\EJB\AdviceApp\Advice\AdviceAppClient.jar;.

Anyone got similar errors.. lemme know..

Insurance Systems- Architect.
SCBCD 5, SCWCD 1.4, MCP VB 6.0
Richard Rex
Ranch Hand

Joined: Sep 19, 2005
Posts: 100
Hi Prabu Arumugam,

I also encountered before the same error you are having now. I haven't figure out why I was getting such an error. But I am pretty much sure that the error is not in the code, it's in my settings. So what I did is to start all over again. Try doing everything from scratch again. And this time make it slow and as accurate as it can be specially with the settings of your path and classpath. Good luck!

"If you fail to plan, you plan to fail."<br /> <br />Chad<br />SCJP 1.4<br />SCWCD 1.4<br />SCBCD 1.3<br />SCDJWS (next)
Leigh Su

Joined: Mar 16, 2006
Posts: 22
Hi Prabu:

Check this post: http://www.coderanch.com/t/160001/java-EJB-SCBCD/certification/Advice-Client. You may get solution.

SCJP 5, SCWCD 1.4, SCBCD 1.3
Matthew Burnett

Joined: Jul 04, 2006
Posts: 1

At your command prompt, type

java -version

Sometimes the jvm might default to a version that doesn't work with the supplied code (I don't know why and am not that interested in why). Mine was defaulting to 1.5.0_06 all day, and was annoying me badly until I did the following:

java -version:1.4.2_06 -cp (the rest of the line from the book goes here)

Please note that this is completely different from the CORBA problem that Kathy fixed with the code you can pull off of the wickedlysmart website.


It is sorta covered in the JavaRanch Style Guide.
subject: AdviceClient again!!
Similar Threads
Head First EJB Chapter 1 : Advice Application Problem, Please Help
Problems getting examples running on RI
Error compiling the AdviceClient.java
On running a stand alone client there is no output
help on compile ejb client