Datasource is null Exception.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Datasource is null Exception.

jshri
I have 2 JNDI datasources with separate SQLMapConfigs and DAOs too for the same application. On getting a message the application interprets it and does inserts into database no. 1.
After that, it applies some more logic and needs to do select and insert operation on database no. 2.

However for the second datasource, I get the following error..

Could not start transaction.  Cause: com.ibatis.sqlmap.engine.transaction.TransactionException: ExternalTransaction initialization failed.  DataSource was null.
[8/30/10 16:53:57:007 CDT] 0000003c SystemOut     O Exception occurred :com.nwa.airportops.bagods.exception.AlertException
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R com.ibatis.common.jdbc.exception.NestedSQLException: Could not start transaction.  Cause: com.ibatis.sqlmap.engine.transaction.TransactionException: ExternalTransaction initialization failed.  DataSource was null.
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.startTransaction(SqlMapExecutorDelegate.java:734)
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.startTransaction(SqlMapSessionImpl.java:164)
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.startTransaction(SqlMapClientImpl.java:141)
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoStartTransaction(SqlMapExecutorDelegate.java:896)
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:562)
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
[8/30/10 16:53:56:992 CDT] 0000003c SystemErr     R at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)

.....and many more


Loading...