Outbound JMS: NoSuchMethodError: Geronimo's GenericConnectionManager.<init>

View: New views
5 Messages — Rating Filter:   Alert me  

Outbound JMS: NoSuchMethodError: Geronimo's GenericConnectionManager.<init>

by James Adams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have set up my application for Outbound JMS with Jencks 2.0 but I am getting a NoSuchMethodError with the Geronimo GenericConnectionManager when Spring tries to instantiate the connectionManager bean.  Following the exception stack trace is the Spring configuration file.  Can anyone advise me as to what the problem might be?

--James


###### Exception Stack Trace ######
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnectionFactory' defined in class path resource [jencks-example-jms-context.xml]: Ca
nnot resolve reference to bean 'connectionManager' while setting bean property 'connectionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with na
me 'connectionManager': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/
geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontra
cking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionManager': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchM
ethodError: org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outboun
d/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
Caused by: java.lang.NoSuchMethodError: org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apach
e/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;L
java/lang/ClassLoader;)V
        at org.jencks.factory.ConnectionManagerFactoryBean.getObject(ConnectionManagerFactoryBean.java:73)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:994)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:960)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
        at com.mycom.jta.ExampleProcessorJtaTest.main(ExampleProcessorJtaTest.java:18)


###### Spring Configuration ######
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- JTA Transaction Manager -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean"/>


    <!-- ~~~~~~~~~~~~~~~~~~ -->
    <!-- Connection Manager -->
    <!-- ~~~~~~~~~~~~~~~~~~ -->
    <bean id="connectionManager" class="org.jencks.factory.ConnectionManagerFactoryBean">
        <property name="transactionManager" ref="transactionManager"/>
    </bean>

   
    <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- ActiveMQ Configuration -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">

        <property name="config" value="activemq-embedded-broker.xml" />

        <property name="start" value="true" />
    </bean>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- ResourceAdapter for ActiveMQ -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="jmsResourceAdapter" class="org.apache.activemq.ra.ActiveMQResourceAdapter">

        <property name="serverUrl" value="vm://localhost"/>
    </bean>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- JMS Destination for Example Messages -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="exampleQueue"
          class="org.apache.activemq.command.ActiveMQQueue"
          autowire="constructor">

        <constructor-arg value="EXAMPLE_QUEUE" />
    </bean>    


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- JMS Managed Connection Factory -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="jmsManagedConnectionFactory" class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
        <property name="resourceAdapter" ref="jmsResourceAdapter"/>
    </bean>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- JMS Connection Factory -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="jmsConnectionFactory" class="org.jencks.factory.ConnectionFactoryFactoryBean">
        <property name="managedConnectionFactory" ref="jmsManagedConnectionFactory"/>
        <property name="connectionManager" ref="connectionManager"/>
    </bean>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- transactional AOP advice which can be used by AOP pointcuts -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <tx:advice id="jmsTxAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <!-- all methods starting with 'get' are read-only -->
            <tx:method name="on*" read-only="true" />
            <!-- other methods use the default transaction settings (see below) -->
            <tx:method name="*" />
        </tx:attributes>
    </tx:advice>
   
   
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- AOP configuration specifying a pointcut and advisor  -->
    <!-- for applying the transactional advice declared above -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <aop:config>
        <aop:pointcut id="jmsOperations"
                      expression="execution(* com.mycom.jta.jms.converter.*.*(..)) or
                                  execution(* com.mycom.jta.jms.producer.*.*(..))"/>                    
        <aop:advisor advice-ref="jmsTxAdvice" pointcut-ref="jmsOperations" />                    
    </aop:config>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- MessageConverter for converting Example objects to and from Message objects -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="exampleMessageConverter"
          class="com.mycom.jta.converter.ExampleMessageConverterImpl" />


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- JmsTemplate used for sending Example messages -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="exampleJmsTemplate" class="org.springframework.jms.core.JmsTemplate">

        <property name="connectionFactory" ref="jmsConnectionFactory" />

        <property name="messageConverter" ref="exampleMessageConverter" />
       
        <property name="receiveTimeout" value="10000" />

        <property name="defaultDestination" ref="exampleQueue" />
    </bean>


    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- JMS Producer of Example messages -->
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bean id="exampleMessageSender"
        class="com.mycom.jta.producer.MessageSenderImpl">

        <property name="jmsTemplate" ref="exampleJmsTemplate" />
    </bean>
   
</beans>

Re: Outbound JMS: NoSuchMethodError: Geronimo's GenericConnectionManager.<init>

by gnodet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Which version of geronimo jars do you use ?
You need a version >= 1.2-beta

On 1/22/07, James Adams <james_adams@...> wrote:

>
> I have set up my application for Outbound JMS with Jencks 2.0 but I am
> getting a NoSuchMethodError with the Geronimo GenericConnectionManager when
> Spring tries to instantiate the connectionManager bean.  Following the
> exception stack trace is the Spring configuration file.  Can anyone advise
> me as to what the problem might be?
>
> --James
>
>
> ###### Exception Stack Trace ######
> Exception in thread "main"
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'jmsConnectionFactory' defined in class path resource
> [jencks-example-jms-context.xml]: Ca
> nnot resolve reference to bean 'connectionManager' while setting bean
> property 'connectionManager'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with na
> me 'connectionManager': FactoryBean threw exception on object creation;
> nested exception is java.lang.NoSuchMethodError:
> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/
> geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontra
> cking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'connectionManager': FactoryBean threw exception on
> object creation; nested exception is java.lang.NoSuchM
> ethodError:
> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outboun
> d/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
> Caused by: java.lang.NoSuchMethodError:
> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apach
> e/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;L
> java/lang/ClassLoader;)V
>         at
> org.jencks.factory.ConnectionManagerFactoryBean.getObject(ConnectionManagerFactoryBean.java:73)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:994)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:960)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
>         at
> com.mycom.jta.ExampleProcessorJtaTest.main(ExampleProcessorJtaTest.java:18)
>
>
> ###### Spring Configuration ######
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:aop="http://www.springframework.org/schema/aop"
>     xmlns:tx="http://www.springframework.org/schema/tx"
>     xsi:schemaLocation="http://www.springframework.org/schema/beans
>        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>        http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>        http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JTA Transaction Manager -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="transactionManager"
> class="org.jencks.factory.TransactionManagerFactoryBean"/>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~ -->
>     <!-- Connection Manager -->
>     <!-- ~~~~~~~~~~~~~~~~~~ -->
>     <bean id="connectionManager"
> class="org.jencks.factory.ConnectionManagerFactoryBean">
>         <property name="transactionManager" ref="transactionManager"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- ActiveMQ Configuration -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>
>         <property name="config" value="activemq-embedded-broker.xml" />
>
>         <property name="start" value="true" />
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- ResourceAdapter for ActiveMQ -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="jmsResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter">
>
>         <property name="serverUrl" value="vm://localhost"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Destination for Example Messages -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="exampleQueue"
>           class="org.apache.activemq.command.ActiveMQQueue"
>           autowire="constructor">
>
>         <constructor-arg value="EXAMPLE_QUEUE" />
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Managed Connection Factory -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="jmsManagedConnectionFactory"
> class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
>         <property name="resourceAdapter" ref="jmsResourceAdapter"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Connection Factory -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="jmsConnectionFactory"
> class="org.jencks.factory.ConnectionFactoryFactoryBean">
>         <property name="managedConnectionFactory"
> ref="jmsManagedConnectionFactory"/>
>         <property name="connectionManager" ref="connectionManager"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- transactional AOP advice which can be used by AOP pointcuts -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <tx:advice id="jmsTxAdvice" transaction-manager="transactionManager">
>         <tx:attributes>
>             <!-- all methods starting with 'get' are read-only -->
>             <tx:method name="on*" read-only="true" />
>             <!-- other methods use the default transaction settings (see
> below) -->
>             <tx:method name="*" />
>         </tx:attributes>
>     </tx:advice>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- AOP configuration specifying a pointcut and advisor  -->
>     <!-- for applying the transactional advice declared above -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <aop:config>
>         <aop:pointcut id="jmsOperations"
>                       expression="execution(*
> com.mycom.jta.jms.converter.*.*(..)) or
>                                   execution(*
> com.mycom.jta.jms.producer.*.*(..))"/>
>         <aop:advisor advice-ref="jmsTxAdvice" pointcut-ref="jmsOperations"
> />
>     </aop:config>
>
>
>     <!--
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -->
>     <!-- MessageConverter for converting Example objects to and from Message
> objects -->
>     <!--
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -->
>     <bean id="exampleMessageConverter"
>           class="com.mycom.jta.converter.ExampleMessageConverterImpl" />
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JmsTemplate used for sending Example messages -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="exampleJmsTemplate"
> class="org.springframework.jms.core.JmsTemplate">
>
>         <property name="connectionFactory" ref="jmsConnectionFactory" />
>
>         <property name="messageConverter" ref="exampleMessageConverter" />
>
>         <property name="receiveTimeout" value="10000" />
>
>         <property name="defaultDestination" ref="exampleQueue" />
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Producer of Example messages -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="exampleMessageSender"
>         class="com.mycom.jta.producer.MessageSenderImpl">
>
>         <property name="jmsTemplate" ref="exampleJmsTemplate" />
>     </bean>
>
> </beans>
>
> --
> View this message in context: http://www.nabble.com/Outbound-JMS%3A--NoSuchMethodError%3A-Geronimo%27s-GenericConnectionManager.%3Cinit%3E-tf3060055.html#a8508870
> Sent from the jencks - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Outbound JMS: NoSuchMethodError: Geronimo's GenericConnectionManager.<init>

