openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Ousov (JIRA)" <>
Subject [jira] Created: (OPENJPA-774) Executing native queries with Firebird
Date Wed, 19 Nov 2008 03:40:46 GMT
Executing native queries with Firebird

                 Key: OPENJPA-774
             Project: OpenJPA
          Issue Type: Bug
          Components: sql
    Affects Versions: 1.2.0, 1.1.0
         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
            Reporter: Alexey Ousov

Native queries cannot be executed with Firebird database. The following exception occur:
DEBUG - Log4JLogFactory$LogAdapter.trace(72) | Executing query: [insert into ANAGRAFICHE (COD_TITOLARE,
NOME, CODICE_FISCALE, DATA_NASCITA) values (?, ?, ?, ?)] with parameters: {2=xz0FEdrz92sd,
0=43, 3=Tue Aug 30 00:00:00 UTC 1644, 1=B95JHSkDV}
WARN - GeronimoConnectionEventListener.connectionErrorOccurred(88) | connectionErrorOccurred
called with null
org.firebirdsql.jdbc.FBSQLException: You cannot set value of an non-existing parameter.
	at org.firebirdsql.jdbc.FBProcedureCall$NullParam.setValue(
	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(
	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(
	at org.apache.ode.utils.LoggingStatementWrapper.setLong(
	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(
	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(
	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(
	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(
	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(
	at org.apache.openjpa.kernel.QueryImpl.update(
	at org.apache.openjpa.kernel.QueryImpl.execute(
	at org.apache.openjpa.kernel.QueryImpl.updateAll(
	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(
	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(

Exception is thrown because for "insert" statement prepareCall is executed instead of prepareStatement.
For other databases it is the same, but Firebird's FBProcedureCall is not the same as FBPreparedStatement.
Patch for issue follows.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message