I am ashamed to say that I always make some small mistakes and struggle for a long time. This should not be a semicolon!
When an error occurs, the message is as follows:
Java code
[Default] [11:35:58, 552] [ERROR]
Java code
[Com. primeton. common. connection. impl. synchronization. TraceLoggerStatementSynchronization: 49]
Java code
SQL [INSERT INTO ASE_SYSTEM_LOG (LOGID, USERID, USERNAME, LOGINTIME) VALUES (?,?,?);] Execute error.
Java. SQL. SQLException: ORA-00911: invalid characters
The program code is as follows:
Java code
Copy codeThe Code is as follows: String SQL = "INSERT INTO ASE_SYSTEM_LOG (LOGID, USERID, USERNAME, LOGINTIME) VALUES (?,?,?,?); ";
Con = this. getDataSource (). getConnection ();
Ptt = con. prepareStatement (SQL );
Ptt. setLong (1, logId );
Ptt. setLong (2, userId );
Ptt. setString (3, userName );
Ptt. setString (4, loginDate );
Ptt.exe cuteUpdate ();
When the ptt. excuteUpdate () method is executed, the preceding error is reported.
I thought it was a problem with the parameter assignment in SQL, But I copied the SQL statement directly to PLSQL for execution, but there was no problem. After a long time, it turned out to beCopy codeThe Code is as follows: "insert into ASE_SYSTEM_LOG (LOGID, USERID, USERNAME, LOGINTIME) VALUES (?,?,?,?); "
There is another ";", so it's just me. I'm speechless !!!
Well, if you have a problem reporting character exceptions, you can refer to it. If you don't have a problem, never make such a low-level error again!
Tell yourself one sentence: Not careful is a bad program.