Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11211

EJB client applications need an obsolete jboss-ejb-client.properties file for programmatic authentication context to work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • None
    • 7.1.0.DR19
    • EJB
    • User Experience
    • Hide

      1. Checkout https://github.com/jmartisk/mock-artifacts/tree/master/ejbclient/eap7.1-authentication-context-unsecured and deploy the server project as described.
      2. Run the client application as described - this will work since the ejb-client.properties file has a connection with host:port defined.
      3. Comment the following lines in ${MOCK_ARTIFACTS}/ejbclient/eap7.1-authentication-context-unsecured/client/src/main/resources/ejb-client.properties file (or just remove it):

      remote.connections=default
      
      remote.connection.default.host=127.0.0.1
      remote.connection.default.port=8080
      

      4. Rerun, get an error.

      Show
      1. Checkout https://github.com/jmartisk/mock-artifacts/tree/master/ejbclient/eap7.1-authentication-context-unsecured and deploy the server project as described. 2. Run the client application as described - this will work since the ejb-client.properties file has a connection with host:port defined. 3. Comment the following lines in ${MOCK_ARTIFACTS}/ejbclient/eap7.1-authentication-context-unsecured/client/src/main/resources/ejb-client.properties file (or just remove it): remote.connections= default remote.connection. default .host=127.0.0.1 remote.connection. default .port=8080 4. Rerun, get an error.

      Programmating AuthenticationContext provides a way to specify remote address to connect to. This works, however, an ejb-client.properties file with a connection and its address must be defined (even if it is disregarded), otherwise the following exception is produced:

      13:56:27,238 INFO  [org.wildfly.security.Version:57] ELY00001: WildFly Elytron version 1.1.0.Beta47-redhat-1
      13:56:27,252 INFO  [org.wildfly.naming.client.Version:61] WildFly Naming version 1.0.0.Beta15-redhat-1
      13:56:27,292 INFO  [org.jboss.ejb.client.EJBClient:52] JBoss EJB Client version 4.0.0.Beta30-redhat-1
      13:56:27,333 INFO  [org.jboss.ejb.client.legacy.LegacyPropertiesConfiguration:42] EJBCLIENT000072: Using legacy jboss-ejb-client.properties EJB client configuration
      13:56:27,367 INFO  [org.xnio.Xnio:95] XNIO version 3.5.0.Beta6-redhat-1
      13:56:27,373 INFO  [org.xnio.nio.NioXnio:57] XNIO NIO Implementation Version 3.5.0.Beta6-redhat-1
      13:56:27,425 INFO  [org.jboss.ejb.client.legacy.RemotingLegacyConfiguration:49] EJBCLIENT000070: Using legacy jboss-ejb-client.properties Remoting configuration
      13:56:27,435 INFO  [org.jboss.remoting3.EndpointImpl:101] JBoss Remoting version 5.0.0.Beta24-redhat-1
      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000024: Not able to find EJB matching "StatelessEJBLocator for "/server/HelloBean", view is interface ejb.HelloBeanRemote, affinity is None"
      	at org.jboss.ejb.client.EJBClientContext.discoverAffinityNone(EJBClientContext.java:719)
      	at org.jboss.ejb.client.EJBClientContext.performLocatedAction(EJBClientContext.java:701)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:162)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
      	at com.sun.proxy.$Proxy0.hello(Unknown Source)
      	at client.Client.main(Client.java:33)
      

              dlloyd@redhat.com David Lloyd
              mjurc@redhat.com Michal Jurc
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: