[jboss-user] [JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object

2009-02-04 Thread mvec...@redhat.com
How are you redeploying the application? Do you have it unpacked or in a archive? Nevertheless, this is probably worth a JIRA bug... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206926#4206926 Reply to the post : http://www.jboss.com/index.html?module=bb&o

[jboss-user] [JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object

2009-02-03 Thread mvec...@redhat.com
Oh, I'm sorry, you have to write message.getClass() View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206522#4206522 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206522 ___ jb

[jboss-user] [JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object

2009-02-03 Thread mvec...@redhat.com
Put that code before any typecasting and as I wrote - do not change message in the second line for anything else. The code can be placed immediately after if (message instanceof ObjectMessage)... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206465#4206465

[jboss-user] [JBoss Messaging] - Re: ClassCastException when casting ObjectMessage object

2009-02-02 Thread mvec...@redhat.com
I'd suspect some class loaders issue. First you can check where are the classes loaded from and what class loaders were used in your onMessage method: System.out.println(CustomMessageBean.class.getClassLoader().toString() + " " + CustomMessageBean.class.getProtectionDomain().getCodeSource().getLo