You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Leonardo K. Shikida" <sh...@gmail.com> on 2013/08/19 16:54:43 UTC

My favorite exception message

my favorite activeMQ error message :-)

java.lang.ClassCastException:
org.apache.activemq.command.ActiveMQObjectMessage incompatible with
org.apache.activemq.command.ActiveMQObjectMessage

how could they be compatible?

:-)

[]

Leo

Re: My favorite exception message

Posted by Anthony Fryer <ap...@hotmail.com>.
Leonardo K. Shikida wrote
> that's probably because I am running tomEE from inside eclipse, and its
> configuration is messing the class loading process

Running tomee inside eclipse "should" work exactly the same as outside
eclipse but you may need the right plugins depending on how you build
things.  First thing would be to check which jar files eclipse WTP is
publishing to the WEB-INF/lib folder in
.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\<your web
app>\WEB-INF\lib.  If the active mq lib is in there, then something is not
quite right with how eclipse wtp or your build is setup.

In the past i had issues when using maven to build my project with some
'provided' scoped jar files appearing in the WEB-INF/lib folder which were
resolved when i installed the m2e-wtp plugin.  Just mentioning that in case
you have a similar issue.  I now use eclipse with tomee everyday and WTP is
creating identical war files now to what a mvn clean install does, so i
completely trust it. m2e and m2e-wtp has improved massively over the past 18
months. 

Cheers,

Anthony




--
View this message in context: http://openejb.979440.n4.nabble.com/My-favorite-exception-message-tp4664726p4664736.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: My favorite exception message

Posted by "Leonardo K. Shikida" <sh...@gmail.com>.
oh, but that's the nice part. It's not (of course it is, but I can't see it
where yet) :-)

that's probably because I am running tomEE from inside eclipse, and its
configuration is messing the class loading process

and adding to this, I was serializing the messages before to JSON, so my
code was using

Enumeration<ActiveMQTextMessage> e = browser.getEnumeration();

instead of

Enumeration<ActiveMQObjectMessage> e = browser.getEnumeration();

and guess what. It was working ;-) [comparing strings seems to be safer
than comparing objects...]

this is some sort of funny, I guess ;-)

[]

Leo


[]

Leo


On Mon, Aug 19, 2013 at 11:56 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> different classloader
>
> don't put it in the webapp ;)
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/8/19 Leonardo K. Shikida <sh...@gmail.com>
>
> > my favorite activeMQ error message :-)
> >
> > java.lang.ClassCastException:
> > org.apache.activemq.command.ActiveMQObjectMessage incompatible with
> > org.apache.activemq.command.ActiveMQObjectMessage
> >
> > how could they be compatible?
> >
> > :-)
> >
> > []
> >
> > Leo
> >
>

Re: My favorite exception message

Posted by Romain Manni-Bucau <rm...@gmail.com>.
different classloader

don't put it in the webapp ;)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/8/19 Leonardo K. Shikida <sh...@gmail.com>

> my favorite activeMQ error message :-)
>
> java.lang.ClassCastException:
> org.apache.activemq.command.ActiveMQObjectMessage incompatible with
> org.apache.activemq.command.ActiveMQObjectMessage
>
> how could they be compatible?
>
> :-)
>
> []
>
> Leo
>

Re: My favorite exception message

Posted by Romain Manni-Bucau <rm...@gmail.com>.
different classloader

don't put it in the webapp ;)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/8/19 Leonardo K. Shikida <sh...@gmail.com>

> my favorite activeMQ error message :-)
>
> java.lang.ClassCastException:
> org.apache.activemq.command.ActiveMQObjectMessage incompatible with
> org.apache.activemq.command.ActiveMQObjectMessage
>
> how could they be compatible?
>
> :-)
>
> []
>
> Leo
>