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.

Cheers,
Vikrant


From: Vikrant Yagnick
Sent: Wednesday, September 16, 2009 2:32 PM
To: Vikrant Yagnick; users@openejb.apache.org
Subject: RE: Error in OpenEJB

I looked at the source code for EJBHomeProxyHandler.java for version 3.1.1 it 
seems to have the following:

catch (org.apache.openejb.ApplicationException ae) {
            Throwable exc = (ae.getRootCause() != null) ? ae.getRootCause() : 
ae;
            if (exc instanceof EJBAccessException) {
                if (interfaceType.isBusiness()) {
                    throw exc;
                } else {
                    if (interfaceType.isLocal()) {
                        throw (AccessLocalException)new 
AccessLocalException(exc.getMessage()).initCause(exc);
                    } else {
                        throw new 
AccessException(exc.getMessage()).initCause(exc);
                    }
                }


My guess is that the Application is throwing an exception that is hitting the 
clause marked in Red above. However, the way the clause is written it's giving 
the illegal state exception.
If someone can confirm, this is indeed the problem I can maybe raise a JIRA for 
it.

Cheers,
Vikrant

From: Vikrant Yagnick
Sent: Wednesday, September 16, 2009 2:00 PM
To: 'users@openejb.apache.org'
Subject: Error in OpenEJB

Hi All,

I am facing  a strange error while using openejb.
The following is the stack trace:

java.lang.IllegalStateException: Can't overwrite cause
                at java.lang.Throwable.initCause(Throwable.java:320)
                at 
org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:232)
                at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:281)
                at $Proxy148.create(Unknown Source)
                at 
com.mastek.eElixir.pointofsales.contactmanagement.action.SelfProspectListSearch.process(SelfProspectListSearch.java:62)
                at 
com.mastek.eElixir.pointofsales.servlet.PointOfSalesController.process(PointOfSalesController.java:95)
                at 
com.mastek.eElixir.common.servlet.Controller.doPost(Controller.java:378)
                at 
com.mastek.eElixir.pointofsales.servlet.PointOfSalesController.doPost(PointOfSalesController.java:79)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
                at 
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
                at oracle.lite.web.CheckSessionFilter.doFilter(Unknown Source)
                at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
                at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
                at 
com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
                at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
                at 
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
                at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
                at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
                at 
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
                at 
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
                at 
oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
                at 
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
                at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
                at java.lang.Thread.run(Thread.java:595)


I checked the web and noticed that a JIRA had already been there for this error 
:
https://issues.apache.org/jira/browse/OPENEJB-713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

It says this was fixed in OpenEJB Version 3.0 Beta 2.

We are using openejb version 3.1.1.

The error is intermittent in that the same test is working on another 
deployment of the code, so I am not sure how I can replicate this.

Any tips/help will be great.




Cheers,
Vikrant Yagnick
Software Designer
MajescoMastek Ltd | Mastek Millennium Center,Millennium Business Park, Mahape, 
Navi  Mumbai 400-710   |
(T) 91 22 66952222 Extn - 5230 | Mobile: +919833490598 | www.mastek.com

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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to