by James Adams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't have a dependency for Geronimo in my pom.xml and my assumption is that I'm using whatever Geronimo JARs are specified as dependencies for Jencks 2.0 (plus any other Geronimo dependencies from other projects such as ActiveMQ and TranQL).  When I look at the list of external libraries in my Eclipse project I see the following Geronimo JARs:

geronimo-connector-1.0.jar
geronimo-connector-1.2-beta.jar
geronimo-ejb_2.1_spec-1.0.1.jar
geronimo-j2ee-connector_1.5_spec-1.0.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
geronimo-jms_1.1_spec-1.0.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar
geronimo-transaction-1.0.jar
geronimo-transaction-1.2-beta.jar


I'm using the below dependencies in my pom.xml:

        <!-- Jencks -->
        <dependency>
            <groupId>org.jencks</groupId>
            <artifactId>jencks</artifactId>
            <version>2.0</version>
            <scope>runtime</scope>
        </dependency>

        <!-- TranQL -->
        <dependency>
            <groupId>org.tranql</groupId>
            <artifactId>tranql</artifactId>
            <version>1.4-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.tranql</groupId>
            <artifactId>tranql-connector</artifactId>
            <version>1.3-SNAPSHOT</version>
        </dependency>

        <!-- ActiveMQ -->
        <dependency>
            <groupId>activemq</groupId>
            <artifactId>activemq</artifactId>
            <version>4.1.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-ra</artifactId>
            <version>4.1.0-incubator</version>
        </dependency>

        <!-- Lingo -->
        <dependency>
            <groupId>org.logicblaze.lingo</groupId>
            <artifactId>lingo</artifactId>
            <version>1.3</version>
        </dependency>


Is it possible that another project's Geronimo dependencies are taking precedence in the classpath ahead of the Geronimo JARs needed by the Jencks dependency in my project, and because they're older versions of the JARs then a class will be found in the older JAR but the expected/updated method signature will not be?

 
--James
 

gnodet wrote:
Which version of geronimo jars do you use ?
You need a version >= 1.2-beta

