Invalid User on EJB authentication (JBoss 5 CR2)
javidjamae Oct 15, 2008 12:11 AMI'm trying out JBoss 5 CR2. I have an EJB application that uses dynamic login config. The application seems to deploy fine, and my security configuration is correct, because I can access the application from a Web interface.
But when I try to authenticate with the same user from a remote EJB client, I receive the following error:
[java] javax.ejb.EJBAccessException: Invalid User [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:135) [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [java] at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:65) [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [java] at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:462) [java] at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:56) [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91) [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908) ...
My client is just doing this:
SecurityAssociation.setPrincipal(new SimplePrincipal(principal)); SecurityAssociation.setCredential(password.toCharArray()); CalculatorRemote calculator = (CalculatorRemote) ctx .lookup("calculator/StatelessCalculatorBean/remote"); calculator.calculateFutureValue(1000, 20);
I think this may be a bug. Any clues?