tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikrant Yagnick <Vikrant.Yagn...@mastek.com>
Subject RE: Error in OpenEJB
Date Thu, 17 Sep 2009 06:30:06 GMT
Hi David,

Sorry, there were two issues with OpenEJB. I apologize, if I confused  the two of them:

1) Issue 1: We were getting java.lang.IllegalStateException. This one has been fixed by JIRA-1075.
From, the bug documentation I understand that this is a standard JVM feature and will remain
so (the documentation for this is poor according to SUN). So, I am not sure upgrading the
VM would get rid of this issue, but with the fix this should not be a problem anymore. (I
did the same fix locally).



2)The other issue I encountered happened once I solved the java.lang.IllegalStateException.
I got the actual "RemoteException" which was:
 16/9/2009 15:45:25--Controller : doPost---Unauthorized Access by
 Principal Denied; nested exception is:
                javax.ejb.EJBAccessException: Unauthorized Access by
 Principal Denied
 com.mastek.eElixir.common.exception.EElixirException: Unauthorized
 Access by Principal Denied; nested exception is:
                javax.ejb.EJBAccessException: Unauthorized Access by
 Principal Denied

It was this second issue that magically goes away when I used JDK 1.5_19 but seems to be there
when I use JDK 1.5_07.

I am bit behind my project this week due to a number of JVM related issues relating to other
libraries we are using, so will not get time to investigate this further. But, if you can
give me some pointers as to why  I am getting a EJBAccessException (We are not using any security
constructs) , I can maybe try and replicate it sometime next week.

Cheers,
Vikrant


-----Original Message-----
From: David Blevins [mailto:david.blevins@visi.com]
Sent: Thursday, September 17, 2009 7:00 AM
To: users@openejb.apache.org
Subject: Re: Error in OpenEJB


On Sep 16, 2009, at 6:16 AM, Vikrant Yagnick wrote:

> Further to this,
>
> I changed the line in red  below to:  throw new
> AccessException(exc.getMessage(),exc);
>
> This removed the java.lang.IllegalStateException, but then I kept
> getting :
>
> 16/9/2009 15:45:25--Controller : doPost---Unauthorized Access by
> Principal Denied; nested exception is:
>                javax.ejb.EJBAccessException: Unauthorized Access by
> Principal Denied
> com.mastek.eElixir.common.exception.EElixirException: Unauthorized
> Access by Principal Denied; nested exception is:
>                javax.ejb.EJBAccessException: Unauthorized Access by
> Principal Denied
>
>
> However, a change of JDK Versions from JDK 1.5_07 to 1.5_19 makes
> this error go away!!!!
>
> I will try and see if I can make a small testcase to post to this
> list. But, is anyone aware of a minimum JDK patchset requirement for
> openEJB.


That is definitely a VM bug.  Digging around the Sun bugdatabase shows
a couple interesting items:

  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4871783
"RemoteException.initCause() always throws IllegalStateException"

(note AccessException is a subclass of RemoteException)

That was marked as a duplicate of this bug fixed in Sun JDK 1.5
(likely between 1.5_07 and 1.5_19):

  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4847777


After digging around with this one for the last couple hours I recall
that this was on our radar at one point and we had eliminated all
initCause() calls on RemoteException and subclasses.  I just did a
recursive search for RemoteException subclasses then searched for
usages of each subclass individually and found another 3-4 calls left.

I have those fixed up and a jira filed and closed here:

  https://issues.apache.org/jira/browse/OPENEJB-1075


Thanks for reporting this!

-David



MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited,
unless specifically indicated to that effect. Mastek Limited does not accept any responsibility
or liability for it. This e-mail and attachments (if any) transmitted with it are confidential
and/or privileged and solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any action in reliance
upon this information by persons or entities other than the intended recipient is prohibited.
This e-mail and its attachments have been scanned for the presence of computer viruses. It
is the responsibility of the recipient to run the virus check on e-mails and attachments before
opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop
and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Mime
View raw message