[jboss-dev-forums] [Design of Management Features on JBoss] - EJBAccessException when trying to invoke methods on Profile

ips do-not-reply at jboss.com
Mon May 4 16:55:27 EDT 2009


I've followed the instructions at http://www.jboss.org/community/wiki/RemoteAccesstoProfileService, including setting up a "profileservice" security domain containing a user "admin" with role "Administrator". I'm able to successfully lookup the remote EJB proxy, but I'm getting the following error when I try to invoke any methods on it:

Exception in thread "main" javax.ejb.EJBAccessException: Caller unauthorized
  |         at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:199)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:415)
  |         at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
  |         at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
  |         at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  |         at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
  |         at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
  |         at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
  |         at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
  |         at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
  |         at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
  |         at org.jboss.remoting.Client.invoke(Client.java:1724)
  |         at org.jboss.remoting.Client.invoke(Client.java:629)
  |         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
  |         at $Proxy7.invoke(Unknown Source)
  |         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
  |         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
  |         at $Proxy2.getDomains(Unknown Source)
  |         at test.EjbClient.main(EjbClient.java:35)
  |         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |         at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
  |         at $Proxy7.invoke(Unknown Source)
  |         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
  |         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
  |         at $Proxy2.getDomains(Unknown Source)
  |         at test.EjbClient.main(EjbClient.java:35)

The client code I'm using is at https://svn.jboss.org/repos/jopr/trunk/etc/jbas5-ejb-client/.

Here's my security config from the server side:

entry from default/conf/login-config.xml:

 <application-policy name="profileservice">
  |     <authentication>
  |       <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
  |         flag="required">
  |         <module-option name="usersProperties">props/profileservice-users.properties</module-option>
  |         <module-option name="rolesProperties">props/profileservice-roles.properties</module-option>
  |       </login-module>
  |     </authentication>
  |   </application-policy>
  
default/conf/props/profileservice-users.properties:

admin=admin

default/conf/props/profileservice-roles.properties:

admin=Administrator

What am I missing?

Thanks,
Ian


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228433#4228433

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228433



More information about the jboss-dev-forums mailing list