Bug 1031442 - HHH-8705 - Unable to persist entity with MappedSuperclass and @Lob in Oracle.
Summary: HHH-8705 - Unable to persist entity with MappedSuperclass and @Lob in Oracle.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Brett Meyer
QA Contact: Zbyněk Roubalík
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-17 23:13 UTC by dstephan
Modified: 2018-12-04 16:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-20 01:06:35 UTC
Type: Bug
Embargoed:


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

Description dstephan 2013-11-17 23:13:00 UTC
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 23:14:08 UTC
Hibernate Issue: https://hibernate.atlassian.net/browse/HHH-8705

Comment 2 dstephan 2013-11-19 06:44:38 UTC
Created attachment 825911 [details]
Entities to reproduce

Create and persist a SubEntity should reproduce the issue.

Comment 3 Brett Meyer 2013-11-19 13:27:03 UTC
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 23:36:11 UTC
Hi Brett,

My insertion code is simply:

SubEntity b = new SubEntity("TestClob", new BigInteger("1"));
b.setCode("code");
em.persist(b);

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

09:32:17,433 DEBUG [org.hibernate.SQL] (http-localhost/127.0.0.1:8080-2) 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/127.0.0.1:8080-2) binding parameter [1] as [NUMERIC] - 1
09:32:26,758 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/127.0.0.1:8080-2) binding parameter [2] as [VARCHAR] - code
09:32:26,758 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/127.0.0.1:8080-2) binding parameter [3] as [NUMERIC] - <null>
09:32:26,759 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/127.0.0.1:8080-2) binding parameter [4] as [BIGINT] - 0
09:32:26,759 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (http-localhost/127.0.0.1:8080-2) binding parameter [5] as [CLOB] - TestClob


09:34:22,168 DEBUG [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost/127.0.0.1:8080-2) could not execute statement [n/a]: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number

Comment 5 Brett Meyer 2013-11-20 01:06:35 UTC
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.