You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sxm <sx...@yahoo.com> on 2007/05/28 05:05:04 UTC
Re: UserTransaction, JOTM and Tomcat 5.5.x
I am able to work with JOTM when I run tomcat stand alone, but when I run it
from maven (embedded), UserTransaction doesn't get bind in the context
resulting in following error.
javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactor\
y.java:98)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at
flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653)
at
flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624)
at
flex.data.DataService.serviceTransactedMessage(DataService.java:474)
at flex.data.DataService.serviceMessage(DataService.java:241)
at
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548)
at
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:3\
02)
at
flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPSer\
ver.java:682)
at
flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection\
.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask\
(ThreadPoolExecutor.java:643)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(Thr\
eadPoolExecutor.java:668)
Matt Raible-3 wrote:
>
> Just to follow up on this, the settings below work - but HSQLDB
> doesn't seem to support nested transactions.
>
> <<< beginning the transaction >>>
> DBTest >> javax.transaction.NotSupportedException: Nested transactions not
> suppo
> rted
> at org.objectweb.jotm.Current.begin(Current.java:233)
> at foo.DBTest.init(DBTest.java:30)
> at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)
>
> The DBTest class is from the JOTM + Tomcat example at
> http://jotm.objectweb.org/current/jotm/doc/howto-tomcat-jotm.html.
>
> Changing to use MySQL solves the problem and everything works great.
>
> Also, it looks like JOTM (or maybe Carol) has issues with JDK 5. I
> googled for the following error and it appears to be known about on
> the ObjectWeb mailing lists - but there doesn't seem to be a
> documented solution.
>
> java.lang.NoSuchMethodError:
> sun.rmi.transport.ObjectTable.getStub(Ljava/rmi/Remote;)Ljava/rmi/server/RemoteStub;
>
> org.objectweb.carol.rmi.jrmp.server.JUnicastRemoteObject.unexportObject(JUnicastRemoteObject.java:138)
>
> org.objectweb.carol.rmi.multi.JrmpPRODelegate.unexportObject(JrmpPRODelegate.java:107)
>
> org.objectweb.carol.rmi.multi.MultiPRODelegate.unexportObject(MultiPRODelegate.java:107)
>
> javax.rmi.PortableRemoteObject.unexportObject(PortableRemoteObject.java:119)
>
> org.objectweb.jotm.SubCoordinator.doAfterCompletion(SubCoordinator.java:1584)
> org.objectweb.jotm.SubCoordinator.doRollback(SubCoordinator.java:1370)
> org.objectweb.jotm.SubCoordinator.rollback(SubCoordinator.java:330)
> org.objectweb.jotm.TransactionImpl.rollback(TransactionImpl.java:668)
> org.objectweb.jotm.Current.rollback(Current.java:538)
> foo.DBTest.init(DBTest.java:50)
> org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:54)
>
> Thanks,
>
> Matt
>
> On 2/8/06, Remy Maucherat <re...@gmail.com> wrote:
>> Since you're doing docs, META-INF/context.xml should be simplified to:
>> <Context>
>>
>> <Resource name="jdbc/myDB" auth="Container"
>> type="javax.sql.DataSource"
>> factory="org.objectweb.jndi.DataSourceFactory"
>> driverClassName="org.hsqldb.jdbcDriver"
>> username="sa" password=""
>> url="jdbc:hsqldb:."/>
>>
>> <Transaction factory="org.objectweb.jotm.UserTransactionFactory"
>> jotm.timeout="60"/>
>>
>> </Context>
>>
>> No servlet class reloading anymore (not useful to many people), and
>> the Transaction element has all the necessary defaults since it's a
>> special resource.
>>
>> --
>> xxxxxxxxxxxxxxxxxxxxxxxxx
>> Rémy Maucherat
>> Developer & Consultant
>> JBoss Group (Europe) SàRL
>> xxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/UserTransaction%2C-JOTM-and-Tomcat-5.5.x-tf1073172.html#a10830695
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org