-
1. Re: Problem when publish MapMessage!
starksm64 Jun 5, 2005 10:38 AM (in response to jetsnail)Looks like you have out of date jboss-common.jar, or at least an out of date org.jboss.util.Primitives class in some jar visible to this test client.
-
2. Re: Problem when publish MapMessage!
jetsnail Jun 6, 2005 4:55 AM (in response to jetsnail)Hi Scott,
I am using Jboss 4.0.2 for the test. I think it is the latest version. I also check the org.jboss.util.Primitives class I used in my client, It's new one. The modify date for the class is 2005-5-2. I am really confused. Could you lend me a hand? Thanks! -
3. Re: Problem when publish MapMessage!
starksm64 Jun 8, 2005 1:15 PM (in response to jetsnail)The following unit test works fine for me. You need to track down the source of the invalid org.jboss.util.Primitives class in your classpath.
public void testMapMessage() throws Exception { log.info("+++ testMapMessage"); MapMessage sent = session.createMapMessage(); sent.setBoolean("Boolean", true); sent.setByte("Byte", (byte) 1); sent.setBytes("Bytes", "Bytes".getBytes()); sent.setChar("Char", 'c'); sent.setShort("Short", (short) 31415); sent.setInt("Int", 314159); sent.setLong("Long", 3141592653589793238L); sent.setDouble("Double", 3.1415926535897932384626433832795); sent.setFloat("Float", 3.141f); sent.setObject("Object", "31415926535897932384626433832795"); sent.setString("String", "31415926535897932384626433832795"); MapMessage recv = (MapMessage) sendRecMsg(sent); log.debug("recv: "+recv); assertTrue("Boolean == true", recv.getBoolean("Boolean") == true); assertTrue("Byte == 1", recv.getByte("Byte") == 1); assertTrue("Bytes == Bytes[]", Arrays.equals(recv.getBytes("Bytes"), "Bytes".getBytes())); assertTrue("Char == c", recv.getChar("Char") == 'c'); assertTrue("Short == 314159", recv.getShort("Short") == 31415); assertTrue("Int == 314159", recv.getInt("Int") == 314159); assertTrue("Long == 3141592653589793238L", recv.getLong("Long") == 3141592653589793238L); assertTrue("Double == 3.1415926535897932384626433832795", recv.getDouble("Double") == 3.1415926535897932384626433832795); assertTrue("Float == true", recv.getFloat("Float") == 3.141f); assertTrue("Object == 31415926535897932384626433832795", recv.getObject("Object").equals("31415926535897932384626433832795")); assertTrue("String == 31415926535897932384626433832795", recv.getString("String").equals("31415926535897932384626433832795")); }
-
4. Re: Problem when publish MapMessage!
jetsnail Jun 9, 2005 10:29 AM (in response to jetsnail)Hi Scott,
Thank you very much for your response. Finally it turned out that that was my mistake. Yes, you are right, old version of Primitives was used in my programm. the package was not added to CLASSPATH but defined in manifest of other jar file. So it was tricky to find.
Thanks for your concern again!!!