Sybase存储过程报transaction mode错误

 

报错信息:

11:17:53,375 ERROR [AlarmCoreDAO] 告警取消错误:

com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'sfa_ams_handle_can' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.

 

        at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:3281)

        at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2548)

        at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)

        at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220)

        at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203)

        at com.sybase.jdbc2.jdbc.SybStatement.executeLoop(SybStatement.java:1785)

        at com.sybase.jdbc2.jdbc.SybCallableStatement.execute(SybCallableStatement.java:156)

        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:276)

        at com.boco.alarm.commom.service.dao.AlarmCoreDAODnmsMutiFilterImpl.cancelAlarms(AlarmCoreDAODnmsMutiFilterImpl.java:262)

        at com.boco.alarm.common.service.impl.CancelAlarmService.process(CancelAlarmService.java:69)

        at com.boco.alarm.common.service.ServiceListenerFactory$ServiceListenerImpl.run(Unknown Source)

        at java.lang.Thread.run(Thread.java:595)

 

解决办法:

在数据库中执行sp_procxmode sfa_ams_handle_can, 'anymode'即可。sfa_ams_handle_can是存储过程名。


 

你可能感兴趣的:(java,DAO,jdbc,jboss,Sybase)