2 Replies Latest reply on Jan 30, 2002 3:11 PM by lcrowe

    Client JMS Error

    lcrowe

      I'm running JBoss 2.4.4 and Tomcat 4.0.1 and I'm having a problem getting a JMS client to correctly connect and publish to a message queue. I have three different environments and everything works fine in two of the three... Unfortunately the one that does not work is production!!! I'm running a simple batch job that queries that database for items that need to be closed and publishing notification events to the queue. Like I said in development (win2k) and test Solaris 5.7 this works fine but in production also Solaris 5.7 I get the following error:

      javax.naming.CommunicationException. Root exception is java.io.StreamCorruptedException: Type code out of range, is 125
      at java.io.ObjectInputStream.peekCode(ObjectInputStream.java, Compiled Code)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled Code)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled Code)
      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java, Compiled Code)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled Code)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled Code)
      at java.rmi.MarshalledObject.get(MarshalledObject.java, Compiled Code)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java, Compiled Code)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java, Compiled Code)
      at javax.naming.InitialContext.lookup(InitialContext.java, Compiled Code)
      at com.momentx.shared.messaging.client.MatrixEvent.publish(MatrixEvent.java, Compiled Code)
      at com.momentx.shared.messaging.client.MatrixEvent.send(MatrixEvent.java, Compiled Code)
      at com.momentx.matrix.scheduled.CreateCheeseSellCloseWarningEvents.main(CreateCheeseSellCloseWarningEvents.java, Compiled Code)

      Because of another app server running on the same box I had to change some of the ports from the defaults as below:

      jndi from 1099 to 11099
      rmi from 4444 to 14444

      I've done this also in the other two environments. My jndi.properties file that my client uses looks like this:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=localhost:11099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      I'm assuming that sense I had to change the rmi port on the server that I also need to change it for the client but I have not found anything in the documentation that tells me how to do this.

      Any insite as to where to look next would be appreciated.

      Leonard



        • 1. Re: Client JMS Error
          ppetit

          Hi,
          Not sure... but perhaps you should check validity of those port numbers at the system configuration level (see your Solaris administrator).

          Philippe

          • 2. Re: Client JMS Error
            lcrowe

            I finally figured out what the problem was and I'm ashamed to say that it was an environment configuration problem. The path that was being used to run the client application had java 1.2.2 before java 1.3.1 so the client was running in a 1.2 JVM trying to pass the object to the 1.3.1 JVM.