Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First AdviceBean is trying to drive me mad

 
Morgan Bath
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.
 
Jakub Korab
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic