• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Not looking so much for a fix as what this error means

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I notice that many posters post,a n ask for a fix without asking what the error means.

When I start up JBoss I get the following error



I am more interested with understanding what the error is.

As I understand it we have a JBoss object com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate

which needs to be converted or matched to a javax.transaction.TransactionManager

for the spring object jtaTransactionManager.

I am not sure what "No matching editors or conversion strategy found"

Since I am upgrading an application from jboss 4 to jboss 5 I would guess that the current jar containing javax.transaction.TransactionManager does not work with JBoss 5 and I need to get a later version.

I am more interested in understanding the error than just getting a fix. This is also a laerning exercise.

Thanks
 
Tony Evans
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate is contained in the
jbossjts-integration.jar which comes with jboss-5.1.0.GA.

So it looks that jtaTransactionManager org.springframework.jndi.JndiObjectFactoryBean needs to be updated
 
Tony Evans
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TransactionManagerDelegate extends BaseTransactionManagerDelegate which implements TransactionManager.

Therefore I do not understand the error as its casting an object that implements the interface TransactionManager to TransactionManager. That is if I understand the error correctly.

Will welcome any input even a good guesstimate. Most fixes have come through discussion which helps you to understand the problem more.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To me the error simply is stating that it is trying to cast one type to the other and they aren't compatible. One is a class from JBoss and one is a class from Spring. They shouldn't be in the same hierarchy. Whenever you are using JTA in a Spring applictation, the Spring TransactionManager class for that server is really just delegating calls to the JTA Transaction manager class in JBoss, in this case.

We need a bit more context to state why you are getting this error. But the meaning is as simple as


public class Mark {}

Mark mark = new Mark()

someReferenceToSomeOtherClass.setJohn(mark);

where setJohn's signature is setJohn(John john);

Since this is in configuration, Spring tries to convert the Mark into a John, but Mark isn't a John. And Spring catches the ClassCastException here and throws their Conversion/Editor error. Remember Spring xml configuration is all Strings and Spring uses PropertyEditors or Converters to set things up.

Mark
 
Tony Evans
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark I understand the error now.

I am converting a app to run on jboss-5.1.0.GA from jboss-4.0.5.GA.

In one of my applicatioContext.xml I ahave the following



which returns the object com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate which as you pointed out it trys to cast to javax.transaction.TransactionManager

TransactionManagerDelegate extends BaseTransactionManagerDelegate
BaseTransactionManagerDelegate implements javax.transaction.TransactionManager.

So the cast should be allowed, that is now the confusing bit.

 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tony Evans wrote:Thanks Mark I understand the error now.

I am converting a app to run on jboss-5.1.0.GA from jboss-4.0.5.GA.

In one of my applicatioContext.xml I ahave the following





Why aren't you just using

<tx:jta-transaction-manager/> tag

This will create a TransactionManager for you using whatever app server you are deployed in. It automatically figures it out and delegates to the app servers JTA Transaction Manager.

Mark
 
Tony Evans
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark, as it stands I am stripping my application down, I dont think it needs TransactionManager, the app is now wrapped in another app an just needs to supply web pages that are iframed.

Found out that JBoss 5 is a lot stricter on parsing XML than JBoss 4 was.

If I do need the TransactionManager, I will use your suggestion.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tony Evans wrote:Thanks Mark, as it stands I am stripping my application down, I dont think it needs TransactionManager, the app is now wrapped in another app an just needs to supply web pages that are iframed.

Found out that JBoss 5 is a lot stricter on parsing XML than JBoss 4 was.

If I do need the TransactionManager, I will use your suggestion.



I'm not sure I understand why you won't need a TransactionManager. If anyone is calling into that app and inside that app you have use cases and you access the database, you need a TransactionManager.

Mark
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic