-->
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.  [ 3 posts ] 
Author Message
 Post subject: ArrayIndexOutOfBoundsException when delete commit
PostPosted: Tue Jan 18, 2005 6:30 am 
Newbie

Joined: Tue Jan 18, 2005 6:19 am
Posts: 3
Hibernate version:
2.16
Mapping documents:
one:
<class name="TblUser" table="tbl_user">
<cache usage="read-write"/>

<id
column="account"
name="account"
type="string"
>
<generator class="assigned" />
</id>
<set inverse="true" name="spaceSet" cascade="delete">
<cache usage="read-write"/>
<key column="account" />
<one-to-many class="TblUserSpace" />
</set>

two:
<class name="TblUserSpace" table="tbl_user_space">
<cache usage="read-write"/>

<id
column="user_space_id"
name="id"
type="integer"
>
<generator class="vm" />
<many-to-one
class="TblUser"
name="account"
not-null="true"
>
<column name="account" />
</many-to-one>
Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCParameter.write(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:684)
at net.sf.hibernate.persister.EntityPersister.update(EntityPersister.java:642)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2372)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at com.abc.mdn.file.DirAction.doDelete(DirAction.java:364)
Name and version of the database you are using:
sql server enterprise 2000
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Can anybody help me?Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 9:15 am 
jTDS Developer
jTDS Developer

Joined: Tue Feb 24, 2004 5:36 pm
Posts: 70
Location: Bucharest, Romania
Don't use the MS driver. Not with Hibernate. It has a lot of issues (you just found one of them) and missing (needed) features.

Check out the Hibernate compatibility guide for a list of drivers you can use instead. I would recommend jTDS, but take into account I'm one of the developers. Try it out and decide for yourself.

Alin,
The jTDS Project.


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Tue Jan 18, 2005 9:24 am 
Newbie

Joined: Tue Jan 18, 2005 6:19 am
Posts: 3
Thanks for your reply. I'll try replace the jdbc driver whth jTDS, and try again.


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

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.