File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
pradeep arum
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
pradeep arum
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 775
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
R.x Lan
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not meet your problems since I just download the new code from the author's website.
 
R.x Lan
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not meet your problems since I just download the new code from the author's website.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 1589
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic