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

    Client JMS Error

    Leonard Crowe Newbie

      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