-->
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.  [ 2 posts ] 
Author Message
 Post subject: java.lang.NegativeArraySizeException , one-to-many associati
PostPosted: Sat Mar 27, 2004 4:16 pm 
Newbie

Joined: Sat Jan 10, 2004 5:45 pm
Posts: 12
Location: Hong Kong
hi all,

when i persist a table entry by hibernate session, i got following errors

i would like to ask , what would be the source of the error, and how can i solve it , thx very much in advance


java.lang.NegativeArraySizeException
at org.postgresql.jdbc1.AbstractJdbc1Statement.setBinaryStream(AbstractJ
dbc1Statement.java:1275)
at net.sf.hibernate.type.BinaryType.set(BinaryType.java:21)
at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:46)
at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:31)
at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.
java:371)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:476)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.jav
a:454)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.j
ava:20)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2100)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2061)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2005)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.j
ava:57)
at hk.hku.csis.wsr.database.PersistMessageHibernateImpl.persist(PersistM
essageHibernateImpl.java:349)

++++++++++++++++++++++++++++++++++++
my code is as follows

public persist(session, ... ) {
...
sess.save(ack);
sess.save(fault);
sess.save(incoming);
sess.save(request);
}

public persistIncoming() {

....
tx = sess.beginTransaction();

String filePath = getFilePath();

persist(sess, ...);
tx.commit(); <-- error comes here
}

=============================================

class name="hk.hku.csis.wsr.database.table.Request" table="request">
<composite-id>

<key-property name="groupId" type="string" length="255" column="c_groupId"/>
<key-property name="sequenceNumber" type="long" column="c_sequenceNumber"/>

</composite-id>


<set name="acknowledgement" cascade="all" inverse="true" lazy="true">
<key>
<column name="c_groupId"/>
<column name="c_sequenceNumber"/>
</key>
<one-to-many class="hk.hku.csis.wsr.database.table.Acknowledgement"/>
</set>

<set name="fault" cascade="all" inverse="true" lazy="true">
<key>
<column name="c_groupId"/>
<column name="c_sequenceNumber"/>
</key>
<one-to-many class="hk.hku.csis.wsr.database.table.Fault"/>
</set>



<set name="incoming" cascade="all" inverse="true" lazy="true">
<key>
<column name="c_groupId"/>
<column name="c_sequenceNumber"/>
</key>
<one-to-many class="hk.hku.csis.wsr.database.table.Incoming"/>
</set>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 6:00 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You don't show enough info.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.