aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Head First -AdviceApp (page58) - Runtime error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Head First -AdviceApp (page58) - Runtime error" Watch "Head First -AdviceApp (page58) - Runtime error" New topic
Author

Head First -AdviceApp (page58) - Runtime error

Sivakumar Jambunathan
Greenhorn

Joined: Aug 20, 2004
Posts: 16
Hello,
I just embarked on my journey towards SCBCD and have been getting the following runtime error when I try to run the AdviceClient code after following HeadFirstEJB. Please let me know if I am missing somethign(have the j2ee.jar etc in my classpath and the j2ee server shows no errors, says Deployment of AdviceAppClient is completed.


C:\projects\advice> javac -classpath %CLASSPATH%;AdviceAppClient.jar AdviceClien
t.java

C:\projects\advice>java -cp %CLASSPATH%;AdviceAppClient.jar AdviceClient
java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
eption(ReplyMessage_1_2.java:93)
at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(
ClientResponseImpl.java:108)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOACli
entSC.java:132)
at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at headfirst._Advice_Stub.getAdvice(Unknown Source)
at AdviceClient.go(AdviceClient.java:19)
at AdviceClient.main(AdviceClient.java:9)
Thanks
Siva
Sivakumar Jambunathan
Greenhorn

Joined: Aug 20, 2004
Posts: 16
Hello,
Think I figured part of the problem. Had a copy of AdviceAppClient.jar in the projects/advice folder and when I removed the same the previous errors vanished, still getting the following, trying further. Let me know if any of you have come across this problem.

Thanks
Siva


C:\projects\advice>java -cp %CLASSPATH%;AdviceAppClient.jar AdviceClient
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unkno
wn Source)
at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
at AdviceClient.go(AdviceClient.java:17)
at AdviceClient.main(AdviceClient.java:9)

C:\projects\advice>
yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
See the Errata of HFE. It may help. According to this Component interface name (Advice) should not be part of bean method name (getAdvice). so change bean method name to some thing else like getMessage and try?.

yamini
Sivakumar Jambunathan
Greenhorn

Joined: Aug 20, 2004
Posts: 16
Thanks Yamini. Looks like the version of J2EE RI that I have installed has that bug.

I was trying for the last 4 hrs without readig your posting and nothing helped, finally when I looked at your posting, and made the necessary changes, presto, it worked. Now, I will read the book with more confidence.

Thanks again
Siva
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Head First -AdviceApp (page58) - Runtime error