-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Regression: Insert statement fails with inconsistent datatypes on Oracle 12c driver [SPR-14191] #18764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Juergen Hoeller commented This might be a side effect of #18398... If you have any insight into what's happening there in |
Jurriaan Mous commented We could not find anything specific going wrong debugging in StatementCreatorUtils but we are not experts in what should happen. !(jdbcDriverName.startsWith("Oracle") && dbmd.getDriverMajorVersion() >= 12) Maybe an important thing to note is that we run Oracle Database 12c Release 1 (12.1.0.1) JDBC Driver to support the latest Spring version but we talk to an Oracle Database 11.2.0.4.0 instance. We updated because the 11 driver did not support the JDBC 4.1 call in JDBCUtil.java and the application crashed on it. Oracle notes that they support our Oracle DB version with the 12.1.0.x driver. |
Juergen Hoeller commented That effect is really odd since our check for Oracle 12 just prevents JDBC If I'm not missing something above, So we could check For the time being, you could set the "spring.jdbc.getParameterType.ignore" property to "true" (as a JVM system property or in a |
Juergen Hoeller commented FWIW, do you have any indication for whether On Oracle 12, according to #18398, |
Juergen Hoeller commented Realizing that this is about |
Tom Jahncke commented I ran the same issue, which the root cause is really a bug in the Oracle JDBC driver :( Here is an excerpt I added to my own internal Jira issue when I encountered the problem:
This means that you are getting inconsistent datatypes when the Oracle driver assumes you are inserting into all the columns rather than the one you specified. I did open a bug with Oracle and they eventually, created a patch for this bug. I will attached my little sample program that highlights the Oracle bugs (not even using Spring). |
Tom Jahncke commented FYI, I think even without the changes in 4.2.5 and Jira issue #18398 you were still at risk of encountering this issue, however, this change may cause you to be more exposed to this oracle jdbc driver bug. |
Juergen Hoeller commented Jurriaan Mous, does setting the "spring.jdbc.getParameterType.ignore" property to "true" (as a JVM system property or in a |
Juergen Hoeller commented Revised for 4.3.3 and 4.2.8 now: |
Juergen Hoeller commented It would be great if you could give a recent |
Jurriaan Mous opened SPR-14191 and commented
We get an inconsistent datatypes exception when we upgraded from Spring 4.2.4 to 4.2.5 on an alike statement:
It works ok if we move the timestamp to the end of the insert. (We chose in the end to downgrade)
We are using the Oracle Database 12c Release 1 (12.1.0.1) JDBC Driver.
Affects: 4.2.5
Attachments:
Issue Links:
Referenced from: commits 52447ef, 2adbfb6
Backported to: 4.2.8
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: