• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Head First -AdviceApp (page58) - Runtime error

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic