Announcement Announcement Module
Collapse
No announcement yet.
Jboss messaging with Tomcat Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jboss messaging with Tomcat

    Hi All,

    I am trying to connect to my queue which is defined inside my jboss app server. I am using jboss-messaging.

    To publish message to queue I am using spring jmstemplate. Here is the exception which I am getting.

    Here is the list of jars which I have in my webapp which tries to connect to my queue.
    javaassist.jar
    jbossall-client.jar
    jboss-messaging-client.jar
    jboss-remoting.jar
    jboss-aop-jdk50.jar
    spring.jar

    I ran a sample example from jboss-messaging and it work fine. Any idea what I am missing

    Code:
    aused by: java.lang.NoSuchMethodError: javassist.scopedpool.ScopedClassPool.<init>(Ljava/lang/ClassLoader;Ljavassist/ClassPool;Ljavassist/scopedpool/ScopedClassPoolRepository;Z)V
    	at org.jboss.aop.classpool.AOPClassPool.<init>(AOPClassPool.java:66)
    	at org.jboss.aop.classpool.AOPClassPool.<init>(AOPClassPool.java:56)
    	at org.jboss.aop.classpool.AOPClassPoolFactory.create(AOPClassPoolFactory.java:40)
    	at javassist.scopedpool.ScopedClassPoolRepositoryImpl.createScopedClassPool(ScopedClassPoolRepositoryImpl.java:99)
    	at javassist.scopedpool.ScopedClassPoolRepositoryImpl.registerClassLoader(ScopedClassPoolRepositoryImpl.java:125)
    	at org.jboss.aop.classpool.AOPClassPoolRepository.registerClassLoader(AOPClassPoolRepository.java:129)
    	at org.jboss.aop.AspectManager.registerClassLoader(AspectManager.java:657)
    	at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:270)
    	at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
    	at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
    	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.<clinit>(ClientConnectionFactoryDelegate.java)
    	at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    	at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
    	at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
    	at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
    	at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
    	at java.lang.reflect.Field.getLong(Field.java:527)
    	at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1559)
    	at java.io.ObjectStreamClass.access$600(ObjectStreamClass.java:47)
    	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:381)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373)
    	at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268)
    	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:504)
    	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
    	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
    	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    	at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
    	at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    	at javax.naming.InitialContext.lookup(InitialContext.java:351)
    	at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
    	at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
    	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
    	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
    	at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
    	at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
    	at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200)
    	at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
    	... 39 more

  • #2
    I make a same error but not in Spring , I have Web client on Tomcat container send mesage to JMS and mdb on jboss server connect to same destination to receive message
    Originally posted by springnewbie View Post
    Hi All,

    I am trying to connect to my queue which is defined inside my jboss app server. I am using jboss-messaging.

    To publish message to queue I am using spring jmstemplate. Here is the exception which I am getting.

    Here is the list of jars which I have in my webapp which tries to connect to my queue.
    javaassist.jar
    jbossall-client.jar
    jboss-messaging-client.jar
    jboss-remoting.jar
    jboss-aop-jdk50.jar
    spring.jar

    I ran a sample example from jboss-messaging and it work fine. Any idea what I am missing

    Code:
    aused by: java.lang.NoSuchMethodError: javassist.scopedpool.ScopedClassPool.<init>(Ljava/lang/ClassLoader;Ljavassist/ClassPool;Ljavassist/scopedpool/ScopedClassPoolRepository;Z)V
    	at org.jboss.aop.classpool.AOPClassPool.<init>(AOPClassPool.java:66)
    	at org.jboss.aop.classpool.AOPClassPool.<init>(AOPClassPool.java:56)
    	at org.jboss.aop.classpool.AOPClassPoolFactory.create(AOPClassPoolFactory.java:40)
    	at javassist.scopedpool.ScopedClassPoolRepositoryImpl.createScopedClassPool(ScopedClassPoolRepositoryImpl.java:99)
    	at javassist.scopedpool.ScopedClassPoolRepositoryImpl.registerClassLoader(ScopedClassPoolRepositoryImpl.java:125)
    	at org.jboss.aop.classpool.AOPClassPoolRepository.registerClassLoader(AOPClassPoolRepository.java:129)
    	at org.jboss.aop.AspectManager.registerClassLoader(AspectManager.java:657)
    	at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:270)
    	at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
    	at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
    	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.<clinit>(ClientConnectionFactoryDelegate.java)
    	at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    	at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
    	at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
    	at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
    	at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
    	at java.lang.reflect.Field.getLong(Field.java:527)
    	at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1559)
    	at java.io.ObjectStreamClass.access$600(ObjectStreamClass.java:47)
    	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:381)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373)
    	at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268)
    	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:504)
    	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
    	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
    	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
    	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
    	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    	at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
    	at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    	at javax.naming.InitialContext.lookup(InitialContext.java:351)
    	at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
    	at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
    	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
    	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
    	at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
    	at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
    	at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:200)
    	at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:186)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1368)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
    	... 39 more

    Comment

    Working...
    X