0 Replies Latest reply on Apr 4, 2017 9:55 AM by vaughanb

    JBoss JMS Problem -  javax.naming.NameNotFoundException: jboss not bound

    vaughanb

      I have been making changes to a Java application server in that we are now implementing Weblogic JMS queues and have encountered the error shown below when attempting to run a Java server compiled into a .war file and hosted by JBoss version 4.02.

       

      I am using Java Version 1.7.0 for both JBoss and the Eclipse IDE. (I mention Eclipse's involvement further down.).

       

      I am also working in a Windows environment with JBoss and Eclipse both running in the Windows environment.

       

      Unfortunately I am constrained to use JBoss 4.02 as it is used by our client.

       

      Strangely when I run the server using Eclipse IDE everything works as expected and the message is received by the Weblogic Queue server. However when I package the exact same code into a war file for JBoss to host, I get the below error. I have also attached the relevant portions of the source code and the stack trace below the error shown below.

       

      The below error occurs when I use the exact same QueueConnectionFactory lookup "jms/TestConnectionFactory", which worked in Eclipse

       

      com.sun.corba.se.impl.encoding.CodeSetConversion$JavaBTCConverter getChars

      WARNING: "IOP02410206: (DATA_CONVERSION) Invalid unicode pair detected during code set conversion"

      org.omg.CORBA.DATA_CONVERSION:   vmcid: SUN  minor code: 206  completed: No

       

      Based on what I have read so far there may be some configuring required within JBoss itself for this to work.  I have done some research and tried other QueueConnectionFactory lookups, such as "java:jboss/exported/jms/TestConnectionFactory", which produces the error "javax.naming.NameNotFoundException: jboss not bound".

       

      Below is a portion of my code directly related in producing the "WARNING: "IOP02410206: (DATA_CONVERSION) Invalid unicode pair detected during code set conversion" error.

       

      To produce the second error the line "QueueConnectionFactory qFactory = (QueueConnectionFactory) lContext.lookup("jms/TestConnectionFactory");" changes to "QueueConnectionFactory qFactory = (QueueConnectionFactory) lContext.lookup("java:jboss/exported/jms/TestConnectionFactory");"  

       

      String hostName = HOST;

          int port = PORT;

          String queueName = QUEUE_NAME;

       

       

          queueName = "jms/TestJMSQueue";

          QueueConnection conn = null;

          try {

       

              Context lContext = getInitialContext(hostName,Integer.toString(port));

              QueueConnectionFactory qFactory = (QueueConnectionFactory) lContext.lookup("jms/TestConnectionFactory");    

       

              conn = qFactory.createQueueConnection();

       

      private Context getInitialContext(String pHost, String pPort) throws NamingException {

       

          Properties lPropertyList = new Properties();

       

          lPropertyList.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");

       

          String lUrlAndPort = "t3://" + pHost + ":" + pPort;

          lPropertyList.put(Context.PROVIDER_URL,lUrlAndPort);

          InitialContext lInitialContext = new InitialContext(lPropertyList);

       

          return lInitialContext;

      }

       

      As mentioned above, the above code runs fine through Eclipse, but not through JBoss as mentioned.

       

      The stacktrace for the "WARNING: "IOP02410206: (DATA_CONVERSION) Invalid unicode pair detected" error:

       

      com.sun.corba.se.impl.encoding.CodeSetConversion$JavaBTCConverter getChars

      WARNING: "IOP02410206: (DATA_CONVERSION) Invalid unicode pair detected     during code set conversion"

      org.omg.CORBA.DATA_CONVERSION:   vmcid: SUN  minor code: 206  completed: No

          at com.sun.corba.se.impl.logging.ORBUtilSystemException.badUnicodePair(ORBUtilSystemException.java:2805)

      at com.sun.corba.se.impl.logging.ORBUtilSystemException.badUnicodePair(ORBUtilSystemException.java:2823)

      at com.sun.corba.se.impl.encoding.CodeSetConversion$JavaBTCConverter.getChars(CodeSetConversion.java:388)

      at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.getConvertedChars(CDRInputStream_1_0.java:2273)

      at com.sun.corba.se.impl.encoding.CDRInputStream_1_2.read_wstring(CDRInputStream_1_2.java:140)

      at com.sun.corba.se.impl.encoding.CDRInputStream.read_wstring(CDRInputStream.java:179)

      at com.sun.corba.se.impl.io.IIOPInputStream.internalReadUTF(IIOPInputStream.java:902)

      at com.sun.corba.se.impl.io.IIOPInputStream.readUTF(IIOPInputStream.java:909)

      at weblogic.messaging.dispatcher.DispatcherUtils.readVersionedPartitionInfo(DispatcherUtils.java:179)

      at weblogic.messaging.dispatcher.DispatcherWrapper.readExternal(DispatcherWrapper.java:236)

      at weblogic.jms.client.JMSConnection.readExternal(JMSConnection.java:2478)

      at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1034)

      at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)

      at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:333)

      at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:299)

      at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1050)

      at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)

      at weblogic.jms.frontend._FEConnectionFactoryRemote_Stub.connectionCreateRequest(_FEConnectionFactoryRemote_Stub.java:92)

      at weblogic.jms.client.JMSConnectionFactory.createConnection(JMSConnectionFactory.java:411)

      at weblogic.jms.client.JMSConnectionFactory.setupJMSConnection(JMSConnectionFactory.java:297)

      This is the line where my line of code (as above) is mentioned.

       

      And the stacktrace for the "javax.naming.NameNotFoundException: jboss not bound" error:

       

      avax.naming.NameNotFoundException: jboss not bound

        at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)

        at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)

        at org.jnp.server.NamingServer.getObject(NamingServer.java:505)

        at org.jnp.server.NamingServer.lookup(NamingServer.java:249)

        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)

        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)

        at javax.naming.InitialContext.lookup(InitialContext.java:411)

      This is the line where my line of code (as above) is mentioned.

       

      If any further details are required, I will gladly supply them.

       

      Any assistance in this matter would be greatly appreciated.