Thanks for the help Guillaume.
Here's what I've done to get around this problem when using Jencks 1.3:
<!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- JTA Transaction Manager -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~ -->
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager"
autowire="constructor">
<constructor-arg>
<bean class="org.jencks.factory.TransactionManagerFactoryBean"
/>
</constructor-arg>
</bean>
Shouldn't someone update the documentation to reflect the need for a wrapper
if not using the latest development/SNAPSHOT release (I will volunteer)?
Who gives permission for this sort of editing of the documentation -- or can
any newbie like myself update it when they find a discrepancy such as this?
--James
gnodet wrote:
>
> Jencks create an instance of javax.transaction.TransactionManager.
> If you want to use spring transactions, you need to wrap it in
> a spring JtaPlatformTransactionManager.
>
> Note that with jencks 2.0-SNAPSHOT, the object returned already implements
> the
> spring PlatformTransactionManager.
>
> On 12/14/06, James Adams <[EMAIL PROTECTED]> wrote:
>>
>> I'm developing a stand-alone Spring application which has JMS and
>> Hibernate
>> components, and I would like to use XA/global transactions managed by a
>> JTA
>> transaction manager. The Jencks documentation makes this appear dead
>> simple
>> (http://jencks.org/Transaction+Manager) -- just declare
>> org.jencks.factory.TransactionManagerFactoryBean as the class for the
>> transactionManager bean and you're on your way. Well this appeared to be
>> too easy, and so it seems. I've done the above in my Spring
>> configuration
>> file and I get an error telling me that
>> org.apache.geronimo.transaction.manager.TransactionManagerImpl doesn't
>> implement the interface
>> org.springframework.transaction.PlatformTransactionManager (see exception
>> stack trace below).
>>
>> Can anyone suggest what else I need to do in order to wire my application
>> correctly to use a XA/JTA transaction manager? Thanks in advance for any
>> help!
>>
>>
>> --James
>>
>>
>>
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor':
>> Cannot
>> resolve reference to bean 'transactionAdvice' while setting bean property
>> 'advice'; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'transactionAdvice': Error setting property values; nested
>> exception is org.springframework.beans.PropertyBatchUpdateException;
>> nested
>> PropertyAccessExceptions (1) are:
>> PropertyAccessException 1:
>> org.springframework.beans.TypeMismatchException:
>> Failed to convert property value of type
>> [org.apache.geronimo.transaction.manager.TransactionManagerImpl] to
>> required
>> type [org.springframework.transaction.PlatformTransactionManager] for
>> property 'transactionManager'; nested exception is
>> java.lang.IllegalArgumentException: No matching editors or conversion
>> strategy found
>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'transactionAdvice': Error setting property
>> values;
>> nested exception is
>> org.springframework.beans.PropertyBatchUpdateException;
>> nested PropertyAccessExceptions (1) are:
>> PropertyAccessException 1:
>> org.springframework.beans.TypeMismatchException:
>> Failed to convert property value of type
>> [org.apache.geronimo.transaction.manager.TransactionManagerImpl] to
>> required
>> type [org.springframework.transaction.PlatformTransactionManager] for
>> property 'transactionManager'; nested exception is
>> java.lang.IllegalArgumentException: No matching editors or conversion
>> strategy found
>> Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
>> PropertyAccessException details (1) are:
>> PropertyAccessException 1:
>> org.springframework.beans.TypeMismatchException: Failed to convert
>> property
>> value of type
>> [org.apache.geronimo.transaction.manager.TransactionManagerImpl] to
>> required
>> type [org.springframework.transaction.PlatformTransactionManager] for
>> property 'transactionManager'; nested exception is
>> java.lang.IllegalArgumentException: No matching editors or conversion
>> strategy found
>> Caused by: java.lang.IllegalArgumentException: No matching editors or
>> conversion strategy found
>> at
>> org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:212)
>> at
>> org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:127)
>> at
>> org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:775)
>
>
>
> --
> Cheers,
> Guillaume Nodet
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
--
View this message in context:
http://www.nabble.com/IllegalArgumentException-encountered-on-first-go-at-using-JTA-transaction-manager-tf2818982.html#a7912060
Sent from the jencks - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email