Bug 1031442 - HHH-8705 - Unable to persist entity with MappedSuperclass and @Lob in Oracle.
HHH-8705 - Unable to persist entity with MappedSuperclass and @Lob in Oracle.
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brett Meyer
Zbyněk Roubalík
Russell Dickenson
Depends On:
  Show dependency treegraph
Reported: 2013-11-17 18:13 EST by dstephan
Modified: 2015-09-01 00:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-19 20:06:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Entities to reproduce (2.40 KB, application/x-zip-compressed)
2013-11-19 01:44 EST, dstephan
no flags Details

  None (edit)
Description dstephan 2013-11-17 18:13:00 EST
Issue is very similar to https://hibernate.atlassian.net/browse/HHH-4635.

The difference is that they have a MappedSuperclass (containing the @Lob)
This results in the Lob column appearing somewhere in the middle of the columns in the insert clause, however the Clob parameter is last in the bindings.
Comment 1 dstephan 2013-11-17 18:14:08 EST
Hibernate Issue: https://hibernate.atlassian.net/browse/HHH-8705
Comment 2 dstephan 2013-11-19 01:44:38 EST
Created attachment 825911 [details]
Entities to reproduce

Create and persist a SubEntity should reproduce the issue.
Comment 3 Brett Meyer 2013-11-19 08:27:03 EST
Dave, still not able to reproduce on oracle11gR2 and ORM 4.2.0.SP1 (EAP 6.1.1) -- can you post your insertion code?  Not sure what else is missing.
Comment 4 dstephan 2013-11-19 18:36:11 EST
Hi Brett,

My insertion code is simply:

SubEntity b = new SubEntity("TestClob", new BigInteger("1"));

Which results in this insert statement and parameters, and the following exception:

09:32:17,433 DEBUG [org.hibernate.SQL] (http-localhost/ insert into SubEntity (SUBENTITYID, MYCLOB, UFLAGS, CODE, FLAGS, VERSION) values (MMSSEQ.nextval, ?, ?, ?, ?, ?)

09:32:26,757 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/ binding parameter [1] as [NUMERIC] - 1
09:32:26,758 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/ binding parameter [2] as [VARCHAR] - code
09:32:26,758 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/ binding parameter [3] as [NUMERIC] - <null>
09:32:26,759 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/ binding parameter [4] as [BIGINT] - 0
09:32:26,759 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/ binding parameter [5] as [CLOB] - TestClob

09:34:22,168 DEBUG [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost/ could not execute statement [n/a]: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
Comment 5 Brett Meyer 2013-11-19 20:06:35 EST
The real issue ended up as a duplicate of https://hibernate.atlassian.net/browse/HHH-8103 which was fixed in ORM 4.2.1 and therefore already in EAP 6.2.0.  Closing.

Note You need to log in before you can comment on or make changes to this bug.