-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: IndexOutOfBoundsException with 3.2.2 release and rowid
PostPosted: Thu Mar 01, 2007 6:23 pm 
Newbie

Joined: Thu Mar 01, 2007 5:45 pm
Posts: 2
Hello,

I have trouble with the new 3.2.2 release and POJOs with activated rowid in the mapping.

On session.update() or .merge() I´m getting a IndexOutOfBoundsException for System.arraycopy(..) in the method

org.hibernate.persister.AbstractEntityPersister.getSQLUpdateByRowIdString()

May be it´s a bug.

protected String[] getSQLUpdateByRowIdStrings() {
if ( sqlUpdateByRowIdString == null ) {
throw new AssertionFailure( "no update by row id" );
}
String[] result = new String[getTableSpan()];
result[0] = sqlUpdateByRowIdString;
System.arraycopy( sqlUpdateStrings, 1, result, 1, getTableSpan() );
return result;
}

In my case "getTableSpan()" returns 1, so result[] has only index 0 and a arraycopy starting at position 1 is simply wrong!

In 3.2.1 there was a for-loop instead of system.arraycopy(..)

for ( int i = 1; i < getTableSpan(); i++ ) {
result[i] = sqlUpdateStrings[i];
}

With getTableSpan()=1 the loop was not entered and no exception occurs.


Are you agree that we can call this a bug?

Hibernate version: 3.2.2

Mapping documents: rowid must be activated

Full stack trace of any exception that occurs: IndexOutOfBoundsException

Name and version of the database you are using: Oracle 10.2


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.