File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Need Help with AdviceClient Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Need Help with AdviceClient Error" Watch "Need Help with AdviceClient Error" New topic

Need Help with AdviceClient Error

Nehul NN
Ranch Hand

Joined: Nov 05, 2003
Posts: 45
My configuration
Windows 2000 professional edition
J2SDKEE1.3_01, build 1.3_01-b01
J2SDK 1.3.1_09-b03
Error message when I run >> java AdviceClient

----------------Error Message-----------------------------
Lookup DONE!!!
Narrowing DONE!!!
java.rmi.AccessException: CORBA NO_PERMISSION 0 No; nested exception is:
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
org.omg.CORBA.NO_PERMISSION: minor code: 0 completed: No
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at headfirst._AdviceHome_Stub.create(Unknown Source)
at AdviceClient.go(
at AdviceClient.main(
------------------------End of Error message---------------------------
Nehul NN
Ranch Hand

Joined: Nov 05, 2003
Posts: 45
Kathy Should take note of this.

Q1: What should I do if I encounter the following exception: java.rmi.AccessException: CORBA NO_PERMISSION 0 No?
With 1.3.1 final release, the J2EE SDK became strict about checking adherence to the security policies of J2EE components.
How can you make your application run under the Final Release?
1. If you don't want security checks, do the following:
Use the deploytool to build a deployment descriptor that does not require a strict security policy:
Under the Security screen of the EJB wizard or the Security tab of the EJB inspector in deploytool, click "Deployment Settings..". Under the box "Client Authentication", make sure "Support Client Choice" is checked instead of "Certificate" or "Password".

2. Now from Deplotool click on "Update & redeploy"
3. Run your AdviceClient again.
You are all set.
It worked for me on following platforms
J2SDKEE1.3 or J2SDKEE1.4
J2SDK1.3 or J2SDK 1.4
All on Win2k
Kathy Sierra
Cowgirl and Author

Joined: Oct 10, 2002
Posts: 1589
Thank-you! I was under the impression that this was not for the *final* release of 1.3.1, but I could be wrong about the Windows version. On the Linux and Solaris versions, they indeed tightened the security just as you mentioned, (and your solution was exactly the fix -- "Support client choice"), in EARLIER releases, but then they UN-tightened it again in the final releases because we all complained.
But I definitely want to get to the bottom of this...
Is anyone else getting this problem?
(and please let me know if you are, and which versions).
Is there anyone who has recently downloaded the final release of 1.3.1 who is NOT getting this problem? Because Nehul, this is the first I've heard of this in a long time, and I thought they had changed that quite a long time ago. My Linux distribution is final 1.3.1 and it does not have this problem.
I definitely want to post something about this if others have this problem, though...
Joe McIntyre
Ranch Hand

Joined: Nov 20, 2003
Posts: 121
Hi all:
Having the same problem:
jdk version 1.3.1_01
jdk build 1.3.1_01
j2sdkee version 1.3_01
j2sdkee build 1.3_01-b01
P.S. Just got Head First EJB - FANTASTIC!!! Thanks. I've been waiting for years for something like this!
Nehul NN
Ranch Hand

Joined: Nov 05, 2003
Posts: 45
I had same problem with environment mention your post. Please follow the step describe above & your EJB client should run without any error.
Joe McIntyre
Ranch Hand

Joined: Nov 20, 2003
Posts: 121
I followed your procedure, and it worked. Thanks! (I was confused because I also had a problem with malfunctioning Norton Internet Security's Personal Firewall, which is installed on my development machine. What a pain!)
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Unfortunately, several tries with Nehul's solution didn't eliminate the error for me.
I'm using the following:
Windows XP
j2sdk 1.3.1
j2sdkee 1.3.1
Any other ideas?
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Well, I found the very helpful "errata" on O'Reilly's. I'll post what worked for me here, with Kathy's grace...
The FIX is:
1) Change the business method name to something else in the
public interface Advice extends EJBObject {
public String getTheMessage() throws
2) Change the business method implementation in the bean class to
3) Change the client code that calls the method, to reflect the new
method name.
4) Undeploy the current version and cleanup the server using;
* run "cleanup" (without the quotes) at the command-line
(this will undeploy your application and take the server back to the
state it was in when installed.)
* Delete your existing .ear file (and any .temp files,
if you see them in your projects or Advice directory)
5) Restart the server and restart deploytool
6) Recreate the application and the bean (using New -->
Enterprise bean) and start over.
7) Be sure to wear your 'lucky t-shirt' while doing this. The R.I
has been known to respond to some forms of superstition. Or maybe it's
just an urban legend...
8) Run the client again and voila! Success! Finally!

Thanks, Kathy, and I love the book so far...
[ November 22, 2003: Message edited by: Steve Morrow ]
Nehul NN
Ranch Hand

Joined: Nov 05, 2003
Posts: 45
Kathy suggested for different problem. Here is the link
My problem was permission related (explain reason too). Kathy's solution was related to org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No.
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Thanks for the link - I didn't see that one when I was trying to track down a solution. I appreciate the help!
Bipin Kumar

Joined: May 07, 2004
Posts: 4
It worked for me by
1. Undeploying the bean
2. Changing the name of the method
3. and Redeploying
But why does it happen? pl. answer
Anindya Saha

Joined: Mar 12, 2006
Posts: 6
thanks very much nehul. I am preparing for SCBCD. This saved a hell lot of time. I scratched for 1 hour to find the problem but in vain.

your steps proved useful.
Rahul Snh

Joined: Dec 28, 2007
Posts: 1
Is "Kathy Sierra Cowgirl and Author Member # 37766" really the "Kathy" who wrote the book HF EJB. If yes then lady please update:

with this issue, since you recognize the issue. I faced it and it dazed me a bit - had I not googled it could have been a potential show-stopper.

Nonetheless H F EJB is an amazing book - hugely appreciate your effort behind it.

- Rahul
I agree. Here's the link:
subject: Need Help with AdviceClient Error
It's not a secret anymore!