You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Andreas Tomik (JIRA)" <ji...@apache.org> on 2010/10/24 12:27:26 UTC
[jira] Created: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
--------------------------------------------------------------------------------
Key: OPENJPA-1853
URL: https://issues.apache.org/jira/browse/OPENJPA-1853
Project: OpenJPA
Issue Type: Bug
Components: sql
Affects Versions: 2.0.1, 2.0.0
Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
Reporter: Andreas Tomik
Priority: Critical
I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
... 4 more
Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
... 8 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
... 28 more
Caused by: java.sql.SQLException: The driver does not support this function.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
... 33 more
I have the following in persistence.xml
...
<property name="openjpa.jdbc.DBDictionary" value="db2"/>
<property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
<property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
...
In Version 1.2.3 this function works fine.
Thank you,
Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Andreas Tomik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924844#action_12924844 ]
Andreas Tomik commented on OPENJPA-1853:
----------------------------------------
Yes, i use the VM argument "javaagent" for entity enhancement.
I tried the workaround with "db2(supportsGetGeneratedKeys=false)", it resolve the problem. Thank you Jeremy
Enclosed the desired trace output:
Toolbox for Java - Open Source Software, JTOpen 7.1, codebase 5770-SS1 V7R1M0.02
Di Okt 26 07:15:58:247 MESZ 2010 as400: Properties (3786945) : access = "all".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : block size = "32".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : block criteria = "2".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : date format = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : date separator = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : decimal separator = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : errors = "basic".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : extended dynamic = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : libraries = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : naming = "sql".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package add = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package cache = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package clear = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package error = "warning".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package library = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : password = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : prefetch = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : prompt = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : remarks = "system".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : sort = "hex".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : sort language = "ENU".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : sort table = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : sort weight = "shared".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : time format = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : time separator = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : trace = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : transaction isolation = "read uncommitted".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : translate binary = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : user = "m0006289".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package criteria = "default".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : lob threshold = "32768".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : secure = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : data truncation = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : proxy server = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : secondary URL = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : data compression = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : big decimal = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : thread used = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : cursor hold = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : lazy close = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : driver = "toolbox".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : bidi string type = "5".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : key ring name = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : key ring password = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : full open = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : server trace = "0".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : database name = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : extended metadata = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : cursor sensitivity = "asensitive".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : behavior override = "0".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : package ccsid = "13488".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : minimum divide scale = "0".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : maximum precision = "31".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : maximum scale = "31".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : translate hex = "character".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : toolbox trace = "jdbc".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : qaqqinilib = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : login timeout = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : true autocommit = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : bidi implicit reordering = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : bidi numeric ordering = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : hold input locators = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : hold statements = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : rollback cursor hold = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : variable field compression = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : query optimize goal = "0".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : keep alive = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : receive buffer size = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : send buffer size = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : XA loosely coupled support = "0".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : translate boolean = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : metadata source = "-1".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : query storage limit = "-1".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : decfloat rounding mode = "half even".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : autocommit exception = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : auto commit = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : ignore warnings = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : secure current user = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : concurrent access resolution = "0".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : jvm16 synchronize = "true".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : socket timeout = "".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : use block update = "false".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Properties (3786945) : maximum blocked input rows = "32000".
Di Okt 26 07:15:58:262 MESZ 2010 as400: Driver AS/400 Toolbox for Java JDBC Driver (11867140) : Using IBM Toolbox for Java JDBC driver implementation.
Di Okt 26 07:15:58:403 MESZ 2010 as400: Properties (3786945) : metadata source = "0".
Di Okt 26 07:15:58:403 MESZ 2010 as400: Toolbox for Java - Open Source Software, JTOpen 7.1, codebase 5770-SS1 V7R1M0.02
Di Okt 26 07:15:58:403 MESZ 2010 as400: JDBC Level: 40
Di Okt 26 07:15:58:403 MESZ 2010 as400: Properties (3786945) : package ccsid = "13488".
Di Okt 26 07:15:58:403 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Client CCSID = 13488.
Di Okt 26 07:15:58:403 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Setting server NLV = 2929.
Di Okt 26 07:15:58:403 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Client functional level = V7R1M01 .
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Data compression = RLE.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : ROWID supported = true.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : True auto-commit supported = true.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : 128 byte column names supported = true.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Maximum decimal precision = 31.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Maximum decimal scale = 31.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Minimum divide scale = 0.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Translate hex = character.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : query optimize goal = 0.
Di Okt 26 07:15:58:419 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Using extended datastreams.
Di Okt 26 07:15:58:434 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : JDBC driver major version = 9.
Di Okt 26 07:15:58:434 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : IBM i VRM = V5R4M0.
Di Okt 26 07:15:58:434 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Server CCSID = 273.
Di Okt 26 07:15:58:434 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Server functional level = V5R4M00014 (14).
Di Okt 26 07:15:58:434 MESZ 2010 as400: Connection 172.25.1.210 (29616570) : Server job identifier = 056769/QUSER/QZDASOINIT.
Di Okt 26 07:15:58:434 MESZ 2010 as400: Properties (3786945) : decimal separator = ".".
Di Okt 26 07:15:58:434 MESZ 2010 as400: Properties (3786945) : date format = "dmy".
Di Okt 26 07:15:58:434 MESZ 2010 as400: Properties (3786945) : date separator = ".".
Di Okt 26 07:15:58:434 MESZ 2010 as400: Properties (3786945) : time format = "hms".
Di Okt 26 07:15:58:434 MESZ 2010 as400: Properties (3786945) : time separator = ":".
Di Okt 26 07:15:58:450 MESZ 2010 as400: Connection JLMTEST (29616570) open.
Di Okt 26 07:15:58:450 MESZ 2010 as400: Connection JLMTEST (29616570) : Auto commit = "true".
Di Okt 26 07:15:58:450 MESZ 2010 as400: Connection JLMTEST (29616570) : Read only = "false".
Di Okt 26 07:15:58:450 MESZ 2010 as400: Connection JLMTEST (29616570) : Transaction isolation = "1".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) open. Parent: Connection JLMTEST (29616570) .
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Escape processing = "true".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Fetch direction = "1000".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Fetch size = "0".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Max field size = "0".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Max rows = "0".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Query timeout = "0".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Result set concurrency = "1007".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Result set holdability = "1".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Result set type = "1003".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Behavior Override = "0".
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Data to correlate statement with cursor Cursor CRSR0001 (18423897) .
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Query timeout = "0".
547 pu.entwicklung_fertigung TRACE [main] openjpa.jdbc.SQL - <t 16658781, conn 29616570> executing stmnt 9110923 SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1
Di Okt 26 07:15:58:466 MESZ 2010 as400: Statement STMT0001 (9110923) : Executing query, SQL Statement -->[SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1].
Di Okt 26 07:15:58:762 MESZ 2010 as400: Statement STMT0001 (9110923) : Prepared STMT0001*, SQL Statement -->[SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1].
Di Okt 26 07:15:58:778 MESZ 2010 as400: Cursor CRSR0001 (18423897) open.
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) open. Parent: Statement STMT0001 (9110923) .
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) : Conncurrency = "1007".
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) : Fetch direction = "1000".
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) : Fetch size = "0".
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) : Max rows = "0".
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) : Type = "1003".
Di Okt 26 07:15:58:794 MESZ 2010 as400: Statement STMT0001 (9110923) : Executed STMT0001*, SQL Statement --> [SELECT CURRENT SCHEMA FROM SYSIBM.SYSDUMMY1].
Di Okt 26 07:15:58:794 MESZ 2010 as400: Statement STMT0001 (9110923) : Update count = -1.
Di Okt 26 07:15:58:794 MESZ 2010 as400: Statement STMT0001 (9110923) : Result set = true.
Di Okt 26 07:15:58:794 MESZ 2010 as400: Statement STMT0001 (9110923) : Number of result sets = 0.
Di Okt 26 07:15:58:794 MESZ 2010 as400: Statement STMT0001 (9110923) : Row count estimate = 1.
875 pu.entwicklung_fertigung TRACE [main] openjpa.jdbc.SQL - <t 16658781, conn 29616570> [328 ms] spent
Di Okt 26 07:15:58:794 MESZ 2010 as400: Cursor CRSR0001 (18423897) : Closing with reuse flag = 241.
Di Okt 26 07:15:58:794 MESZ 2010 as400: Cursor CRSR0001 (18423897) closed.
Di Okt 26 07:15:58:794 MESZ 2010 as400: ResultSet CRSR0001 (17165167) closed.
Di Okt 26 07:15:58:794 MESZ 2010 as400: Statement STMT0001 (9110923) closed.
Di Okt 26 07:15:58:794 MESZ 2010 as400: Connection JLMTEST (29616570) : Transaction isolation = "2".
Di Okt 26 07:15:58:809 MESZ 2010 as400: Connection JLMTEST (29616570) closed.
EntityManager LaborprobeBean: 1094
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : access = "all".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : block size = "32".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : block criteria = "2".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : date format = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : date separator = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : decimal separator = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : errors = "basic".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : extended dynamic = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : libraries = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : naming = "sql".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package add = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package cache = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package clear = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package error = "warning".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package library = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : password = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : prefetch = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : prompt = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : remarks = "system".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : sort = "hex".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : sort language = "ENU".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : sort table = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : sort weight = "shared".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : time format = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : time separator = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : trace = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : transaction isolation = "read uncommitted".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : translate binary = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : user = "m0006289".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package criteria = "default".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : lob threshold = "32768".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : secure = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : data truncation = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : proxy server = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : secondary URL = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : data compression = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : big decimal = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : thread used = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : cursor hold = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : lazy close = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : driver = "toolbox".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : bidi string type = "5".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : key ring name = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : key ring password = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : full open = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : server trace = "0".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : database name = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : extended metadata = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : cursor sensitivity = "asensitive".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : behavior override = "0".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : package ccsid = "13488".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : minimum divide scale = "0".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : maximum precision = "31".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : maximum scale = "31".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : translate hex = "character".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : toolbox trace = "jdbc".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : qaqqinilib = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : login timeout = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : true autocommit = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : bidi implicit reordering = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : bidi numeric ordering = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : hold input locators = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : hold statements = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : rollback cursor hold = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : variable field compression = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : query optimize goal = "0".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : keep alive = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : receive buffer size = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : send buffer size = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : XA loosely coupled support = "0".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : translate boolean = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : metadata source = "-1".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : query storage limit = "-1".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : decfloat rounding mode = "half even".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : autocommit exception = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : auto commit = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : ignore warnings = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : secure current user = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : concurrent access resolution = "0".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : jvm16 synchronize = "true".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : socket timeout = "".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : use block update = "false".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Properties (20578834) : maximum blocked input rows = "32000".
Di Okt 26 07:15:59:091 MESZ 2010 as400: Driver AS/400 Toolbox for Java JDBC Driver (11867140) : Using IBM Toolbox for Java JDBC driver implementation.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Properties (20578834) : metadata source = "0".
Di Okt 26 07:15:59:106 MESZ 2010 as400: Toolbox for Java - Open Source Software, JTOpen 7.1, codebase 5770-SS1 V7R1M0.02
Di Okt 26 07:15:59:106 MESZ 2010 as400: JDBC Level: 40
Di Okt 26 07:15:59:106 MESZ 2010 as400: Properties (20578834) : package ccsid = "13488".
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Client CCSID = 13488.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Setting server NLV = 2929.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Client functional level = V7R1M01 .
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Data compression = RLE.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : ROWID supported = true.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : True auto-commit supported = true.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : 128 byte column names supported = true.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Maximum decimal precision = 31.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Maximum decimal scale = 31.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Minimum divide scale = 0.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Translate hex = character.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : query optimize goal = 0.
Di Okt 26 07:15:59:106 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Using extended datastreams.
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : JDBC driver major version = 9.
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : IBM i VRM = V5R4M0.
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Server CCSID = 273.
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Server functional level = V5R4M00014 (14).
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection 172.25.1.210 (23802395) : Server job identifier = 056769/QUSER/QZDASOINIT.
Di Okt 26 07:15:59:137 MESZ 2010 as400: Properties (20578834) : decimal separator = ".".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Properties (20578834) : date format = "dmy".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Properties (20578834) : date separator = ".".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Properties (20578834) : time format = "hms".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Properties (20578834) : time separator = ":".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection JLMTEST (23802395) open.
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection JLMTEST (23802395) : Auto commit = "true".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection JLMTEST (23802395) : Read only = "false".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection JLMTEST (23802395) : Transaction isolation = "1".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection JLMTEST (23802395) : Transaction isolation = "2".
Di Okt 26 07:15:59:137 MESZ 2010 as400: Connection JLMTEST (23802395) : Auto commit = "false".
Di Okt 26 07:15:59:153 MESZ 2010 as400: Connection JLMTEST (23802395) : Throwing exception, sqlState: IM001 reason: The driver does not support this function. vendor code -99999.java.sql.SQLException: The driver does not support this function.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
Di Okt 26 07:15:59:153 MESZ 2010 as400: Connection JLMTEST (23802395) : Testing to see if cursors should be held..
Di Okt 26 07:15:59:153 MESZ 2010 as400: Connection JLMTEST (23802395) : Transaction rollback.
Di Okt 26 07:15:59:153 MESZ 2010 as400: Connection JLMTEST (23802395) : Auto commit = "true".
Di Okt 26 07:15:59:153 MESZ 2010 as400: Connection JLMTEST (23802395) closed.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924591#action_12924591 ]
Jeremy Bauer commented on OPENJPA-1853:
---------------------------------------
In OpenJPA 2.x, a JDBC 3.0 enhancement for returning auto generated keys from a prepared statement was enabled by default based upon the JDBC driver level. I've found that the toolbox driver running against a V5R4 system does not support this functionality on the server side. This function does exist on the server side on V7R1 (and possibly V6), but only seems to work with the non-XA driver. That's why I've been having issues only in an app server environment running against a V7R1 server.
The good news is that there's a simple workaround. Adding this property to your persistence.xml will go back to the "old way" of doing business.
<property name="openjpa.jdbc.DBDictionary" value="db2(supportsGetGeneratedKeys=false)"/>
I'll work on a code fix that checks the iSeries version in addition to the JDBC driver level and possibly whether the driver is XA (if that turns out to be a limitation rather than a bug) to determine how this value should be set.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924401#action_12924401 ]
Jeremy Bauer commented on OPENJPA-1853:
---------------------------------------
Thanks so much for the test code. I'll give it a try and let you know what I find.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Andreas Tomik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Tomik updated OPENJPA-1853:
-----------------------------------
Attachment: (was: createTable.sql)
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Fix For: 2.1.0
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924560#action_12924560 ]
Jeremy Bauer commented on OPENJPA-1853:
---------------------------------------
Unfortunately, your test ran successfully on my system. The iSeries is at OS level V7R1 though. I'm trying to get access to a V5R4 system. Could you run on your system with toolbox jdbc trace turned on and post the output? There may be some clues in there.
<property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema;trace=true;toolbox trace=jdbc"/>
In addition, what type of entity enhancement are you using? The javaagent?
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (OPENJPA-1853) iSeries DB2 problem
with using @GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Andreas Tomik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924343#action_12924343 ]
Andreas Tomik edited comment on OPENJPA-1853 at 10/24/10 4:57 PM:
------------------------------------------------------------------
Hi Jeremy,
i attached a simple JSE Test. I hope this helps you.
Please do not hesitate to contact me if you have any further questions.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924703#action_12924703 ]
Jeremy Bauer commented on OPENJPA-1853:
---------------------------------------
Auto generated keys are supported with OS V6R1 and later. Although, toolbox/JTOpen appears to have a bug in this area when using an XA data source, but it won't affect non-XA users. The JTOpen developers have been notified of the the XA issue and have been provided a simple test case to reproduce the problem.
A simple change was committed to 2.1.x/trunk under revision 1027250 that reverts back to the OpenJPA 1.x.x method of getting generated ids for V5R4 and prior OS levels.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Andreas Tomik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Tomik updated OPENJPA-1853:
-----------------------------------
Attachment: (was: JSETest.zip)
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Fix For: 2.1.0
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Bauer resolved OPENJPA-1853.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
Please verify that this problem is corrected in trunk/2.1.0 as of the noted revision.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
> Fix For: 2.1.0
>
> Attachments: createTable.sql, JSETest.zip
>
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924317#action_12924317 ]
Jeremy Bauer commented on OPENJPA-1853:
---------------------------------------
Hi Andreas. I've been looking at what looks to be the same issue - identity column id, iSeries toolbox driver with 2.1.0 snapshot, but haven't yet been able to reproduce it outside of an app server environment. It looks to be caused by some odd sql getting generated. If you could post a simple JSE test that would really help things along.
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-1853) iSeries DB2 problem with using
@GeneratedValue(strategy=GenerationType.IDENTITY)
Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Bauer reassigned OPENJPA-1853:
-------------------------------------
Assignee: Jeremy Bauer
> iSeries DB2 problem with using @GeneratedValue(strategy=GenerationType.IDENTITY)
> --------------------------------------------------------------------------------
>
> Key: OPENJPA-1853
> URL: https://issues.apache.org/jira/browse/OPENJPA-1853
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.0.0, 2.0.1
> Environment: DB2 on IBM iSeries V5R4, jt400.jar (JTOpen)
> Reporter: Andreas Tomik
> Assignee: Jeremy Bauer
> Priority: Critical
>
> I get the following error when I try to insert new row to a table that has a "generated always Identity" Column.
> Exception in thread "main" <openjpa-2.0.1-r422266:989424 fatal store error> org.apache.openjpa.persistence.RollbackException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:584)
> at de.meyerwerft.qs.laborpruef.laborprobe.dbaccess.LaborprobeBean.crtTest(LaborprobeBean.java:38)
> at de.meyerwerft.test.JSE_Client.jlm_run(JSE_Client.java:35)
> at de.meyerwerft.test.JSE_Client.<init>(JSE_Client.java:10)
> at de.meyerwerft.test.JSE_Client.main(JSE_Client.java:17)
> Caused by: <openjpa-2.0.1-r422266:989424 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1963)
> at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
> at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
> at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
> at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:560)
> ... 4 more
> Caused by: org.apache.commons.lang.exception.NestableRuntimeException: An error occurred attempting to invoke JDBC 3 method. Your driver or database may not support JDBC 3 features.
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:577)
> at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:571)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:563)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.prepareStatement(PreparedStatementManagerImpl.java:287)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:112)
> at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
> at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
> at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106)
> at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
> at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
> at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:731)
> at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
> at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
> at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
> at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.openjpa.lib.jdbc.DelegatingConnection.invokeJDBC3(DelegatingConnection.java:593)
> ... 28 more
> Caused by: java.sql.SQLException: The driver does not support this function.
> at com.ibm.as400.access.JDError.throwSQLException(JDError.java:415)
> at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2210)
> ... 33 more
> I have the following in persistence.xml
> ...
> <property name="openjpa.jdbc.DBDictionary" value="db2"/>
> <property name="openjpa.ConnectionDriverName" value="com.ibm.as400.access.AS400JDBCDriver"/>
> <property name="openjpa.ConnectionURL" value="jdbc:as400://myserver/myschema"/>
> ...
> In Version 1.2.3 this function works fine.
> Thank you,
> Andreas Tomik
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.