[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Mysterious difference of mapping on Integer on windows an Bi

jadtn@laposte.net do-not-reply at jboss.com
Sun Jan 11 04:58:12 EST 2009


Hi,
I have a  jboss4.2.2, which run under windows for dev and linux for production.
All my jboss configurations files are same under linux (unbuntu) or windows.
I ve a strange difference
My EJB is with a int field;
I use a query ( Query q = em.createNativeQuery(request);)
Under windows I get my field as this 
 photoId=((Integer) rs[8]).intValue();
But it doesnt works under linux and i need to get a BigInteger.
photoId=((java.math.BigInteger)rs[8]).intValue();

So temporarly i do:
if(rs[8] instanceof java.math.BigInteger){
  | 			photoId=((java.math.BigInteger)rs[8]).intValue();
  | 	}else{
  | 		photoId=((Integer) rs[8]).intValue();
  | 			}

There is anybody who have an idea?
Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200820#4200820

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200820



More information about the jboss-user mailing list