2 Replies Latest reply on Sep 21, 2009 8:01 AM by Tom Fennelly

    Error in client connection with JBOSS ESB socket listener

    Gowrishubha NM Newbie

      In my project, I need to have JBR-SOCKET listeners in JBOSS ESB. I have written a client program to make the connection to send the messages. I have given my program in the tag and also I have provided the JBOSS-ESB.xml

      When I try to deploy the following code, immediately I am getting following errors in JBOSS server window

      If I am using org.jboss.remoting.Client, then I am not getting these errors. can anyone help me on this to find out the problem?

      Thanks
      Gowri


      package org.jboss.soa.esb.samples.quickstart.tcpgateway.test;
      
      import java.io.*;
      import java.net.*;
      
      public class TcpClient
      {
      
      
       public static void main(String args[])
       {
       //final String host = args[0];
       final int port = Integer.parseInt(args[0]);
       final String payload = args[1];
      
       Socket requestSocket = null;
       ObjectOutputStream out = null;
       ObjectInputStream in = null;
      
      
      
       try
       {
       requestSocket = new Socket("localhost", port);
       System.out.println("Connected to localhost in port");
       //2. get Input and Output streams
       /*out = new ObjectOutputStream(requestSocket.getOutputStream());
       out.flush();
       out.writeObject(payload);
       out.flush();*/
      
       }
       catch (UnknownHostException e)
       {
       e.printStackTrace();
      
       }
       catch (IOException e)
       {
       e.printStackTrace();
      
       }
       finally
       {
       try {
       // out.close();
       requestSocket.close();
       }
       catch (IOException e)
       {
       e.printStackTrace();
      
       }
      
       }
       }
      
      
      





      JBOSS - ESB.xml
      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
      <providers>
      <jbr-provider name="JBR-Socket" protocol="socket" host="localhost">
      <jbr-bus busid="Socket-1" port="8888" />
      </jbr-provider>
      </providers>

      <services>

      <service category="TcpServiceCategory" name="Service1" description="Sample service for SocketGateway quickstart" invmScope="GLOBAL">

      <listeners>
      <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true"/>
      </listeners>

      <actions >
      <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
      <property name="message"
      value="[Quickstart_webservice_producer] AFTER invoking jbossws endpoint"/>
      </action>
      <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>

      </actions>

      </service>

      </services>

      </jbossesb>

      <Error>
      Error
      14:26:29,596 INFO [JDBCDataStore] Generated token 'authToken:7E288DC0-A10C-11DE
      -A0AF-D381BB3BAD52' for user: 'jbossesb/JBoss ESB User'
      14:26:29,627 INFO [DeleteBindingFunction] Publisher 'jbossesb' deleted BindingT
      emplate with key: 35436E10-A10A-11DE-A0AF-A8AD155AB993
      14:26:29,659 INFO [JBossRemotingGatewayListener] JBoss Remoting Gateway listene
      r 'listener' stopped.
      14:26:29,706 WARN [ServiceMessageCounterLifecycleResource] Calling cleanup on e
      xisting service message counters for identity ID-9
      14:27:39,731 INFO [JBoss4ESBDeployer] create esb service, Quickstart_socket_gat
      eway.esb
      14:27:39,762 WARN [ServiceController] Problem starting service jboss.esb:deploy
      ment=Quickstart_socket_gateway.esb
      org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected erro
      r during registration for epr InVMEpr [ PortReference < <wsa:Address invm://5463
      705365727669636543617465676f72792424242424242424242424245365727669636531/false?f
      alse#10000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/> > ]
      at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise
      (MessageAwareListener.java:205)
      at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initia
      lise(AbstractManagedLifecycle.java:134)
      at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.init
      ialiseInstances(ManagedLifecycleController.java:105)


      </Error>