Hi,

I am using Spring and ibatis as DB mapping layer . i am facing one problem
consistantly . my application is running in cluster environment . In Ibatis
DAO in one of the method i am using querryForList(id,object) . This is
working fine . this is used in a web application . the problem i am facing ,
my Ibatis select query is working fine when the request is executing in one
of the server always . we have two different servers, it is configured with
BigIP . but when my request is reaching other server, my Ibatis select query
is always failing throwing below exception :

Caused by: com.tgt.ecl.exception.TgtDataAccessException:
com.ibatis.common.jdbc.exception.NestedSQLException: Error getting
Connection from Transaction.  Cause:
com.ibatis.sqlmap.engine.transaction.TransactionException: JtaTransaction
could not start transaction.  Cause: 
        at
com.tgt.ecl.dao.ibatis.TgtIbatisTemplateImpl.queryForList(TgtIbatisTemplateImpl.java:192)
        at com.myself.pt.dao.xxxDAO.getItemDetails(MyMediaDAO.java:51)
        ... 34 more
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: Error
getting Connection from Transaction.  Cause:
com.ibatis.sqlmap.engine.transaction.TransactionException: JtaTransaction
could not start transaction.  Cause: 
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:126)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:615)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:589)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:95)
        at
com.tgt.ecl.dao.ibatis.TgtIbatisTemplateImpl.queryForList(TgtIbatisTemplateImpl.java:190)
        ... 35 more
Caused by: com.ibatis.sqlmap.engine.transaction.TransactionException:
JtaTransaction could not start transaction.  Cause: 
        at
com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.init(JtaTransaction.java:64)
        at
com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.getConnection(JtaTransaction.java:131)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
        ... 40 more
Caused by: java.lang.NullPointerException
        at
com.ibm.ejs.container.EJSContainer.processTxContextChange(EJSContainer.java:2202)
        at
com.ibm.ejs.container.UserTransactionWrapper.begin(UserTransactionWrapper.java:206)
        at
com.ibatis.sqlmap.engine.transaction.jta.JtaTransaction.init(JtaTransaction.java:61)
        ... 42 more



Initially i thought it might be due to BigIp issue, i mean may be BigIP is
not configured properly . but later on when i deployed the same code again
with same existing BigiP configuration, what i find this time ibatis select
query is working fine in both the servers .

but  i find after some days, the same issue comes back again . 

I IBATIS ,Spring configuration  i am using JTA Transaction with Transaction
Scope as "Prototype" . 
In DAO i am not using any implicit Transaction in Java Code like "
startBatch() and executeBatch() methods.

wanted to know, does any body have any ANS to my problem  ?  after reading
though some articles on net i am thinking to add exlicit Transactions in
Java code by adding above 2 methods , not sure it will able to fix the issue
or not .

Please reply me , if some body has an ans to my problems
-- 
View this message in context: 
http://www.nabble.com/Ibatis-select-Query-failing-throwing--Error-getting-Connection-from-Transaction-tp24528912p24528912.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to