On 1/22/07, James Adams <james_adams@yahoo.com> wrote:
>
> I have set up my application for Outbound JMS with Jencks 2.0 but I am
> getting a NoSuchMethodError with the Geronimo GenericConnectionManager when
> Spring tries to instantiate the connectionManager bean.  Following the
> exception stack trace is the Spring configuration file.  Can anyone advise
> me as to what the problem might be?
>
> --James
>
>
> ###### Exception Stack Trace ######
> Exception in thread "main"
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'jmsConnectionFactory' defined in class path resource
> [jencks-example-jms-context.xml]: Ca
> nnot resolve reference to bean 'connectionManager' while setting bean
> property 'connectionManager'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with na
> me 'connectionManager': FactoryBean threw exception on object creation;
> nested exception is java.lang.NoSuchMethodError:
> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/
> geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontra
> cking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'connectionManager': FactoryBean threw exception on
> object creation; nested exception is java.lang.NoSuchM
> ethodError:
> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outboun
> d/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
> Caused by: java.lang.NoSuchMethodError:
> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apach
> e/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;L
> java/lang/ClassLoader;)V
>         at
> org.jencks.factory.ConnectionManagerFactoryBean.getObject(ConnectionManagerFactoryBean.java:73)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:994)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:960)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
>         at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
>         at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
>         at
> com.mycom.jta.ExampleProcessorJtaTest.main(ExampleProcessorJtaTest.java:18)
>
>
> ###### Spring Configuration ######
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:aop="http://www.springframework.org/schema/aop"
>     xmlns:tx="http://www.springframework.org/schema/tx"
>     xsi:schemaLocation="http://www.springframework.org/schema/beans
>        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>        http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>        http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JTA Transaction Manager -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="transactionManager"
> class="org.jencks.factory.TransactionManagerFactoryBean"/>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~ -->
>     <!-- Connection Manager -->
>     <!-- ~~~~~~~~~~~~~~~~~~ -->
>     <bean id="connectionManager"
> class="org.jencks.factory.ConnectionManagerFactoryBean">
>         <property name="transactionManager" ref="transactionManager"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- ActiveMQ Configuration -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
>
>         <property name="config" value="activemq-embedded-broker.xml" />
>
>         <property name="start" value="true" />
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- ResourceAdapter for ActiveMQ -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="jmsResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter">
>
>         <property name="serverUrl" value="vm://localhost"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Destination for Example Messages -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="exampleQueue"
>           class="org.apache.activemq.command.ActiveMQQueue"
>           autowire="constructor">
>
>         <constructor-arg value="EXAMPLE_QUEUE" />
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Managed Connection Factory -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="jmsManagedConnectionFactory"
> class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
>         <property name="resourceAdapter" ref="jmsResourceAdapter"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Connection Factory -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="jmsConnectionFactory"
> class="org.jencks.factory.ConnectionFactoryFactoryBean">
>         <property name="managedConnectionFactory"
> ref="jmsManagedConnectionFactory"/>
>         <property name="connectionManager" ref="connectionManager"/>
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- transactional AOP advice which can be used by AOP pointcuts -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <tx:advice id="jmsTxAdvice" transaction-manager="transactionManager">
>         <tx:attributes>
>             <!-- all methods starting with 'get' are read-only -->
>             <tx:method name="on*" read-only="true" />
>             <!-- other methods use the default transaction settings (see
> below) -->
>             <tx:method name="*" />
>         </tx:attributes>
>     </tx:advice>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- AOP configuration specifying a pointcut and advisor  -->
>     <!-- for applying the transactional advice declared above -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <aop:config>
>         <aop:pointcut id="jmsOperations"
>                       expression="execution(*
> com.mycom.jta.jms.converter.*.*(..)) or
>                                   execution(*
> com.mycom.jta.jms.producer.*.*(..))"/>
>         <aop:advisor advice-ref="jmsTxAdvice" pointcut-ref="jmsOperations"
> />
>     </aop:config>
>
>
>     <!--
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -->
>     <!-- MessageConverter for converting Example objects to and from Message
> objects -->
>     <!--
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -->
>     <bean id="exampleMessageConverter"
>           class="com.mycom.jta.converter.ExampleMessageConverterImpl" />
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JmsTemplate used for sending Example messages -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="exampleJmsTemplate"
> class="org.springframework.jms.core.JmsTemplate">
>
>         <property name="connectionFactory" ref="jmsConnectionFactory" />
>
>         <property name="messageConverter" ref="exampleMessageConverter" />
>
>         <property name="receiveTimeout" value="10000" />
>
>         <property name="defaultDestination" ref="exampleQueue" />
>     </bean>
>
>
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <!-- JMS Producer of Example messages -->
>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
>     <bean id="exampleMessageSender"
>         class="com.mycom.jta.producer.MessageSenderImpl">
>
>         <property name="jmsTemplate" ref="exampleJmsTemplate" />
>     </bean>
>
> </beans>
>
> --
> View this message in context: http://www.nabble.com/Outbound-JMS%3A--NoSuchMethodError%3A-Geronimo%27s-GenericConnectionManager.%3Cinit%3E-tf3060055.html#a8508870
> Sent from the jencks - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Re: Outbound JMS: NoSuchMethodError: Geronimo's GenericConnectionManager.<init>

by gnodet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, you can use mvn -X to see (it's not so easy) where the 1.0 geronimo
jars come from (they are transitive dependencies) and explicitely exclude them.
The problem comes from the fact that the groupId has changed, so that maven
does not recognize that geronimo-connector-1.0.jar and
geronimo-connector-1.2-beta.jar
are two different versions of the same jar (you should have only one
in the classpath).

On 1/22/07, James Adams <james_adams@...> wrote:

>
> I don't have a dependency for Geronimo in my pom.xml and my assumption is
> that I'm using whatever Geronimo JARs are specified as dependencies for
> Jencks 2.0 (plus any other Geronimo dependencies from other projects such as
> ActiveMQ and TranQL).  When I look at the list of external libraries in my
> Eclipse project I see the following Geronimo JARs:
>
> geronimo-connector-1.0.jar
> geronimo-connector-1.2-beta.jar
> geronimo-ejb_2.1_spec-1.0.1.jar
> geronimo-j2ee-connector_1.5_spec-1.0.jar
> geronimo-j2ee-management_1.0_spec-1.0.jar
> geronimo-jms_1.1_spec-1.0.jar
> geronimo-jta_1.0.1B_spec-1.0.1.jar
> geronimo-transaction-1.0.jar
> geronimo-transaction-1.2-beta.jar
>
>
> I'm using the below dependencies in my pom.xml:
>
>         <!-- Jencks -->
>         <dependency>
>             <groupId>org.jencks</groupId>
>             <artifactId>jencks</artifactId>
>             <version>2.0</version>
>             <scope>runtime</scope>
>         </dependency>
>
>         <!-- TranQL -->
>         <dependency>
>             <groupId>org.tranql</groupId>
>             <artifactId>tranql</artifactId>
>             <version>1.4-SNAPSHOT</version>
>         </dependency>
>         <dependency>
>             <groupId>org.tranql</groupId>
>             <artifactId>tranql-connector</artifactId>
>             <version>1.3-SNAPSHOT</version>
>         </dependency>
>
>         <!-- ActiveMQ -->
>         <dependency>
>             <groupId>activemq</groupId>
>             <artifactId>activemq</artifactId>
>             <version>4.1.0</version>
>             <scope>compile</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.activemq</groupId>
>             <artifactId>activemq-ra</artifactId>
>             <version>4.1.0-incubator</version>
>         </dependency>
>
>         <!-- Lingo -->
>         <dependency>
>             <groupId>org.logicblaze.lingo</groupId>
>             <artifactId>lingo</artifactId>
>             <version>1.3</version>
>         </dependency>
>
>
> Is it possible that another project's Geronimo dependencies are taking
> precedence in the classpath ahead of the Geronimo JARs needed by the Jencks
> dependency in my project, and because they're older versions of the JARs
> then a class will be found in the older JAR but the expected/updated method
> signature will not be?
>
>
> --James
>
>
>
> gnodet wrote:
> >
> > Which version of geronimo jars do you use ?
> > You need a version >= 1.2-beta
> >
> > On 1/22/07, James Adams <james_adams@...> wrote:
> >>
> >> I have set up my application for Outbound JMS with Jencks 2.0 but I am
> >> getting a NoSuchMethodError with the Geronimo GenericConnectionManager
> >> when
> >> Spring tries to instantiate the connectionManager bean.  Following the
> >> exception stack trace is the Spring configuration file.  Can anyone
> >> advise
> >> me as to what the problem might be?
> >>
> >> --James
> >>
> >>
> >> ###### Exception Stack Trace ######
> >> Exception in thread "main"
> >> org.springframework.beans.factory.BeanCreationException: Error creating
> >> bean
> >> with name 'jmsConnectionFactory' defined in class path resource
> >> [jencks-example-jms-context.xml]: Ca
> >> nnot resolve reference to bean 'connectionManager' while setting bean
> >> property 'connectionManager'; nested exception is
> >> org.springframework.beans.factory.BeanCreationException: Error creating
> >> bean
> >> with na
> >> me 'connectionManager': FactoryBean threw exception on object creation;
> >> nested exception is java.lang.NoSuchMethodError:
> >> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/
> >> geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontra
> >> cking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
> >> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> >> creating bean with name 'connectionManager': FactoryBean threw exception
> >> on
> >> object creation; nested exception is java.lang.NoSuchM
> >> ethodError:
> >> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apache/geronimo/connector/outboun
> >> d/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;Ljava/lang/ClassLoader;)V
> >> Caused by: java.lang.NoSuchMethodError:
> >> org.apache.geronimo.connector.outbound.GenericConnectionManager.<init>(Lorg/apache/geronimo/connector/outbound/connectionmanagerconfig/TransactionSupport;Lorg/apach
> >> e/geronimo/connector/outbound/connectionmanagerconfig/PoolingSupport;ZLorg/apache/geronimo/connector/outbound/connectiontracking/ConnectionTracker;Ljavax/transaction/TransactionManager;Ljava/lang/String;L
> >> java/lang/ClassLoader;)V
> >>         at
> >> org.jencks.factory.ConnectionManagerFactoryBean.getObject(ConnectionManagerFactoryBean.java:73)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:994)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:960)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
> >>         at
> >> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
> >>         at
> >> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
> >>         at
> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
> >>         at
> >> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
> >>         at
> >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
> >>         at
> >> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
> >>         at
> >> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
> >>         at
> >> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
> >>         at
> >> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
> >>         at
> >> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
> >>         at
> >> com.mycom.jta.ExampleProcessorJtaTest.main(ExampleProcessorJtaTest.java:18)
> >>
> >>
> >> ###### Spring Configuration ######
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <beans xmlns="http://www.springframework.org/schema/beans"
> >>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>     xmlns:aop="http://www.springframework.org/schema/aop"
> >>     xmlns:tx="http://www.springframework.org/schema/tx"
> >>     xsi:schemaLocation="http://www.springframework.org/schema/beans
> >>        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> >>        http://www.springframework.org/schema/tx
> >> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
> >>        http://www.springframework.org/schema/aop
> >> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- JTA Transaction Manager -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="transactionManager"
> >> class="org.jencks.factory.TransactionManagerFactoryBean"/>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- Connection Manager -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="connectionManager"
> >> class="org.jencks.factory.ConnectionManagerFactoryBean">
> >>         <property name="transactionManager" ref="transactionManager"/>
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- ActiveMQ Configuration -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="broker"
> >> class="org.apache.activemq.xbean.BrokerFactoryBean">
> >>
> >>         <property name="config" value="activemq-embedded-broker.xml" />
> >>
> >>         <property name="start" value="true" />
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- ResourceAdapter for ActiveMQ -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="jmsResourceAdapter"
> >> class="org.apache.activemq.ra.ActiveMQResourceAdapter">
> >>
> >>         <property name="serverUrl" value="vm://localhost"/>
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- JMS Destination for Example Messages -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="exampleQueue"
> >>           class="org.apache.activemq.command.ActiveMQQueue"
> >>           autowire="constructor">
> >>
> >>         <constructor-arg value="EXAMPLE_QUEUE" />
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- JMS Managed Connection Factory -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="jmsManagedConnectionFactory"
> >> class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
> >>         <property name="resourceAdapter" ref="jmsResourceAdapter"/>
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- JMS Connection Factory -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="jmsConnectionFactory"
> >> class="org.jencks.factory.ConnectionFactoryFactoryBean">
> >>         <property name="managedConnectionFactory"
> >> ref="jmsManagedConnectionFactory"/>
> >>         <property name="connectionManager" ref="connectionManager"/>
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- transactional AOP advice which can be used by AOP pointcuts -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <tx:advice id="jmsTxAdvice" transaction-manager="transactionManager">
> >>         <tx:attributes>
> >>             <!-- all methods starting with 'get' are read-only -->
> >>             <tx:method name="on*" read-only="true" />
> >>             <!-- other methods use the default transaction settings (see
> >> below) -->
> >>             <tx:method name="*" />
> >>         </tx:attributes>
> >>     </tx:advice>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- AOP configuration specifying a pointcut and advisor  -->
> >>     <!-- for applying the transactional advice declared above -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <aop:config>
> >>         <aop:pointcut id="jmsOperations"
> >>                       expression="execution(*
> >> com.mycom.jta.jms.converter.*.*(..)) or
> >>                                   execution(*
> >> com.mycom.jta.jms.producer.*.*(..))"/>
> >>         <aop:advisor advice-ref="jmsTxAdvice"
> >> pointcut-ref="jmsOperations"
> >> />
> >>     </aop:config>
> >>
> >>
> >>     <!--
> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> -->
> >>     <!-- MessageConverter for converting Example objects to and from
> >> Message
> >> objects -->
> >>     <!--
> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> -->
> >>     <bean id="exampleMessageConverter"
> >>           class="com.mycom.jta.converter.ExampleMessageConverterImpl" />
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- JmsTemplate used for sending Example messages -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="exampleJmsTemplate"
> >> class="org.springframework.jms.core.JmsTemplate">
> >>
> >>         <property name="connectionFactory" ref="jmsConnectionFactory" />
> >>
> >>         <property name="messageConverter" ref="exampleMessageConverter"
> >> />
> >>
> >>         <property name="receiveTimeout" value="10000" />
> >>
> >>         <property name="defaultDestination" ref="exampleQueue" />
> >>     </bean>
> >>
> >>
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <!-- JMS Producer of Example messages -->
> >>     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
> >>     <bean id="exampleMessageSender"
> >>         class="com.mycom.jta.producer.MessageSenderImpl">
> >>
> >>         <property name="jmsTemplate" ref="exampleJmsTemplate" />
> >>     </bean>
> >>
> >> </beans>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Outbound-JMS%3A--NoSuchMethodError%3A-Geronimo%27s-GenericConnectionManager.%3Cinit%3E-tf3060055.html#a8508870
> >> Sent from the jencks - user mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list please visit:
> >>
> >>     http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Architect, LogicBlaze (http://www.logicblaze.com/)
> > Blog: http://gnodet.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Outbound-JMS%3A--NoSuchMethodError%3A-Geronimo%27s-GenericConnectionManager.%3Cinit%3E-tf3060055.html#a8510523
> Sent from the jencks - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Outbound JMS: NoSuchMethodError: Geronimo's GenericConnectionManager.<init>

by James Adams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks.  It seems that the offending dependency is Lingo.  When I add the following two exclusions to the Lingo 1.3 dependency I get past the NoSuchMethodError problems:

            <exclusions>
                <exclusion>
                    <groupId>geronimo</groupId>
                    <artifactId>geronimo-connector</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>geronimo</groupId>
                    <artifactId>geronimo-transaction</artifactId>
                </exclusion>
            </exclusions>


Unfortunately I now have a different problem with ActiveMQ/TranQL (ClassCastException), but that's another topic for another thread.

Thanks again for your help with this issue.


--James

gnodet wrote:
Yes, you can use mvn -X to see (it's not so easy) where the 1.0 geronimo
jars come from (they are transitive dependencies) and explicitely exclude them.
The problem comes from the fact that the groupId has changed, so that maven
does not recognize that geronimo-connector-1.0.jar and
geronimo-connector-1.2-beta.jar
are two different versions of the same jar (you should have only one
in the classpath).

On 1/22/07, James Adams <james_adams@yahoo.com> wrote:
>
> I don't have a dependency for Geronimo in my pom.xml and my assumption is
> that I'm using whatever Geronimo JARs are specified as dependencies for
> Jencks 2.0 (plus any other Geronimo dependencies from other projects such as
> ActiveMQ and TranQL).  When I look at the list of external libraries in my
> Eclipse project I see the following Geronimo JARs:
>
> geronimo-connector-1.0.jar
> geronimo-connector-1.2-beta.jar
> geronimo-ejb_2.1_spec-1.0.1.jar
> geronimo-j2ee-connector_1.5_spec-1.0.jar
> geronimo-j2ee-management_1.0_spec-1.0.jar
> geronimo-jms_1.1_spec-1.0.jar
> geronimo-jta_1.0.1B_spec-1.0.1.jar
> geronimo-transaction-1.0.jar
> geronimo-transaction-1.2-beta.jar
>
>
> I'm using the below dependencies in my pom.xml:
>
>         <!-- Jencks -->
>         <dependency>
>             <groupId>org.jencks</groupId>
>             <artifactId>jencks</artifactId>
>             <version>2.0</version>
>             <scope>runtime</scope>
>         </dependency>
>
>         <!-- TranQL -->
>         <dependency>
>             <groupId>org.tranql</groupId>
>             <artifactId>tranql</artifactId>
>             <version>1.4-SNAPSHOT</version>
>         </dependency>
>         <dependency>
>             <groupId>org.tranql</groupId>
>             <artifactId>tranql-connector</artifactId>
>             <version>1.3-SNAPSHOT</version>
>         </dependency>
>
>         <!-- ActiveMQ -->
>         <dependency>
>             <groupId>activemq</groupId>
>             <artifactId>activemq</artifactId>
>             <version>4.1.0</version>
>             <scope>compile</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.activemq</groupId>
>             <artifactId>activemq-ra</artifactId>
>             <version>4.1.0-incubator</version>
>         </dependency>
>
>         <!-- Lingo -->
>         <dependency>
>             <groupId>org.logicblaze.lingo</groupId>
>             <artifactId>lingo</artifactId>
>             <version>1.3</version>
>         </dependency>
>
>
> Is it possible that another project's Geronimo dependencies are taking
> precedence in the classpath ahead of the Geronimo JARs needed by the Jencks
> dependency in my project, and because they're older versions of the JARs
> then a class will be found in the older JAR but the expected/updated method
> signature will not be?
>
>
> --James
>
>
>
> gnodet wrote:
> >
> > Which version of geronimo jars do you use ?
> > You need a version >= 1.2-beta
> >
> > On 1/22/07, James Adams <james_adams@yahoo.com> wrote:
> >>
> >> I have set up my application for Outbound JMS with Jencks 2.0 but I am
> >> getting a NoSuchMethodError with the Geronimo GenericConnectionManager
> >> when
> >> Spring tries to instantiate the connectionManager bean.  Following the
> >> exception stack trace is the Spring configuration file.  Can anyone
> >> advise
> >> me as to what the problem might be?
> >>
> >> --James
> >>
> >>

--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email