Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-281

Elytron/Remoting/EJB - Exception from failed authentication differs depending on previous calls

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 4.0.2.Final
    • Fix Version/s: 4.0.8.Final
    • Labels:
      None

      Description

      Exception presented to a client when EJB authentication fails should be the same for first authentication and subsequent authentications.

      I have following scenario:

      EJB Client -> EntryBean (server1) -> WhoAmIBean (server2)
      

      the Client provides correct credentials to server 1 and EntryBean makes reauthentication to server2.

      When I use  wrong credentials for server2 in EntryBean, the call fails with:

      11:16:18,743 ERROR [stderr] (default task-25) javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/ejb2-1.0-SNAPSHOT/HelloUniverseBean", view is interface org.wildfly.tutorial.ejb.ejb2.HelloUniverse, affinity is None
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:568)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:504)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:570)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:504)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:570)
      11:16:18,744 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:504)
      11:16:18,745 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:76)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:570)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:504)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:86)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:570)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:504)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:916)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:165)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:100)
      11:16:18,746 ERROR [stderr] (default task-25) 	at com.sun.proxy.$Proxy56.sayHi(Unknown Source)
      11:16:18,746 ERROR [stderr] (default task-25) 	at org.wildfly.tutorial.ejb.ejb1.HelloWorldBean.lambda$sayHello$0(HelloWorldBean.java:49)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.wildfly.common.context.Contextual.runAction(Contextual.java:90)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.wildfly.tutorial.ejb.ejb1.HelloWorldBean.sayHello(HelloWorldBean.java:43)
      11:16:18,747 ERROR [stderr] (default task-25) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:16:18,747 ERROR [stderr] (default task-25) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      11:16:18,747 ERROR [stderr] (default task-25) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      11:16:18,747 ERROR [stderr] (default task-25) 	at java.lang.reflect.Method.invoke(Method.java:498)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
      11:16:18,747 ERROR [stderr] (default task-25) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,748 ERROR [stderr] (default task-25) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:332)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:240)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,749 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
      11:16:18,750 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      11:16:18,751 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:524)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:519)
      11:16:18,752 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:193)
      11:16:18,752 ERROR [stderr] (default task-25) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      11:16:18,752 ERROR [stderr] (default task-25) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      11:16:18,753 ERROR [stderr] (default task-25) 	at java.lang.Thread.run(Thread.java:748)
      11:16:18,753 ERROR [stderr] (default task-25) 	Suppressed: org.wildfly.security.auth.AuthenticationException: JBREM000308: Authentication failed (no mechanisms left), tried: 
      11:16:18,753 ERROR [stderr] (default task-25)    DIGEST-MD5: org.wildfly.security.auth.AuthenticationException: JBREM000304: Server rejected authentication
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.ConnectionPeerIdentityContext.doAuthenticate(ConnectionPeerIdentityContext.java:369)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.ConnectionPeerIdentityContext.authenticate(ConnectionPeerIdentityContext.java:174)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:505)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:494)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:208)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.xnio.IoUtils$2.execute(IoUtils.java:71)
      11:16:18,753 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture.runNotifier(AbstractIoFuture.java:693)
      11:16:18,754 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture$CompleteState.withNotifier(AbstractIoFuture.java:132)
      11:16:18,754 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture.addNotifier(AbstractIoFuture.java:570)
      11:16:18,754 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:494)
      11:16:18,754 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433)
      11:16:18,754 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:122)
      11:16:18,754 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.lambda$connectAndDiscover$0(RemotingEJBDiscoveryProvider.java:340)
      11:16:18,761 ERROR [stderr] (default task-25) 		at java.security.AccessController.doPrivileged(Native Method)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.connectAndDiscover(RemotingEJBDiscoveryProvider.java:340)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.discover(RemotingEJBDiscoveryProvider.java:193)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemoteEJBDiscoveryConfigurator.lambda$configure$0(RemoteEJBDiscoveryConfigurator.java:42)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.wildfly.discovery.impl.AggregateDiscoveryProvider.discover(AggregateDiscoveryProvider.java:58)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.wildfly.discovery.Discovery.discover(Discovery.java:100)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.discover(DiscoveryEJBClientInterceptor.java:227)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.doAnyDiscovery(DiscoveryEJBClientInterceptor.java:351)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.executeDiscovery(DiscoveryEJBClientInterceptor.java:290)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:90)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocation(NamingEJBClientInterceptor.java:61)
      11:16:18,761 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:76)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:303)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:161)
      11:16:18,762 ERROR [stderr] (default task-25) 		... 72 more
      11:16:18,762 ERROR [stderr] (default task-25) 	Suppressed: org.wildfly.security.auth.AuthenticationException: JBREM000308: Authentication failed (no mechanisms left), tried: 
      11:16:18,762 ERROR [stderr] (default task-25)    DIGEST-MD5: org.wildfly.security.auth.AuthenticationException: JBREM000304: Server rejected authentication
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.ConnectionPeerIdentityContext.doAuthenticate(ConnectionPeerIdentityContext.java:369)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.ConnectionPeerIdentityContext.authenticate(ConnectionPeerIdentityContext.java:174)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:505)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:494)
      11:16:18,762 ERROR [stderr] (default task-25) 		at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:208)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.xnio.IoUtils$2.execute(IoUtils.java:71)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture.runNotifier(AbstractIoFuture.java:693)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture$CompleteState.withNotifier(AbstractIoFuture.java:132)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.xnio.AbstractIoFuture.addNotifier(AbstractIoFuture.java:570)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:494)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:122)
      11:16:18,763 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.lambda$connectAndDiscover$0(RemotingEJBDiscoveryProvider.java:340)
      11:16:18,764 ERROR [stderr] (default task-25) 		at java.security.AccessController.doPrivileged(Native Method)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.connectAndDiscover(RemotingEJBDiscoveryProvider.java:340)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider$DiscoveryAttempt.countDown(RemotingEJBDiscoveryProvider.java:417)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.discover(RemotingEJBDiscoveryProvider.java:197)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.jboss.ejb.protocol.remote.RemoteEJBDiscoveryConfigurator.lambda$configure$0(RemoteEJBDiscoveryConfigurator.java:42)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.wildfly.discovery.impl.AggregateDiscoveryProvider.discover(AggregateDiscoveryProvider.java:58)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.wildfly.discovery.Discovery.discover(Discovery.java:100)
      11:16:18,764 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.discover(DiscoveryEJBClientInterceptor.java:227)
      11:16:18,767 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.doAnyDiscovery(DiscoveryEJBClientInterceptor.java:351)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.executeDiscovery(DiscoveryEJBClientInterceptor.java:290)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:90)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocation(NamingEJBClientInterceptor.java:61)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:76)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:303)
      11:16:18,768 ERROR [stderr] (default task-25) 		at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:161)
      11:16:18,768 ERROR [stderr] (default task-25) 		... 72 more
      

      When I run the scenario twice and use a correct credentials in EntryBean first and wrong in the second run, then the Exception is different:

      11:16:18,781 ERROR [stderr] (default task-25) org.jboss.ejb.client.RequestSendFailedException: org.wildfly.security.auth.AuthenticationException: JBREM000308: Authentication failed (no mechanisms left), tried: 
      11:16:18,781 ERROR [stderr] (default task-25)    DIGEST-MD5: org.wildfly.security.auth.AuthenticationException: JBREM000304: Server rejected authentication
      11:16:18,781 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleFailed(RemoteEJBReceiver.java:98)
      11:16:18,781 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleFailed(RemoteEJBReceiver.java:71)
      11:16:18,781 ERROR [stderr] (default task-25) 	at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:215)
      11:16:18,781 ERROR [stderr] (default task-25) 	at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)
      11:16:18,782 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:926)
      11:16:18,782 ERROR [stderr] (default task-25) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      11:16:18,784 ERROR [stderr] (default task-25) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      11:16:18,785 ERROR [stderr] (default task-25) 	at java.lang.Thread.run(Thread.java:748)
      11:16:18,785 ERROR [stderr] (default task-25) Caused by: org.wildfly.security.auth.AuthenticationException: JBREM000308: Authentication failed (no mechanisms left), tried: 
      11:16:18,785 ERROR [stderr] (default task-25)    DIGEST-MD5: org.wildfly.security.auth.AuthenticationException: JBREM000304: Server rejected authentication
      11:16:18,785 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.ConnectionPeerIdentityContext.doAuthenticate(ConnectionPeerIdentityContext.java:369)
      11:16:18,785 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.ConnectionPeerIdentityContext.authenticate(ConnectionPeerIdentityContext.java:174)
      11:16:18,785 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:505)
      11:16:18,785 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:494)
      11:16:18,785 ERROR [stderr] (default task-25) 	at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:208)
      11:16:18,785 ERROR [stderr] (default task-25) 	at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.xnio.IoUtils$2.execute(IoUtils.java:71)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.xnio.AbstractIoFuture.runNotifier(AbstractIoFuture.java:693)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.xnio.AbstractIoFuture$CompleteState.withNotifier(AbstractIoFuture.java:132)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.xnio.AbstractIoFuture.addNotifier(AbstractIoFuture.java:570)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:494)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:122)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.lambda$getConnection$1(RemoteEJBReceiver.java:174)
      11:16:18,786 ERROR [stderr] (default task-25) 	at java.security.AccessController.doPrivileged(Native Method)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.getConnection(RemoteEJBReceiver.java:174)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.processInvocation(RemoteEJBReceiver.java:125)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:455)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocation(RemotingEJBClientInterceptor.java:51)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:87)
      11:16:18,786 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocation(NamingEJBClientInterceptor.java:64)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:76)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:467)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:303)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:161)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:100)
      11:16:18,787 ERROR [stderr] (default task-25) 	at com.sun.proxy.$Proxy56.sayHi(Unknown Source)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.wildfly.tutorial.ejb.ejb1.HelloWorldBean.lambda$sayHello$1(HelloWorldBean.java:68)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.wildfly.common.context.Contextual.runAction(Contextual.java:90)
      11:16:18,787 ERROR [stderr] (default task-25) 	at org.wildfly.tutorial.ejb.ejb1.HelloWorldBean.sayHello(HelloWorldBean.java:61)
      11:16:18,787 ERROR [stderr] (default task-25) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      11:16:18,787 ERROR [stderr] (default task-25) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      11:16:18,787 ERROR [stderr] (default task-25) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      11:16:18,787 ERROR [stderr] (default task-25) 	at java.lang.reflect.Method.invoke(Method.java:498)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,788 ERROR [stderr] (default task-25) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:332)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:240)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
      11:16:18,789 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
      11:16:18,790 ERROR [stderr] (default task-25) 	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:524)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:519)
      11:16:18,791 ERROR [stderr] (default task-25) 	at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:193)
      11:16:18,791 ERROR [stderr] (default task-25) 	... 3 more
      

      From a client POV the exception should be the same in every call:

      • to allow safer exception handling in client code
      • to avoid disclosure shared connection details

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  honza889 Jan Kalina
                  Reporter:
                  honza889 Jan Kalina
                  Tester:
                  Martin Svehla
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: