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.IndexOutOfBoundsException: Index: 0, Size: 0
PostPosted: Thu Dec 15, 2005 11:07 pm 
Newbie

Joined: Thu Dec 15, 2005 10:33 pm
Posts: 2
Hibernate: 2.1
IDE: IBM WebSphere Studio Application Developer 5.0
DB: IBM DB2

I have a db which has many tables. Most tables works fine, but there is one table which has 36 columns failed.

I wrote a Table.java(JavaBean) to map the table and a Service.java to handle the select, update, insert function.

After I new Table() and set the value of primary key, then I use Service.getInstance().add(table)

I got the error [Index: 0, Size: 0]: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

I checked the console, and I could see the sql "insert into table(...) vlaues(?,?...)" before the error.

Actually, I didn't use any array in my program. I infer the error is in session.save(table). But I couldn't figure it out.

Does anyone have an idea?
Thanks a lot ...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 11:11 pm 
Newbie

Joined: Thu Dec 15, 2005 10:33 pm
Posts: 2
I forgot to say something.

I change the table(36 columns) to 33 columns. It works fine.
But I add one column to 34 columns, it failed again.
But it's so strange...

Does anyone know this?


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.