|
![]() |
Co-Author of Head First Design Patterns
Just a Jini girl living in a J2EE world.
Sun Certified Java2 Programmer - 1.4 - SCJP<br />Sun Certified Web Component Developer for J2EE Platform - SCWCD
Cal<br />SCJP,SCWCD,SCBCD
Originally posted by Sara Watson:
Kathy,
Thank you! You've made my day! I was just about to burn the book!I'm just kidding....I think.
![]()
Munish Dabra<br />SCJP , SCWD
Originally posted by Nehul NN:
[QB]I am having problem running AdviceClient.
My configuration
Windows 2000 professional edition
J2SDKEE1.3_01, build 1.3_01-b01
J2SDK 1.3.1_09-b03
Try upgrading to J2SDKEE 1.3.1 - I also had problems with 1.3_01-b01
[ November 23, 2003: Message edited by: JT Toro ]
Originally posted by Kathy Sierra:
Howdy -- I thought I'd start a new topic on this rather than add to the old one.
Some people have been getting this incredibly helpful and enlightening CORBA.BAD_OPERATION error when they run the AdviceClient client on the J2EE 1.3 RI, at the point where the business method (getAdvice()) is invoked:
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(Class.java:232)
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(ObjectImpl.java:454)
at headfirst._Advice_Stub.getAdvice(Unknown Source)
at AdviceClient.go(AdviceClient.java:27)
at AdviceClient.main(AdviceClient.java:9)
========================
But not everyone gets it. Me, for example. But thanks to Chidu, I know for certain that this is some type of bug and not a programmer error, because Chidu sent me his entire project and I was able to run it perfectly on my machine. Yet, running the same application and class files (I even deployed his existing .ear file - I didn't recreate one using his classes) he DOES get the error. I have verified that he has done everything correctly, yet on his machine he still gets the error.
It cannot be a classpath problem, because if it were, it would fail at an earlier point.
I have a reason to suspect that this is related to a known bug in the RI, but since I am unable to reproduce the error (because it always works for me), I'm asking if someone who has this error could try the fix I'm going to give you in a moment.
Some of you HAVE been able to fix it with a terrible workaround (where you take the classes out of a package!) but we don't want you to have to do that! You could never get away with that in the real world, so we want you to keep the classes in packages.
Here's my suspicion that I would REALLY appreciate if someone could test it. Either someone who is currently getting the error, or someone who did before, and who fixed it by removing the packages (in which case, you'd have to put everything BACK into a package...)
The RI has a known bug that *might* be the problem. It has to do with the name of a method in an component interface, when it is somehow related to the interface name itself.
I think you should change the name of the method, and rebuild and redeploy the bean. If this fixes it, we will post a note on our site and O'Reilly, letting people know that they *might* have that bug.
By the way, if you run "j2ee -version" at the command-line, you'll find out which one you're using. I'm using:
Java 2 Enterprise Edition version 1.3.1, build 1.3.1-b17
And I do not get this error, even when running an application that produces this error on a different machine. I am running the Linux distribution, under Mac OSX (works under Jaguar and the new Panther), with J2SE 1.3.
So, here's the fix I want someone to try, and if it works, you will certainly be the hero.![]()
1) Undeploy your current AdviceApp by cleaning up the server
-- stop J2EE "j2ee -stop"
-- run "cleanup" at the command-line
2) Delete your application from your projects/Advice directory (in other words, delete the .ear file), and if there are any .temp files, delete those as well.
3) Change your component interface and name the method something that does NOT have "Advice" in the name... so, instead of getAdvice(), call it getSomething()...
4) Change your bean class business method to match the business method name in the interface
5) Recompile
-- restart the server and the deploytool
6) Rebuild the bean from scratch (first build a new application, then New --> Enterprise Bean
7) Deploy the bean
8) Modify the client code to call the new method (instead of the getAdvice() method)
9) Invoke the appropriate diety / spirit / good luck charm
10) Run the client (might help to hold your breath until it's done)
Post your wonderful success story here, so I can sleep again.
So, once again, somebody who had this error PLEASE help by trying this fix. There's a good chance this is the problem.
thanks,
Kathy
John Olmstead<br />[email protected]
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
SCJP, SCJD, SCBCD, SCEA, IBM 665
SCJP, SCWCD, SCBCD
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Originally posted by Chris Lewold:
OK .... now I am a "Half Believer" ....
I had the same problem, and the solution with the "name-change" workaround also worked for me .....
BUT WHY ???![]()
![]()
Co-Author of Head First Design Patterns
Just a Jini girl living in a J2EE world.
Vivek Viswanathan SCJP 1.2, SCJP 1.6,SCJD,SCEA,SCWCD,IBM-484,IBM-486,IBM-141,Ms.NET C# 70-316,SCMAD, LPIC-I
Morgan
SCJP (1.4), SCJD (1.4), SCWCD (1.3), SCBCD (1.3)
SCJP 1.2, SCWCD, SCWCD 1.4 - Awaiting results, SCBCD - In progress
The significant problems we face cannot be solved by the same level <br />of thinking that created them - Albert Einstein
Consider Paul's rocket mass heater. |