ora-24816: expanded non LONG bind data supplied after actual LONG or LOB column

Description

While updating it throws the error:

According to this link the cause should be:

Any thoughts? I am not aware of NHibernate source code to provide a PR for this.

Environment

Windows 64 bit and backend is Orace 11g

Attachments

4

Activity

stanislav merovic 
September 20, 2017 at 7:52 AM
(edited)

I attached a simple test case for the issue, it doesnt contain joinedsubclasses, components or the like but it shows the issue.
Of course you could argue, that one could rearange the properties in the mapping but that doesn't help for joined subclasses, components etc. and as far as i am aware the id column is always appended to the end.

Sorry i forgot to remove the manual call on "TestFixtureSetUp();" since i was running the test with the integrated visual studio testing tools instead of nunit and I can't find a way to delete the attachment.

stanislav merovic 
September 20, 2017 at 6:35 AM
(edited)

This has been fixed in Hibernate about 4 years ago i think (i read it somewhere when i was searching for the ORA-24816, so dont quote me on that), but did never make it to NHibernate (isLob attribute) .
We use a customized version of NHibernate where we added the isLob attribute and sort the PropertyIterator of PersistentClass so that the lob columns are at the end of the insert/update statements.
But that doesn't work for components and that really hurts, having to work around that every time. We already tried to achieve the same with components but that would need a lot more refactoring due to the way the command/parameter order is currently generated.

The issue is, that oracle throws this error whenever a long column (clob,blob,nclob...) is followed by a varchar column and the size of these fields exceed a certain value.

insert into testtable 10000charactersnclob, 1350varchar2 for example will cause this error and as far as i am aware that's not a bug from oracle side, although I don't know the reason why this "has to break".

It would really be nice to have an option to mark columns that should be at the end of the field list of a query/statement.

Frédéric Delaporte 
May 15, 2017 at 2:15 PM

If you wish to contribute a fix, the source code and guidelines are here.

If you wish this trouble to be fixed, since it looks quite specific and unheard of among NHibernate issues, a test case reproducing it will very likely be required. Can you please provide one? Previous link also covers how to provide a test case.

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created May 15, 2017 at 7:53 AM
Updated September 20, 2017 at 9:17 AM
Who's Looking?