[jboss-dev-forums] [JBoss AS 7 Development] - EJB invocations from a remote client using JNDI: Invalid User

Alano de Campos do-not-reply at jboss.com
Mon Aug 20 08:58:10 EDT 2012


Alano de Campos [https://community.jboss.org/people/alanoc] created the discussion

"EJB invocations from a remote client using JNDI: Invalid User"

To view the discussion, visit: https://community.jboss.org/message/754534#754534

--------------------------------------------------------------
I'm trying to invocations from a remote client using JNDI in JBOSS 7.1.1, but I get the exception:

[main] DEBUG org.jboss.logging  - Logging Provider: org.jboss.logging.Log4jLoggerProvider
[main] INFO  org.jboss.ejb.client  - JBoss EJB Client version 1.0.5.Final
[main] DEBUG org.jboss.ejb.client.EJBClientPropertiesLoader  - Looking for jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader at 601bb1
[main] DEBUG org.jboss.ejb.client.EJBClientPropertiesLoader  - Found jboss-ejb-client.properties using classloader sun.misc.Launcher$AppClassLoader at 601bb1
[main] DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - endpoint.create.options. has the following options {}
[main] DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - remote.connectionprovider.create.options. has the following options {org.xnio.Options.SSL_ENABLED=>false}
[main] DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - remote.connection.default.connect.options. has the following options {org.xnio.Options.SASL_DISALLOWED_MECHANISMS=>[JBOSS-LOCAL-USER]}
[main] DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - remote.connection.default.channel.options. has the following options {}
[main] DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - Connection org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration$RemotingConnectionConfigurationImpl at 13bd574 successfully created for connection named default
[main] DEBUG org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration  - No clusters configured in properties
[main] INFO  org.xnio  - XNIO Version 3.0.3.GA
[main] INFO  org.xnio.nio  - XNIO NIO Implementation Version 3.0.3.GA
[main] INFO  org.jboss.remoting  - JBoss Remoting version 3.2.3.GA
[Remoting "config-based-ejb-client-endpoint" write-1] DEBUG org.xnio.nio  - Started channel thread 'Remoting "config-based-ejb-client-endpoint" write-1', selector sun.nio.ch.WindowsSelectorImpl at 181ed9e
[Remoting "config-based-ejb-client-endpoint" read-1] DEBUG org.xnio.nio  - Started channel thread 'Remoting "config-based-ejb-client-endpoint" read-1', selector sun.nio.ch.WindowsSelectorImpl at 18f5824
[Remoting "config-based-ejb-client-endpoint" task-4] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Channel Channel ID f7fd41c3 (outbound) of Remoting connection 01cef4f7 to localhost/127.0.0.1:4447 opened for context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]} Waiting for version handshake message from server
[Remoting "config-based-ejb-client-endpoint" task-4] INFO  org.jboss.ejb.client.remoting.VersionReceiver  - Received server version 1 and marshalling strategies [river]
[main] INFO  org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]} on channel Channel ID f7fd41c3 (outbound) of Remoting connection 01cef4f7 to localhost/127.0.0.1:4447
[Remoting "config-based-ejb-client-endpoint" task-2] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Received module availability report for 5 modules
[Remoting "config-based-ejb-client-endpoint" task-2] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Registering module EJBModuleIdentifier{appName='cissupdateserver-ear', moduleName='cissupdateserver', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]}
[Remoting "config-based-ejb-client-endpoint" task-2] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Registering module EJBModuleIdentifier{appName='jsr-77', moduleName='jsr-77', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]}
[Remoting "config-based-ejb-client-endpoint" task-2] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Registering module EJBModuleIdentifier{appName='cissupdateserver-ear', moduleName='cissupdateserver-ear', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]}
[Remoting "config-based-ejb-client-endpoint" task-2] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Registering module EJBModuleIdentifier{appName='cissupdateserver-ear', moduleName='cisscore', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]}
[Remoting "config-based-ejb-client-endpoint" task-2] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Registering module EJBModuleIdentifier{appName='cissupdateserver-ear', moduleName='cissupdateserver-ejb', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext at da18ac, receiver=Remoting connection EJB receiver [connection=Remoting connection <1bde4>,channel=jboss.ejb,nodename=alano]}
[Remoting "config-based-ejb-client-endpoint" task-2] WARN  org.jboss.ejb.client.remoting.ChannelAssociation  - Unsupported message received with header 0xffffffff
[main] DEBUG org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector  - Registered 1 remoting EJB receivers for EJB client context org.jboss.ejb.client.EJBClientContext at da18ac
[main] DEBUG org.jboss.ejb.client.EJBClientContext  - org.jboss.ejb.client.RandomDeploymentNodeSelector at 15f7107 deployment node selector selected alano node for appname=cissupdateserver-ear,modulename=cissupdateserver-ejb,distinctname=
[Remoting "config-based-ejb-client-endpoint" task-1] INFO  org.jboss.ejb.client.remoting.ChannelAssociation  - Discarding result for invocation id 0 since no waiting context found
Exception in thread "main" javax.ejb.EJBAccessException: JBAS013323: Invalid User
          at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:54)
          at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:45)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
          at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
          at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
          at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:302)
          at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$200(MethodInvocationMessageHandler.java:64)
          at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:196)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          at org.jboss.threads.JBossThread.run(JBossThread.java:122)
          at ...asynchronous invocation...(Unknown Source)
          at org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler$MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:99)
          at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:270)
          at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:47)
          at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:272)
          at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:132)
          at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:260)
          at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:399)
          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:140)
          at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
          at $Proxy0.informarDados(Unknown Source)
          at br.com.ciss.client.service.informacao.InformacaoServiceImpl.informarDados(InformacaoServiceImpl.java:224)
          at br.com.ciss.client.agente.EnviaInformacaoMaquina.enviarInformacao(EnviaInformacaoMaquina.java:29)
          at br.com.ciss.client.agente.EnviaInformacaoMaquina.main(EnviaInformacaoMaquina.java:49)
[Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser  - Closing Remoting connection <1bde4>
[Remoting "config-based-ejb-client-endpoint" read-1] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver  - Closing channelChannel ID f7fd41c3 (outbound) of Remoting connection 01cef4f7 to null
[Remoting "config-based-ejb-client-endpoint" read-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation  - Closing channel Channel ID f7fd41c3 (outbound) of Remoting connection 01cef4f7 to null
[Remoting "config-based-ejb-client-endpoint" read-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation  - Registering a re-connect handler org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler at 9a9b65 for broken channel Channel ID f7fd41c3 (outbound) of Remoting connection 01cef4f7 to null in EJB client context org.jboss.ejb.client.EJBClientContext at da18ac
[Remoting "config-based-ejb-client-endpoint" task-4] INFO  org.jboss.ejb.client.remoting.ChannelAssociation  - Channel Channel ID f7fd41c3 (outbound) of Remoting connection 01cef4f7 to null can no longer process messages
[Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser  - Closing endpoint "config-based-ejb-client-endpoint" <18aab40>

I'm using the security mechanisms of jboss, and I have added the user through the add-user.bat also have the file jboss-ejb-client.properties with username and password and still get the exception. I followed the example set of the link: https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI EJB invocations from a remote client using JNDI, the same works when I'm not using the security mechanisms, but when I use the security mechanisms the error occurs
What you're missing?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/754534#754534]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120820/fa8c131b/attachment.html 


More information about the jboss-dev-forums mailing list