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

On 1/22/07, James Adams <[EMAIL PROTECTED]> 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

Reply via email to