Hi,
I get the exception "java.rmi.AccessException: Unauthorized Access by
Principal Denied
" while calling the below line in Web Project. I appreciate, If anyone gives
any example/idea to solve this issue.
I try this in Eclipse using TomEE with OpenEJB
EJBObject = (EJBObject)mMethod.invoke(oEJBHome, arguments);
Having the below set up in *web.xml *& in *Java Code*
<servlet>
<servlet-name>ServerServlet</servlet-name>
<servlet-class>org.apache.openejb.server.httpd.ServerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServerServlet</servlet-name>
<url-pattern>/ejb/*</url-pattern>
</servlet-mapping>
Properties p = new Properties();
p.put("java.naming.factory.initial",
"org.openejb.client.RemoteInitialContextFactory");
p.put("java.naming.provider.url", "http://127.0.0.1:8080/ejb");
p.put("openejb.embedded.remotable", "true");
p.put("log4j.category.OpenEJB.startup.attributes","DEBUG");
ic = new InitialContext(p);
*Exception StackTrace*
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
Caused by: java.rmi.AccessException: Unauthorized Access by Principal Denied
at
org.apache.openejb.client.EJBInvocationHandler.convertException(EJBInvocationHandler.java:267)
at
org.apache.openejb.client.EJBHomeHandler._invoke(EJBHomeHandler.java:165)
at
org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:136)
at
org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
at $Proxy108.create(Unknown Source)
Thanks
Ashok
--
View this message in context:
http://openejb.979440.n4.nabble.com/TomEE-OpenEJB-Eclipse-deployment-Calling-EJBObject-returns-java-rmi-AccessException-Unauthorized-Accd-tp4668292.html
Sent from the OpenEJB User mailing list archive at Nabble.com.