Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4188

Client Mapping expressions are allowed but are not resolved if used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.0.0.Beta1
    • 8.2.0.Final, 9.0.0.Alpha1
    • Clustering
    • None
    • Hide

      Use the ejb-remote quickstart and add @Clustered annotation or use the jboss-ejb3.xml DD to add the clustered flag.

      Change the socket-binding-group:
      <socket-binding name="http" port="${jboss.http.port:8080}">
      <client-mapping destination-address="${jboss.node.name}" destination-port="8080"/>
      </socket-binding>

      Start the server and deploy the ejb-remote app.
      => If the port=8080 is changed to an expression the start will fail

      change the jboss-ejb-client.properties if needed
      Start the client

      Show
      Use the ejb-remote quickstart and add @Clustered annotation or use the jboss-ejb3.xml DD to add the clustered flag. Change the socket-binding-group: <socket-binding name="http" port="${jboss.http.port:8080}"> <client-mapping destination-address="${jboss.node.name}" destination-port="8080"/> </socket-binding> Start the server and deploy the ejb-remote app. => If the port=8080 is changed to an expression the start will fail change the jboss-ejb-client.properties if needed Start the client

    Description

      If socket binding with client-mapping is used to provide a valid client address for EJB invocation to the client the expressions are not resolved.
      Depend on the attribute the parsing failed direct during startup (port# is not numeric) or the expression is send to the client where the Exception is thrown at runtime.

      Notice for EJB invocation the problem is only visible if the application is clustered, otherwise the cluster view (where the client-mapping take effect) is not send to the client.

      Dec 17, 2014 2:53:43 PM org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager getEJBReceiver
      INFO: Could not create a connection for cluster node ClusterNode{clusterName='ejb', nodeName='redhat', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='${jboss.node.name}', destinationPort=8080}], resolvedDestination=[Destination address=${jboss.node.name}, destination port=8080]} in cluster ejb
      java.lang.RuntimeException: java.io.IOException: java.net.URISyntaxException: Illegal character in authority at index 7: http://@${jboss.node.name}:8080/?#
      at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:92)
      at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:77)
      at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
      at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:79)
      at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:405)
      at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:379)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: java.net.URISyntaxException: Illegal character in authority at index 7: http://@${jboss.node.name}:8080/?#
      at org.jboss.remoting3.remote.HttpUpgradeConnectionProvider.createConnection(HttpUpgradeConnectionProvider.java:102)
      at org.jboss.remoting3.remote.RemoteConnectionProvider.connect(RemoteConnectionProvider.java:215)
      at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:298)
      at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:388)
      at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:153)
      at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:133)
      at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:75)
      at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
      at org.jboss.ejb.client.remoting.RemotingConnectionClusterNodeManager.getEJBReceiver(RemotingConnectionClusterNodeManager.java:79)
      at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:405)
      at org.jboss.ejb.client.ClusterContext$EJBReceiverAssociationTask.call(ClusterContext.java:379)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      at ...asynchronous invocation...(Unknown Source)
      at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)
      at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:388)
      at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:153)
      at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:133)
      at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:75)
      ... 8 more
      Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: http://@${jboss.node.name}:8080/?#
      at java.net.URI$Parser.fail(URI.java:2829)
      at java.net.URI$Parser.parseAuthority(URI.java:3167)
      at java.net.URI$Parser.parseHierarchical(URI.java:3078)
      at java.net.URI$Parser.parse(URI.java:3034)
      at java.net.URI.<init>(URI.java:680)
      at org.jboss.remoting3.remote.HttpUpgradeConnectionProvider.createConnection(HttpUpgradeConnectionProvider.java:100)
      at org.jboss.remoting3.remote.RemoteConnectionProvider.connect(RemoteConnectionProvider.java:215)
      at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:298)
      ... 12 more

      Attachments

        Activity

          People

            chaowan@redhat.com Chao Wang
            rhn-support-wfink Wolf Fink
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: