Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not meet your problems since I just download the new code from the author's website.
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 want my playground back. Here, I'll give you this tiny ad for it:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic