The method com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(String, int) has not been completed and should not be called.

Problem Description:

 I encountered a bug in the past two days. When executing the insert statement to insert data into the sybase database, it has been reporting an error. The error message:

The method com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(String, int) has not been completed and should not be called.

Baidu went around and found that no one has encountered this problem. I began to wonder where it was written wrong. I took out the sql and executed it without any problem. After checking all the steps, there is no problem. The parameter transmission is also normal. The sql that can be executed normally is written to death or an error is reported, and then the Sybase driver is replaced and rewritten in other mapper files, all of which have no effect. But the magic is performing the update without any problems. Finally, inadvertently solving this problem,

Add the following parameters to the mappper file.

<insert id="id名" parameterType="类" useGeneratedKeys="false">

The key parameter is useGeneratedKeys="false">

, Look at Baidu's explanation. This is related to self-growth. Where should it be set. I hope everyone has to help

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324463908&siteId=291194637