Question

I have created a project with tomee and I want to use stomp protocol to exchange messages between my web application and a client using ActiveMQ as MOM, but when i run tomee this exception appears :

Exception in thread "ActiveMQ Transport Server Thread Handler: stomp://0.0.0.0:61222" java.lang.NoClassDefFoundError: com/thoughtworks/xstream/io/HierarchicalStreamDriver at org.apache.activemq.transport.stomp.ProtocolConverter.(ProtocolConverter.java:116) at org.apache.activemq.transport.stomp.StompTransportFilter.(StompTransportFilter.java:54) at org.apache.activemq.transport.stomp.StompTransportFactory.compositeConfigure(StompTransportFactory.java:44) at org.apache.activemq.transport.TransportFactory.serverConfigure(TransportFactory.java:264) at org.apache.activemq.transport.stomp.StompTransportFactory.serverConfigure(StompTransportFactory.java:56) at org.apache.activemq.transport.tcp.TcpTransportServer.handleSocket(TcpTransportServer.java:420) at org.apache.activemq.transport.tcp.TcpTransportServer$1.run(TcpTransportServer.java:353) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.HierarchicalStreamDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Help me please !!

Was it helpful?

Solution

I have fixed this problem by configuring tomee-maven-plugin

<groupId>org.apache.openejb.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee-maven-plugin.version}</version>
<extensions>true</extensions>
    <configuration>
              ....
              <libs>
                 <lib>com.thoughtworks.xstream:xstream:${xstream-version}</lib>
              </libs>
....
</project>

Thank you for your interest

OTHER TIPS

TomEE doesn't come with STOMP so did you add the needed jar to tomee?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top