aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes pg:57 head first ejb client running problem..HELP 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 "pg:57 head first ejb client running problem..HELP" Watch "pg:57 head first ejb client running problem..HELP" New topic
Author

pg:57 head first ejb client running problem..HELP

pradeep arum
Ranch Hand

Joined: Oct 01, 2003
Posts: 130
C:\projects\advice>javac -classpath %CLASSPATH%;adviceappClient.jar adviceclient.java
C:\projects\advice>java -classpath %CLASSPATH%;adviceappClient.jar adviceclient
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Porta
bleRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at adviceclient.go(adviceclient.java:21)
at adviceclient.main(adviceclient.java:11)
CLASSPATH=.;c:\j2sdk1.4.2\jre\lib\rt.jar;c:\j2sdk1.4.2\lib\tools.jar;c:\j2sdk1.4.2\lib;.;c:\j2sdkee1.3.1\lib\j2ee.jar;%CLASSPATH%
PATH IS
C:\j2sdkee1.3.1\bin;c:\j2sdk1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem


SCJP1.4,SCBCD
Failure is not when you fall down; its only when you fail to get up again.
pradeep arum
Ranch Hand

Joined: Oct 01, 2003
Posts: 130
i got these errors after i took out the package headfirst statements from advice.java advicebean.java advicehome.java and after removing import headfirst.* from adviceclient.java
plese help help.....i am stuck here past 3 days
and my SCBCD date is nearing
Pradeep
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
I've noticed that the j2ee reference implementation tools aren't always good about cleaning out old code when you make a change and redeploy. There is a cleanup batch file, try running that. Then rebuild and redeploy your ejb jar. Hopefully that will do the trick.


Reid - SCJP2 (April 2002)
R.x Lan
Ranch Hand

Joined: Dec 27, 2003
Posts: 83
I did not meet your problems since I just download the new code from the author's website.


(SCJP SCWCD SCBCD SCDJWS)
R.x Lan
Ranch Hand

Joined: Dec 27, 2003
Posts: 83
I did not meet your problems since I just download the new code from the author's website.
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Howdy -- you can get the code from either the O'Reilly site or from:
wickedlysmart site
Just click on the Head First EJB book icon and you'll get the link to the code jar.
You really should keep the import statements!!
Cheers,
kathy
pradeep arum
Ranch Hand

Joined: Oct 01, 2003
Posts: 130
Kathy,
on what files is the HFECODE(jar file) built ,what method should my adviceclient have?is it getAdvice() or gettheMessage()?
Pradeep
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Howdy -- in the code jar file the method is NOT getAdvice(), but getMessage(). (Not, getTheMessage()). So that method name is reflected in the client code and the component interface as well.
cheers,
Kathy
 
 
subject: pg:57 head first ejb client running problem..HELP