java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a
cloned connection while in manual transaction mode.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Sour
ce)
at com.microsoft.jdbc.base.BaseStatement.setupImplConnection(Unknown Sou
rce)
at com.microsoft.jdbc.base.BaseStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Sourc
e)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Sourc
e)
at com.learndiary.website.dao.LearnDiaryDB.postArticle(LearnDiaryDB.java
:792)
at com.learndiary.website.action.disgoal.PostAdvice0Action.execute(PostA
dvice0Action.java:89)
3 thoughts on “在我本地添加目标的时候会报错”
Comments are closed.
没有在其它数据库上用过
你的数据库服务在连接时就出错了,看看你的数据源是否配置争确,
private String dbUrl = "jdbc:mysql://localhost:3306/learndiarydb?useUnicode=true&characterEncoding=GB2312";
修改这行代码
如果你的用户名,和密码一不同,也应该修改!
我用的是sql server 做的数据库,报这个错的问题解决了,是因为在一个事务里面创建了多个ResultSet 或者 Statement 或者PrepareStatment. 大家看看自己的是不是这样的问题。