You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Alexey Ousov (JIRA)" <ji...@apache.org> on 2008/11/19 04:40:46 UTC

[jira] Created: (OPENJPA-774) Executing native queries with Firebird

Executing native queries with Firebird
--------------------------------------

                 Key: OPENJPA-774
                 URL: https://issues.apache.org/jira/browse/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(FBProcedureCall.java:424)
	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)

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.


[jira] Updated: (OPENJPA-774) Executing native queries with Firebird

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-774:
---------------------------------

    Fix Version/s:     (was: 2.0.0-beta2)
                       (was: 2.0.0-beta)
                       (was: 2.0.0)
                   2.0.0-beta3

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0, 1.3.0, 2.0.0-M2
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>            Assignee: Kevin Sutter
>             Fix For: 1.3.0, 2.0.0-beta3
>
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.


[jira] Updated: (OPENJPA-774) Executing native queries with Firebird

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter updated OPENJPA-774:
---------------------------------

    Affects Version/s: 2.0.0
                       1.3.0

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0, 1.3.0, 2.0.0
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>            Assignee: Kevin Sutter
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.


[jira] Assigned: (OPENJPA-774) Executing native queries with Firebird

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter reassigned OPENJPA-774:
------------------------------------

    Assignee: Kevin Sutter

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>            Assignee: Kevin Sutter
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.


[jira] Updated: (OPENJPA-774) Executing native queries with Firebird

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter updated OPENJPA-774:
---------------------------------

    Fix Version/s: 2.0.0-beta
                   2.0.0-beta2

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0, 1.3.0, 2.0.0-M2
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>            Assignee: Kevin Sutter
>             Fix For: 1.3.0, 2.0.0-beta, 2.0.0-beta2, 2.0.0
>
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.


[jira] Updated: (OPENJPA-774) Executing native queries with Firebird

Posted by "Alexey Ousov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Ousov updated OPENJPA-774:
---------------------------------

    Attachment: OPENJPA-774.patch

patch for issue

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.


[jira] Resolved: (OPENJPA-774) Executing native queries with Firebird

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Sutter resolved OPENJPA-774.
----------------------------------

    Resolution: Fixed

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0, 1.3.0, 2.0.0-M2
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>            Assignee: Kevin Sutter
>             Fix For: 1.3.0, 2.0.0, 2.0.0-beta2, 2.0.0-beta
>
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.


[jira] Updated: (OPENJPA-774) Executing native queries with Firebird

Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Milosz Tylenda updated OPENJPA-774:
-----------------------------------

    Fix Version/s: 2.0.0
                   1.3.0

Kevin, how about making this resolved?

> Executing native queries with Firebird
> --------------------------------------
>
>                 Key: OPENJPA-774
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-774
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.1.0, 1.2.0, 1.3.0, 2.0.0-M2
>         Environment: Tomcat 5.5, OpenJPA 1.1.0, Firebird 2.1
>            Reporter: Alexey Ousov
>            Assignee: Kevin Sutter
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: OPENJPA-774.patch
>
>
> 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(FBProcedureCall.java:424)
> 	at org.firebirdsql.jdbc.AbstractCallableStatement.setLong(AbstractCallableStatement.java:1094)
> 	at org.tranql.connector.jdbc.PreparedStatementHandle.setLong(PreparedStatementHandle.java:247)
> 	at org.apache.ode.utils.LoggingStatementWrapper.setLong(LoggingStatementWrapper.java:495)
> 	at org.apache.openjpa.lib.jdbc.DelegatingCallableStatement.setLong(DelegatingCallableStatement.java:299)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setLong(DBDictionary.java:998)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1283)
> 	at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:568)
> 	at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:231)
> 	at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1038)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:808)
> 	at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)
> 	at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:573)
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:319)
> 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.