geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: TranQL issue at SPECjAppServer2004 atomicity tests
Date Sun, 09 Apr 2006 17:38:07 GMT

On Apr 9, 2006, at 1:27 AM, Zakharov, Vasily M wrote:

> David,
>
> The deployment plan is
> http://issues.apache.org/jira/secure/attachment/12324904/specdb.xml
> and the deployment string is:
> java -jar bin/deployer.jar --user system --password manager deploy
> repository/tranql/rars/tranql-connector-derby-embed-local-1.1.rar
> specdb.xml
> (see http://issues.apache.org/jira/browse/GERONIMO-1800 for other
> details).
> I'm using Geronimo 1.0-Jetty release.
>
> I really really hope this would help. :)

yup :-)

There's supposed to be some checking in there to complain if you try  
to do this :-)  You need to either change the plan by replacing the  
<xa-transaction> element with <local-transaction/> or use the tranql- 
connector-derby-embed-xa-1.1.rar connector.  I'd hope that this app  
would have some 2-participant transactions in it so probably the xa  
connector is the better choice.

I've opened GERONIMO-1822 to track this issue.

thanks
david jencks

>
> Thank you very much!
>
>  Vasily
>
>
> -----Original Message-----
> From: David Jencks [mailto:david_jencks@yahoo.com]
> Sent: Sunday, April 09, 2006 10:49 AM
> To: dev@geronimo.apache.org
> Subject: Re: TranQL issue at SPECjAppServer2004 atomicity tests
>
> It looks to me as if a local-tx only connector is being used as if it
> supports xa.  It shouldn't be possible to deploy a connector with a
> correct ra.xml in such a way as to create this problem.  Can you
> supply the geronimo plan for the connector, and indicate which
> connector you deployed, and exactly how you deployed it?  With this
> information figuring out what is wrong and how to fix it should be
> easy (famous last words :-)
>
> Many thanks,
> david jencks
>
> On Apr 8, 2006, at 2:10 PM, Zakharov, Vasily M wrote:
>
>> Hi, all,
>>
>> I've successfuly deployed SPECjAppServer2004 benchmark on Geronimo  
>> 1.0
>> (see http://issues.apache.org/jira/browse/GERONIMO-1800), but I have
>> trouble running the basic atomicity tests
>> (http://localhost:8080/SPECjAppServer/ page, link "Atomicity Tests")
>> that check the correctness of the benchmark operation - all three
>> tests
>> are marked FAILED.
>>
>> The investigation (see below) showed that the root cause for the
>> problem
>> is the following piece of code:
>>
>> org.tranql.connector.jdbc.ManagedJDBCConnection:
>> 123  public XAResource getXAResource() throws ResourceException {
>> 124      throw new NotSupportedException("XAResource not available
>> from
>> a LocalTransaction connection");
>> 125  }
>>
>> The question is, how critical this situation is? Does it mean
>> SPECjAppServer2004 uses things it shouldn't use? Or the problem
>> lies in
>> TranQL implementation, or maybe Derby database or Derby JDBC
>> driver? Or
>> does it mean SPECjAppServer2004 can't run on Geronimo at all?
>>
>> Any ideas, suggestion and comments are highly welcome!
>>
>> Thanks!
>>
>>
>> Here's the original stack displayed in Geronimo console window at  
>> each
>> atomicity tests' run:
>>
>> javax.transaction.TransactionRolledbackException:
>> javax.ejb.FinderException: Error executing statement: SELECT C.C_ID
>> FROM
>> C_CUSTOMER C WHERE C.C_ID = ?
>>         at
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
>> (ContainerPolic
>> y.java:126)
>>         at
>> org.openejb.transaction.TransactionContextInterceptor.invoke
>> (Transaction
>> ContextInterceptor.java:80)
>>         at
>> org.openejb.slsb.StatelessInstanceInterceptor.invoke
>> (StatelessInstanceIn
>> terceptor.java:98)
>>         at
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
>> (ContainerPolic
>> y.java:140)
>>         at
>> org.openejb.transaction.TransactionContextInterceptor.invoke
>> (Transaction
>> ContextInterceptor.java:80)
>>         at
>> org.openejb.SystemExceptionInterceptor.invoke
>> (SystemExceptionInterceptor
>> .java:82)
>>         at
>> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
>>         at
>> org.openejb.proxy.EJBMethodInterceptor.intercept
>> (EJBMethodInterceptor.ja
>> va:129)
>>         at
>> org.openejb.proxy.SessionEJBObject$$EnhancerByCGLIB$
>> $4084bef.checkCustom
>> erCredit(<generated>)
>>         at
>> org.spec.jappserver.servlet.helper.SpecAction.atomicityTestTwo
>> (SpecActio
>> n.java:166)
>>         at
>> org.spec.jappserver.servlet.helper.SpecServletAction.doAtomicityTests 
>> (
>
>> Sp
>> ecServletAction.java:1304)
>>         at
>> org.spec.jappserver.servlet.SpecAppServlet.performTask
>> (SpecAppServlet.ja
>> va:166)
>>         at
>> org.spec.jappserver.servlet.SpecAppServlet.doGet
>> (SpecAppServlet.java:96)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:
>> 595)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:
>> 688)
>>         at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 
>> 428)
>>         at
>> org.apache.geronimo.jetty.JettyServletHolder.handle
>> (JettyServletHolder.j
>> ava:99)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter
>> (Web
>> ApplicationHandler.java:830)
>>         at
>> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java: 
>> 170)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter
>> (Web
>> ApplicationHandler.java:821)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
>> (WebApplicationH
>> andler.java:471)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
>> 568)
>>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationContext.handle
>> (WebApplicationCon
>> text.java:633)
>>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
>>         at org.mortbay.http.HttpServer.service(HttpServer.java:909)
>>         at
>> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
>>         at
>> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
>>         at
>> org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>>         at
>> org.mortbay.http.SocketListener.handleConnection
>> (SocketListener.java:244
>> )
>>         at
>> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>>         at
>> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>>
>> Note that the SQL prepared statement causing the error is correct and
>> references the table and fields that really exist in the database.
>> Executing this statement from a separate Java application using JDBC
>> causes no problem.
>>
>> The code throwing this exception is:
>>
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke():
>> 117    try {
>> 118        ejbInvocation.setTransactionContext(callerContext);
>> 119        return interceptor.invoke(ejbInvocation);
>> 120    } catch (Throwable t){
>> 121        callerContext.setRollbackOnly();
>> 122        if (ejbInvocation.getType().isLocal()) {
>> 123           throw new
>> TransactionRolledbackLocalException().initCause(t);
>> 124        } else {
>> 125            // can't set an initCause on a
>> TransactionRolledbackException
>> 126 ->         throw new TransactionRolledbackException(t.getMessage
>> ());
>> 127        }
>> 128    } finally {
>> 129        ejbInvocation.setTransactionContext(null);
>> 130    }
>>
>> So, the real cause for the exception is unknown. Adding
>> t.printStackTrace() at line 125 provided the following stack:
>>
>> javax.ejb.EJBException: javax.ejb.FinderException: Error executing
>> statement: SELECT C.C_ID FROM C_CUSTOMER C WHERE C.C_ID = ?
>>         at
>> org.spec.jappserver.corp.customerses.ejb.CustomerSesEJB.checkCustomer 
>> C
>
>> re
>> dit(CustomerSesEJB.java:246)
>>         at
>> org.spec.jappserver.corp.customerses.ejb.CustomerSesEJB$
>> $FastClassByCGLI
>> B$$c445ce6f.invoke(<generated>)
>>         at
>> org.openejb.dispatch.AbstractMethodOperation.invoke
>> (AbstractMethodOperat
>> ion.java:90)
>>         at
>> org.openejb.slsb.BusinessMethod.execute(BusinessMethod.java:67)
>>         at
>> org.openejb.dispatch.DispatchInterceptor.invoke
>> (DispatchInterceptor.java
>> :72)
>>         at
>> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke
>> (Compo
>> nentContextInterceptor.java:56)
>>         at
>> org.openejb.ConnectionTrackingInterceptor.invoke
>> (ConnectionTrackingInter
>> ceptor.java:81)
>>         at
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
>> (ContainerPolic
>> y.java:119)
>>         at
>> org.openejb.transaction.TransactionContextInterceptor.invoke
>> (Transaction
>> ContextInterceptor.java:80)
>>         at
>> org.openejb.slsb.StatelessInstanceInterceptor.invoke
>> (StatelessInstanceIn
>> terceptor.java:98)
>>         at
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
>> (ContainerPolic
>> y.java:142)
>>         at
>> org.openejb.transaction.TransactionContextInterceptor.invoke
>> (Transaction
>> ContextInterceptor.java:80)
>>         at
>> org.openejb.SystemExceptionInterceptor.invoke
>> (SystemExceptionInterceptor
>> .java:82)
>>         at
>> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
>>         at
>> org.openejb.proxy.EJBMethodInterceptor.intercept
>> (EJBMethodInterceptor.ja
>> va:129)
>>         at
>> org.openejb.proxy.SessionEJBObject$$EnhancerByCGLIB$
>> $82edd9c9.checkCusto
>> merCredit(<generated>)
>>         at
>> org.spec.jappserver.servlet.helper.SpecAction.atomicityTestTwo
>> (SpecActio
>> n.java:166)
>>         at
>> org.spec.jappserver.servlet.helper.SpecServletAction.doAtomicityTests 
>> (
>
>> Sp
>> ecServletAction.java:1304)
>>         at
>> org.spec.jappserver.servlet.SpecAppServlet.performTask
>> (SpecAppServlet.ja
>> va:166)
>>         at
>> org.spec.jappserver.servlet.SpecAppServlet.doGet
>> (SpecAppServlet.java:96)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:
>> 595)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:
>> 688)
>>         at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 
>> 428)
>>         at
>> org.apache.geronimo.jetty.JettyServletHolder.handle
>> (JettyServletHolder.j
>> ava:99)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter
>> (Web
>> ApplicationHandler.java:830)
>>         at
>> org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java: 
>> 170)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter
>> (Web
>> ApplicationHandler.java:821)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch
>> (WebApplicationH
>> andler.java:471)
>>         at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
>> 568)
>>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
>>         at
>> org.mortbay.jetty.servlet.WebApplicationContext.handle
>> (WebApplicationCon
>> text.java:633)
>>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
>>         at org.mortbay.http.HttpServer.service(HttpServer.java:909)
>>         at
>> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
>>         at
>> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
>>         at
>> org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>>         at
>> org.mortbay.http.SocketListener.handleConnection
>> (SocketListener.java:244
>> )
>>         at
>> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>>         at
>> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>> Caused by: javax.ejb.FinderException: Error executing statement:
>> SELECT
>> C.C_ID FROM C_CUSTOMER C WHERE C.C_ID = ?
>>         at
>> org.openejb.entity.cmp.SingleValuedFinder.execute
>> (SingleValuedFinder.jav
>> a:83)
>>         at
>> org.openejb.dispatch.DispatchInterceptor.invoke
>> (DispatchInterceptor.java
>> :72)
>>         at
>> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke
>> (Compo
>> nentContextInterceptor.java:56)
>>         at
>> org.openejb.ConnectionTrackingInterceptor.invoke
>> (ConnectionTrackingInter
>> ceptor.java:81)
>>         at
>> org.openejb.entity.EntityInstanceInterceptor.invoke
>> (EntityInstanceInterc
>> eptor.java:136)
>>         at
>> org.openejb.entity.cmp.InTxCacheInterceptor.invoke
>> (InTxCacheInterceptor.
>> java:90)
>>         at
>> org.openejb.transaction.ContainerPolicy$TxRequired.invoke
>> (ContainerPolic
>> y.java:119)
>>         at
>> org.openejb.transaction.TransactionContextInterceptor.invoke
>> (Transaction
>> ContextInterceptor.java:80)
>>         at
>> org.openejb.SystemExceptionInterceptor.invoke
>> (SystemExceptionInterceptor
>> .java:82)
>>         at
>> org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
>>         at
>> org.openejb.proxy.EJBMethodInterceptor.intercept
>> (EJBMethodInterceptor.ja
>> va:129)
>>         at
>> org.openejb.proxy.EntityEJBLocalHome$$EnhancerByCGLIB$
>> $bc77798c.findByPr
>> imaryKey(<generated>)
>>         at
>> org.spec.jappserver.corp.customerses.ejb.CustomerSesEJB.checkCustomer 
>> C
>
>> re
>> dit(CustomerSesEJB.java:243)
>>         ... 38 more
>> Caused by: org.tranql.ql.QueryException: Error executing statement:
>> SELECT C.C_ID FROM C_CUSTOMER C WHERE C.C_ID = ?
>>         at
>> org.tranql.sql.jdbc.JDBCQueryCommand.execute(JDBCQueryCommand.java: 
>> 79)
>>         at
>> org.tranql.cache.cache.FindByPKCacheQueryCommand.execute
>> (FindByPKCacheQu
>> eryCommand.java:66)
>>         at org.openejb.entity.cmp.CMPFinder.execute(CMPFinder.java: 
>> 99)
>>         at
>> org.openejb.entity.cmp.SingleValuedFinder.execute
>> (SingleValuedFinder.jav
>> a:80)
>>         ... 50 more
>> Caused by: java.sql.SQLException
>>         at
>> org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java: 
>> 61)
>>         at
>> $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(<generated>)
>>         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java: 
>> 149)
>>         at
>> org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept
>> (Conne
>> ctorMethodInterceptor.java:53)
>>         at
>> $javax.sql.DataSource$$EnhancerByCGLIB$$5149252c.getConnection
>> (<generate
>> d>)
>>         at
>> org.tranql.sql.DataSourceDelegate.getConnection
>> (DataSourceDelegate.java:
>> 39)
>>         at
>> org.tranql.sql.jdbc.JDBCQueryCommand.execute(JDBCQueryCommand.java: 
>> 61)
>>         ... 53 more
>> Caused by: XAResource not available from a LocalTransaction  
>> connection
>>         at
>> org.tranql.connector.jdbc.ManagedJDBCConnection.getXAResource
>> (ManagedJDB
>> CConnection.java:124)
>>         at
>> org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor 
>> .
>
>> ge
>> tConnection(XAResourceInsertionInterceptor.java:43)
>>         at
>> org.apache.geronimo.connector.outbound.SinglePoolConnectionIntercepto 
>> r
>
>> .i
>> nternalGetConnection(SinglePoolConnectionInterceptor.java:63)
>>         at
>> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionIn 
>> t
>
>> er
>> ceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73)
>>         at
>> org.apache.geronimo.connector.outbound.TransactionEnlistingIntercepto 
>> r
>
>> .g
>> etConnection(TransactionEnlistingInterceptor.java:47)
>>         at
>> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor. 
>> g
>
>> et
>> Connection(TransactionCachingInterceptor.java:81)
>>         at
>> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.ge 
>> t
>
>> Co
>> nnection(ConnectionHandleInterceptor.java:43)
>>         at
>> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection
>> (TCC
>> LInterceptor.java:39)
>>         at
>> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor. 
>> g
>
>> et
>> Connection(ConnectionTrackingInterceptor.java:66)
>>         at
>> org.apache.geronimo.connector.outbound.AbstractConnectionManager.allo 
>> c
>
>> at
>> eConnection(AbstractConnectionManager.java:57)
>>         at
>> org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java: 
>> 56)
>>         ... 59 more
>>
>> Vasily Zakharov
>> Intel Middleware Product Division


Mime
View raw message