Oracle JDBC driver can't handle entities with a one-character name in some cases

Description

This is reproduced by running MultiCircleJpaCascadeIdentityTest or MultiCircleNonJpaCascadeIdentityTest on Oracle databases. Looks like the Oracle JDBC driver contains a bug:

Caused by: java.sql.SQLException: Invalid argument(s) in call at oracle.jdbc.driver.AutoKeyInfo.getTableName(AutoKeyInfo.java:345) at oracle.jdbc.driver.T4CConnection.doDescribeTable(T4CConnection.java:4897) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:5702) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$3.doPrepare(StatementPreparerImpl.java:117) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:172) ... 34 more

This occurs when the driver is attempting to parse the table name from an INSERT query where the inserted table name contains just one character. If you rename the entities related to the two mentioned tests so that they will have more than one character, the tests will pass.

I suggest that we add a workaround for this in our TS (so the tests don't fail) and report this to Oracle.

Web links

Activity

Show:

Vlad Mihalcea April 6, 2016 at 2:57 PM

Applied PR on master, 5.1, and 5.0

Jan Martiska March 8, 2016 at 12:57 PM

This will not make HbmWithIdentityTest pass yet, because it also fails due to HHH-10534.

Jan Martiska March 7, 2016 at 3:50 PM

Sent PRs to 5.0 and master branches

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 7, 2016 at 3:39 PM
Updated October 6, 2016 at 3:33 PM
Resolved April 6, 2016 at 2:57 PM