Aug 25
Note: Just a short post to save your hair from turning gray (I know mine just did)
If you ever run into a "Unable to access UserTransaction in DataService" error when working with LCDS on Tomcat 5.5.x+, make sure you configured the Java Open Transaction Manager (JOTM) correctly. You can do this by adding the following in a project config file (META_INF/context.xml or a file named [MY_PROJECT].xml in [TOMCAT_HOME]/conf/Catalina/localhost):
XML:
-
<Context reloadable="true">
-
<Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
-
</Context>
Now if only the Flex Project Wizard would do this for us...
Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
Christophe Herreman is a software developer living in Belgium. He's working on high-end Flex and AIR solutions at
August 25th, 2008 at 4:09 pm
I don’t believe it?!
At the Aircamp last week, at about 5:30 am (3.5 hours before deadline), we ran into this problem! About an hour later we gave up and went to bed!!! This blog post, one week earlier might just have resulted in a trip to Milan
October 9th, 2008 at 3:43 pm
Thank you, Mr Herreman, for your solution.
Now my Flex’s application runs good !
November 12th, 2008 at 12:20 pm
Hi Friend,
in my application, i have layers like EJB -> Struts -> JSP, but i am trying to change the layers like EJB -> Struts -> Flex, with WebORB. i dont like to change the Layers. i dont know how i am going to achieve the Goal. for that i need your suggestion to reach the target, i am expecting your support for this,
thanks
areef
February 23rd, 2009 at 2:58 pm
I think there’s a mistake in your post. You can place the context.xml in the META_INF/context.xml, and not in the WEB_INF/context.xml.
Thanks for the post by the way.
March 2nd, 2009 at 5:02 pm
THANKS, lcds is a terror to me, this was so helpful and so quick to fix it
March 17th, 2009 at 6:46 pm
Thank you man!!! :’)
March 31st, 2009 at 8:30 pm
Amazingly simple !
Michael Chaize rocks (epita power
Thanks to both of you
April 15th, 2009 at 2:07 pm
Hi friends,
I’m getting this Casting error. Any clues ??
Exception: flex.data.DataServiceException: Unable to access UserTransaction in DataService.
at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:1162)
at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:1114)
at flex.data.DataService.serviceTransactedMessage(DataService.java:747)
at flex.data.DataService.serviceMessage(DataService.java:465)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
at flex.messaging.endpoints.RTMPConnection.handleTCCommand(RTMPConnection.java:723)
at flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1033)
at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:515)
at flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:123)
at flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:788)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: org.objectweb.jotm.Current cannot be cast to javax.transaction.UserTransaction
at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:1143)
… 13 more