Hi did you securize the server, which version do you use? why putting ejb endpoint and not using default one (/tomee/ejb)? Why not looking up directly the expected ejb and using old API? Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau
2014-03-20 21:40 GMT+01:00 ashok_J83 <[email protected]>: > 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.
