在调用函数时出现Transaction错误,定位了好久,才发现,原来是dlIdToBeIgnored这个值传了个null
Map<String, String> retMap = new HashMap<String, String>();
CallableStatement callStmt = null;
String sql = "{?=call VALIDATION_UTIL.check_data(?,?,?,?,?,?,?,?)}";
callStmt = this.getConnection().prepareCall(sql);
callStmt.registerOutParameter(1, Types.VARCHAR);
callStmt.setString(2, departments);
callStmt.setString(3, fsseasons);
callStmt.setString(4, seasons);
callStmt.setString(5, clazz);
callStmt.setString(6, subclazzs);
callStmt.setString(7, collection);
callStmt.setString(8, subcollections);
callStmt.setLong(9, dlIdToBeIgnored);
Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53eeef78:c62c:5201accb:5d8 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: -53eeef78:c62c:5201accb:5d8 status: ActionStatus.ABORT_ONLY >)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
at com.ecv.util.db.WrappedDataSource.getConnection(WrappedDataSource.java:56)
at com.xpressroad.framework.context.support.ManagedConnection.getResource(ManagedConnection.java:58)
... 212 more
Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53eeef78:c62c:5201accb:5d8 status: ActionStatus.ABORT_ONLY >
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)