Hi,
I'd like to make a J2SE client connecting to queue on clustered jboss jms server (jboss 5.1).
I'm getting the following Exception while doing lookup in initial context:
log |
---|
Jan 7, 2010 3:27:15 PM manual.Main main INFO: LOOKUP Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: jnp://192.168.107.10:1100,192.168.107.10:1300 and discovery failed with error: javax.naming.CommunicationException: Failed to retrieve stub from server /192.168.107.10:1100 [Root exception is java.io.StreamCorruptedException: unexpected block data] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server /192.168.107.10:1300 [Root exception is java.io.StreamCorruptedException: unexpected block data]] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686) at javax.naming.InitialContext.lookup(InitialContext.java:392) at manual.Main.main(Main.java:85) Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server /192.168.107.10:1300 [Root exception is java.io.StreamCorruptedException: unexpected block data] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:327) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734) ... 4 more Caused by: java.io.StreamCorruptedException: unexpected block data at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1343) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.rmi.MarshalledObject.get(MarshalledObject.java:142) at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:314) ... 5 more |
The servers are binded to 192.168.107.10:1100 and 192.168.107.10:1300 (this is dev-enviroment with two nodes running on one machine).
I'm using followin J2SE code to connect: http://pastebin.com/m1c44cd78
What is wrong?