-->
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: put a 0 in a list and get 1 as result![Hibernate related]
PostPosted: Tue May 22, 2007 12:55 am 
Newbie

Joined: Tue May 22, 2007 12:38 am
Posts: 3
i have got a very wired problem.

put a 0 in a list and get 1 as result in my project.

here is the test code!
java.util.List alist =new java.util.ArrayList<Integer>();
alist.add(0);
out.print(alist.get(0));

i run the text code in a jsp in the tomcat.

as you see, i put 0 in the list, but get 1 as result.

i wonder why?

after many hour of testing, i found there is a jar file has cause this problem,which is 'antlr-2.7.5H3.jar' which is shipped with Hibernate,when i remove this jar file from the Tomcat\webapps\myproject\WEB-INF\lib and it work fine. put 0 get 0;

i have tried to put the newest jar file which is 'antlr-2.7.6.jar' from the newest Hibernate, but it is still put 0 get 1;

does anyone has a idea?
I think maybe when tomcat started , it load the 'antlr-2.7.5H3.jar' file, and maybe do some mapping, map 0 to a object? i am not so sure!

i am eager to get the answer, and also i am new to Hibernate, someone else in my project used hibernate.

i am very appreciate for your help!


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 22, 2007 1:01 am 
Newbie

Joined: Tue May 22, 2007 12:38 am
Posts: 3
what is 'antlr-2.7.5H3.jar' jar file doing anyway? can someone give me a general idea?
thanks in advanced


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 22, 2007 11:08 pm 
Newbie

Joined: Tue May 22, 2007 12:38 am
Posts: 3
any idea?


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.