Seam JMS problems
pedrosena Feb 17, 2009 2:49 PMHi guys,
I'm having problems using Seam managed JMS connections and Jboss Messaging(similar problem with JbossMQ)
Here is my stacktrace:
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.jms.topicConnection at org.jboss.seam.Component.newInstance(Component.java:2066) at org.jboss.seam.Component.getInstance(Component.java:1948) at org.jboss.seam.Component.getInstance(Component.java:1910) at org.jboss.seam.Component.getInstance(Component.java:1904) at org.jboss.seam.Component.getInstance(Component.java:1884) at org.jboss.seam.Component.getInstance(Component.java:1879) at org.jboss.seam.jms.TopicConnection.instance(TopicConnection.java:75) at org.jboss.seam.jms.TopicSession.create(TopicSession.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138) at org.jboss.seam.Component.callComponentMethod(Component.java:2171) at org.jboss.seam.Component.callCreateMethod(Component.java:2094) at org.jboss.seam.Component.newInstance(Component.java:2054) ... 70 more Caused by: java.lang.ClassCastException: org.jboss.jms.client.JBossConnectionFactory cannot be cast to javax.jms.TopicConnectionFactory at org.jboss.seam.jms.TopicConnection.getTopicConnectionFactory(TopicConnection.java:64) at org.jboss.seam.jms.TopicConnection.init(TopicConnection.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138) at org.jboss.seam.Component.callComponentMethod(Component.java:2171) at org.jboss.seam.Component.callCreateMethod(Component.java:2094) at org.jboss.seam.Component.newInstance(Component.java:2054)
The main part is here:
java.lang.ClassCastException: org.jboss.jms.client.JBossConnectionFactory cannot be cast to javax.jms.TopicConnectionFactory
And my components.xml file:
<jms:queue-connection queue-connection-factory-jndi-name="/ConnectionFactory" /> <jms:topic-connection topic-connection-factory-jndi-name="/ConnectionFactory" /> <jms:managed-topic-publisher name="dataPublisher" auto-create="true" topic-jndi-name="topic/testTopic"/>
Any tips are appreciated.
Regards,
Pedro Sena