Win a copy of AWS Security this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Head First AdviceBean is trying to drive me mad

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok now im wierded out. I had the Advice client example running last week just fine, and I come back and rerun it ... and get the following:
D:\WorkSpace\JavaPlayground\EJB\Advice>javac -classpath %CLASSPATH%:AdviceAppClient.jar AdviceClient.java
D:\WorkSpace\JavaPlayground\EJB\Advice>java -cp %CLASSPATH%:AdviceAppClient.jar;. AdviceClient
begin.....
Getting context
look up advisor
looked up, setting HOME
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source)
at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
at AdviceClient.go(AdviceClient.java:23)
at AdviceClient.main(AdviceClient.java:11)
It bloody worked last week. Its doing this deliberately isn't it? Its a conspiricy to freak me out. I just finished doing the developer assignment for the SCJD exam and was looking forward to focusing on EJB ... now im thinking about committing myself and getting a nice armless jacket.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try
D:\WorkSpace\JavaPlayground\EJB\Advice>java -cp %CLASSPATH%;AdviceAppClient.jar;. AdviceClient
instead of
D:\WorkSpace\JavaPlayground\EJB\Advice>java -cp %CLASSPATH%:AdviceAppClient.jar;. AdviceClient
Windows paths are semicolon seperated, you're using a colon before the jar file.
Jake
 
Morgan Bath
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WELL SPOTTED THAT MAN!
Dont you hate that sort of thing
 
Morgan Bath
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW its probably been said 1000 times before but I figure they dont mind:
The Head First EJB book is unbeleivably good. Its actually fun. Im ordering their Java book just for something to read.
 
Quick! Before anybody notices! Cover it up with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic