<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    EJB invocations from a remote client using JNDI: Invalid User
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/alanoc">Alano de Campos</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/754534#754534">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

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

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/754534#754534">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>