empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain Becam <Alain.Be...@embl.de>
Subject Strange problem with Date while inserting
Date Wed, 27 Feb 2013 15:19:10 GMT
Hi all,
      I have an insert which is called a lot (several time per seconds, 24h/24h), and very
rarely, something like once in a week, I get an SQL error because the date is not quoted.
It is a very simple insert, and so works something like 99.9% of the time. Still I am curious
to know what happen. Here is the relevant part of the raised exception:


Insert new search terms org.apache.empire.db.exceptions.QueryFailedException: Error executing
query INSERT INTO SEARCH_TERMS_LOG( SEARCH_TERMS, IS_LOCAL, AT_TIME, FROM_IP) VALUES ( 'XXXX',
1, Thu Feb 21 10:27:45 CET 2013, '10.11.4.119').
Native error is INSERT INTO SEARCH_TERMS_LOG( SEARCH_TERMS, IS_LOCAL, AT_TIME, FROM_IP) VALUES
( 'XXXX', 1, Thu Feb 21 10:27:45 CET 2013, '10.11.4.119').
	at org.apache.empire.db.DBDatabase.executeSQL(DBDatabase.java:1037)
	at org.apache.empire.db.DBRowSet.updateRecord(DBRowSet.java:711)
	at org.apache.empire.db.DBRecord.update(DBRecord.java:683)
	at de.embl.common.core.logging.DBRecordLoggingWrapper.update(DBRecordLoggingWrapper.java:89)
	...
Caused by: java.sql.SQLSyntaxErrorException: ORA-00917: missing comma

	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
	at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
	at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1822)
	at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1787)
	at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:280)
	at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
	at org.apache.empire.db.DBDatabaseDriver.executeSQL(DBDatabaseDriver.java:535)
	at org.apache.empire.db.DBDatabase.executeSQL(DBDatabase.java:1025)
	... 26 common frames omitted

The DBRecordLoggingWrapper is simply saving udpate/insert informations if needed, and in that
case it is doing nothing, just calling back the DBRecord methods. Still it could do something
wrong, I simply don't see what.
Best regards,
     Alain


Mime
View raw message