4 Replies Latest reply on Oct 25, 2007 10:26 AM by Tim Fox

    Failed to download and/or install client side AOP stack

    Mr Dude Newbie

      Hello All,

      Some one must've hit this problem - seems like configuration issue. Here it goes.

      OS: WinXP
      Java: 1.6
      JBoss AS: 4.2.1 GA
      JBM: 1.4.0.GA

      When JMS over HTTPS is used locally (Clent and the server reside on the same machine) it works. When client is on another machine it fails and get the following error:

      java.lang.RuntimeException: Failed to download and/or install client side AOP stack
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:199)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
       at com.lmco.spv.jms.testers.JBossMessagingTester.main(JBossMessagingTester.java:49)
      Caused by: org.jboss.jms.exception.MessagingNetworkFailureException: Failed to connect client
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:304)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:228)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
       at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
       ... 3 more
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
       at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
       at org.jboss.remoting.Client.connect(Client.java:441)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:300)
       ... 7 more
      Caused by: java.lang.NullPointerException
       at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:144)
       at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:46)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.<init>(HTTPClientInvoker.java:105)
       at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.<init>(HTTPSClientInvoker.java:63)
       at org.jboss.remoting.transport.https.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
       ... 15 more
      Failed to download and/or install client side AOP stack
      org.jboss.jms.exception.MessagingNetworkFailureException: Failed to connect client
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:304)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:228)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
       at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
       at com.lmco.spv.jms.testers.JBossMessagingTester.main(JBossMessagingTester.java:49)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
       at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
       at org.jboss.remoting.Client.connect(Client.java:441)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createClient(ClientConnectionFactoryDelegate.java:300)
       ... 7 more
      Caused by: java.lang.NullPointerException
       at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:144)
       at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:46)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.<init>(HTTPClientInvoker.java:105)
       at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.<init>(HTTPSClientInvoker.java:63)
       at org.jboss.remoting.transport.https.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
       ... 15 more
      



      The test code is as follows:
      package com.spv.jms.testers;
      
       import java.util.Properties;
       import javax.naming.Context;
       import javax.naming.InitialContext;
       import javax.jms.*;
      
      
       public class JBossMessagingTester
       {
      
       public static void main(String args[]) throws Exception
       {
       Properties env = new Properties();
       env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
       env.setProperty(Context.PROVIDER_URL, "https://mtngt4fv1:443/invoker/JNDIFactorySSL");
      
      
       Connection conn = null;
      
       try {
      
       Context ctx = new InitialContext(env);
       System.out.println("Created InitialContext, env= " + env);
      
       //looking up JMS connection factory over HTTPs
       ConnectionFactory connectionFactory = (ConnectionFactory)ctx.lookup("HTTPSConnectionFactory");
       System.out.println("connectionFactory= " + connectionFactory.toString());
      
       Destination queue = (Destination)ctx.lookup("queue/A");
      
       conn = connectionFactory.createConnection();
      
       Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
      
       MessageProducer producer = session.createProducer(queue);
      
       Message m = session.createTextMessage(new String("wazzaaa??!"));
      
       producer.send(m);
      
      
       }catch(Exception e){
       e.printStackTrace();
      
       }finally{
       if(conn != null)
       conn.close();
       }
       }
       }
      


      This thread talks about it but didn't quite work for moi.
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116748

      Any help in this matter immensely appreciated.

      Thanks

        • 1. Re: Failed to download and/or install client side AOP stack
          Mr Dude Newbie

          Paging all my favorite forum people....

          I thought it could be some unusual setup with the AS version, so I bumped up my AS to 4.2.2 GA and painstakingly configured JBM.1.4.GA to work with it.

          Alas!

          Same prob persist...

          DEBUG 16:13:25 (org.jboss.remoting.MicroRemoteClientInvoker.java:240) org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker@10f41e9 connecting
          DEBUG 16:13:25 (org.jboss.remoting.MicroRemoteClientInvoker.java:245) org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker@10f41e9 connected
          DEBUG 16:13:46 (org.jboss.remoting.transport.http.HTTPClientInvoker.java:332) Error invoking http client invoker.
          java.net.ConnectException: Connection timed out: connect
           at java.net.PlainSocketImpl.socketConnect(Native Method)
           at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
           at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
           at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
           at java.net.Socket.connect(Socket.java:518)
           at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
           at sun.net.www.http.HttpClient.openServer(HttpClient.java:389)
           at sun.net.www.http.HttpClient.openServer(HttpClient.java:516)
           at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:271)
           at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:328)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
           at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
           at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
           at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
           at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:275)
           at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
           at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
           at org.jboss.remoting.Client.invoke(Client.java:1634)
           at org.jboss.remoting.Client.invoke(Client.java:548)
           at org.jboss.remoting.Client.invoke(Client.java:536)
           at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:186)
           at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:157)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:233)
           at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
           at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
           at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
           at org.jboss.jms.client.JBossConnectionFactory.createTopicConnection(JBossConnectionFactory.java:115)
           at org.jboss.jms.client.JBossConnectionFactory.createTopicConnection(JBossConnectionFactory.java:109)
           at com.lmco.spv.jms.topic.AbstractTopic.setupTopicConnection(AbstractTopic.java:98)
           at com.lmco.spv.jms.topic.AbstractTopic.<init>(AbstractTopic.java:68)
           at com.lmco.spv.jms.topic.jndi.COTXMLMessageTopic.<init>(COTXMLMessageTopic.java:56)
           at com.lmco.spv.jms.topic.reporter.TopicChangeReporter.initializeTopics(TopicChangeReporter.java:125)
           at com.lmco.spv.jms.topic.reporter.TopicChangeReporter.initialize(TopicChangeReporter.java:67)
           at com.lmco.spv.jms.topic.reporter.TopicChangeReporter.<init>(TopicChangeReporter.java:43)
           at com.lmco.spv.jms.topic.reporter.TopicChangeReporter.getInstance(TopicChangeReporter.java:53)
           at com.lmco.spv.aislive.client.AISClientSocketManager.initialize(AISClientSocketManager.java:109)
           at com.lmco.spv.aislive.client.AISClientSocketManager.<init>(AISClientSocketManager.java:104)
           at com.lmco.spv.aislive.client.AISClientSocketManager.main(AISClientSocketManager.java:453)
          ERROR 16:13:46 (org.jboss.jms.client.JBossConnectionFactory.java:198) Failed to download and/or install client side AOP stack
          org.jboss.jms.exception.MessagingNetworkFailureException
           at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:221)



          Ahhhhhh! %&*# this *%$^$.
          I quit! Just kidding.

          But if any one have any idea about this - kindly post.

          • 2. Re: Failed to download and/or install client side AOP stack
            Tim Fox Master

            Please post your HTTPSConnectionFactory config.

            • 3. Re: Failed to download and/or install client side AOP stack
              Mr Dude Newbie

              Tim,

              Following is the config part for HTTPS from both remoting-https-service.xml and connection-factories-service.xml files.

              I think I figured out what is going on though. For MQ only SSL port (443) was used for all the JMS communication between client and server. I see that for JBM it uses one more port other than regular SSL port, 9443 in this case as configured in remoting-https-service.xml. Furthermore, in my case - the server machine only has 443 open and all the other ports are blocked (the network folks gives me the "hairy eyeball" treatment for requesting to open any other port). They ask why can't you configure it so that all the comm takes place using just port 443.

              So Tim, considering the above, what do you recommend? Is it possible to configure the server so that it uses only port 443? BTW I tried changing the bind port in the "remoting-https-service.xml" to 443, but as expected, the server complained at startup that the port is already occupied etc...

              Thanks for your help in advance.

              connection-factories-service.xml

              <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
               name="jboss.messaging.connectionfactory:service=HTTPSConnectionFactory"
               xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
               <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
               <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=https</depends>
               <depends>jboss.messaging:service=PostOffice</depends>
              
               <attribute name="JNDIBindings">
               <bindings>
               <binding>/HTTPSConnectionFactory</binding>
               <binding>/XAHTTPSConnectionFactory</binding>
               <binding>java:/HTTPSConnectionFactory</binding>
               <binding>java:/XAHTTPSConnectionFactory</binding>
               </bindings>
               </attribute>
               </mbean>



              remoting-https-service.xml
              <server>
              
               <!-- Standard bisocket connector - the bisocket transport only opens connection from client->server
               so can be used with firewalls where only outgoing connections are allowed.
               For examples of HTTP and SSL transports see docs/examples -->
              
               <mbean code="org.jboss.remoting.transport.Connector"
               name="jboss.messaging:service=Connector,transport=https"
               display-name="HTTPS transport Connector">
              
               <attribute name="Configuration">
               <config>
               <invoker transport="https">
               <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
               <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
               <attribute name="dataType" isParam="true">jms</attribute>
               <attribute name="leasePeriod">10000</attribute>
               <attribute name="socket.check_connection" isParam="true">false</attribute>
               <attribute name="callbackStore">org.jboss.remoting.callback.BlockingCallbackStore</attribute>
               <attribute name="callbackPollPeriod" isParam="true">102</attribute>
               <attribute name="clientLeasePeriod" isParam="true">20000</attribute>
               <attribute name="serverSocketFactory">jboss.messaging:service=ServerSocketFactory,type=SSL</attribute>
               <attribute name="SSLImplementation">org.jboss.remoting.transport.coyote.ssl.RemotingSSLImplementation</attribute>
               <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
               <attribute name="serverBindPort">9443</attribute>
               </invoker>
               <handlers>
               <!--
               <handler subsystem="web">org.jboss.remoting.samples.http.WebInvocationHandler</handler>
              
               <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
               -->
               <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
               </handlers>
               </config>
               </attribute>
               <!-- This depends is included because need to make sure this mbean is running before configure invoker. -->
               <depends>jboss.messaging:service=ServerSocketFactory,type=SSL</depends>
               </mbean>
              
              </server>


              • 4. Re: Failed to download and/or install client side AOP stack
                Tim Fox Master

                This is really a JBoss Remoting question, not a JBM question.

                I can ping Ron to take a look, or you can repost on the remoting forum.