问题描述
2735[JobManager.java:98:ERROR]Cannotloadjobsfromdatasource.com.sailing.core.entity.GenericDataSourceException:SQLExceptionwhileexecutingthefollowing:SELECTJOB_NAME,RUN_TIME,SERVICE_NAME,LOADER_NAME,RUNTIME_DATA_ID,RECURRENCE_INFO_ID,START_DATE_TIME,FINISH_DATE_TIMEFROMJOB_SANDBOXWHERE(RUN_TIME<?)AND(START_DATE_TIMEISNULL)ORDERBYRUN_TIME([Microsoft][SQLServer2000DriverforJDBC]Can'tstartaclonedconnectionwhileinmanualtransactionmode.)atcom.sailing.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:295)atcom.sailing.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1153)atcom.sailing.core.entity.GenericDAO.selectByCondition(GenericDAO.java:1001)atcom.sailing.core.entity.GenericHelperDAO.findByCondition(GenericHelperDAO.java:162)atcom.sailing.core.entity.GenericDelegator.findByCondition(GenericDelegator.java:1100)atcom.sailing.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:1006)atcom.sailing.core.service.job.JobManager.poll(JobManager.java:96)atcom.sailing.core.service.job.JobPoller.run(JobPoller.java:89)atjava.lang.Thread.run(Thread.java:534)java.sql.SQLException:[Microsoft][SQLServer2000DriverforJDBC]Can'tstartaclonedconnectionwhileinmanualtransactionmode.atcom.microsoft.jdbc.base.BaseExceptions.createException(UnknownSource)atcom.microsoft.jdbc.base.BaseExceptions.getException(UnknownSource)atcom.microsoft.jdbc.base.BaseConnection.getImplConnection(UnknownSource)atcom.microsoft.jdbc.base.BaseStatement.setupImplConnection(UnknownSource)atcom.microsoft.jdbc.base.BaseStatement.<init>(UnknownSource)atcom.microsoft.jdbc.base.BasePreparedStatement.<init>(UnknownSource)atcom.microsoft.jdbc.base.BaseConnection.prepareStatement(UnknownSource)attyrex.resource.jdbc.xa.TyrexConnection.prepareStatement(TyrexConnection.java:130)atcom.sailing.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:290)atcom.sailing.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1153)atcom.sailing.core.entity.GenericDAO.selectByCondition(GenericDAO.java:1001)atcom.sailing.core.entity.GenericHelperDAO.findByCondition(GenericHelperDAO.java:162)atcom.sailing.core.entity.GenericDelegator.findByCondition(GenericDelegator.java:1100)atcom.sailing.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:1006)atcom.sailing.core.service.job.JobManager.poll(JobManager.java:96)atcom.sailing.core.service.job.JobPoller.run(JobPoller.java:89)atjava.lang.Thread.run(Thread.java:534)3032[SQLProcessor.java:138:WARN][SQLProcessor.rollback]:SQLExceptionwhilerollingbackinsert.Errorwas:java.sql.SQLException:[Microsoft][SQLServer2000DriverforJDBC]Objecthasbeenclosed.3032[SQLProcessor.java:139:WARN]com.sailing.core.entity.jdbc.SQLProcessorjava.sql.SQLException:[Microsoft][SQLServer2000DriverforJDBC]Objecthasbeenclosed.atcom.microsoft.jdbc.base.BaseExceptions.createException(UnknownSource)atcom.microsoft.jdbc.base.BaseExceptions.getException(UnknownSource)atcom.microsoft.jdbc.base.BaseConnection.validateClosedState(UnknownSource)atcom.microsoft.jdbc.base.BaseConnection.rollback(UnknownSource)attyrex.resource.jdbc.xa.TyrexConnection.rollback(TyrexConnection.java:330)attyrex.resource.jdbc.xa.ClientConnection.rollback(ClientConnection.java:184)atcom.sailing.core.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:128)atcom.sailing.core.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:112)atcom.sailing.core.entity.jdbc.SQLProcessor.close(SQLProcessor.java:150)atcom.sailing.core.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:671)atjava.lang.ref.Finalizer.invokeFinalizeMethod(NativeMethod)atjava.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)atjava.lang.ref.Finalizer.access$100(Finalizer.java:14)atjava.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)3032[SQLProcessor.java:673:ERROR]Errorclosingtheresult,connection,etcinfinalizeEntityListIteratorcom.sailing.core.entity.GenericDataSourceException:SQLExceptionoccurredoncommit([Microsoft][SQLServer2000DriverforJDBC]Objecthasbeenclosed.)atcom.sailing.core.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:113)atcom.sailing.core.entity.jdbc.SQLProcessor.close(SQLProcessor.java:150)atcom.sailing.core.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:671)atjava.lang.ref.Finalizer.invokeFinalizeMethod(NativeMethod)atjava.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)atjava.lang.ref.Finalizer.access$100(Finalizer.java:14)atjava.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)java.sql.SQLException:[Microsoft][SQLServer2000DriverforJDBC]Objecthasbeenclosed.atcom.microsoft.jdbc.base.BaseExceptions.createException(UnknownSource)atcom.microsoft.jdbc.base.BaseExceptions.getException(UnknownSource)atcom.microsoft.jdbc.base.BaseConnection.validateClosedState(UnknownSource)atcom.microsoft.jdbc.base.BaseConnection.isReadOnly(UnknownSource)attyrex.resource.jdbc.xa.TyrexConnection.isReadOnly(TyrexConnection.java:358)attyrex.resource.jdbc.xa.ClientConnection.commit(ClientConnection.java:163)atcom.sailing.core.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:110)atcom.sailing.core.entity.jdbc.SQLProcessor.close(SQLProcessor.java:150)atcom.sailing.core.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:671)atjava.lang.ref.Finalizer.invokeFinalizeMethod(NativeMethod)atjava.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)atjava.lang.ref.Finalizer.access$100(Finalizer.java:14)atjava.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)WebappLoader[]:DeployingclassrepositoriestoworkdirectoryD:nxj-jhTomcatworkContextConfig[]:Addedcertificates->requestattributeValveStandardManager[]:Seedingrandomnumbergeneratorclassjava.security.SecureRandomStandardManager[]:SeedingofrandomnumbergeneratorhasbeencompletedHostConfig[localhost]:Deployingconfigurationdescriptorserver8080.xmlHttpConnector[803]StartingbackgroundthreadHttpConnector[8443]Startingbackgroundthreadmssql的端口设置是对的,连接别人的数据库是可以连,但连我的有错误提示!
解决方案
解决方案二:
难道没有打SP4的补丁?
解决方案三:
是因为commit设置为false了,查资料,对URL做修改:jdbc:microsoft:sqlserver://localhost:1433;user=test;password=secret;SelectMethod=cursor;问题解决。
解决方案四:
学习了,下次遇到类似的问题又多了一种解决办法。
解决方案五:
看来楼主以后要多加注意呀