我尝试在JBOSS 7.1.1中使用JNDI从远程客户端调用,但我得到了例外:
线程中的异常" main" javax.ejb.EJBAccessException:JBAS013323:无效的用户 在org.jboss.as.ejb3.security.SecurityContextInterceptor $ 1.run(SecurityContextInterceptor.java:54) 在org.jboss.as.ejb3.security.SecurityContextInterceptor $ 1.run(SecurityContextInterceptor.java:45) at java.security.AccessController.doPrivileged(Native Method) 在org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74) 在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) 在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) 在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 在org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43) 在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 在org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) 在org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) 在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) 在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) 在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) 在java.lang.Thread.run(Thread.java:662) 在org.jboss.threads.JBossThread.run(JBossThread.java:122) at ...异步调用...(未知来源) 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) 在org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:140) 在org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) 在org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) 在$ Proxy0.informarDados(未知来源) 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) 1325 [Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser - 关闭远程连接< 1bde4> 1329 [Remoting"基于配置的-ejb-client-endpoint"任务-2] INFO org.jboss.ejb.client.remoting.ChannelAssociation - 远程连接007bc899到localhost / 127.0.0.1:4447的通道通道ID ec18d75d(出站)无法再处理消息 1426 [Thread-1] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver - 将远程连接007bc899的channelChannel ID ec18d75d(出站)关闭到localhost / 127.0.0.1:4447 1427 [Thread-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation - 关闭通道远程连接007bc899到localhost / 127.0.0.1的通道ID ec18d75d(出站):4447 1428 [Thread-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation - 为Remoting连接的已损坏通道通道ID ec18d75d(出站)注册重新连接处理程序org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler@a2220f EJB客户端上下文中的007bc899到localhost / 127.0.0.1:4447 org.jboss.ejb.client.EJBClientContext@c8376b 1433 [Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser - 关闭端点"基于配置的-ejb-client-endpoint" < 1ecfe07>
我正在使用jboss的安全机制,我已经通过add-user.bat添加了用户,还有带有用户名和密码的文件jboss-ejb-client.properties,但仍然得到异常。我按照链接的示例集:EJB invocations from a remote client using JNDI,当我没有使用安全机制时,同样有效,但是当我使用安全机制时发生错误
你错过了什么?