1 Reply Latest reply on Jan 12, 2009 1:12 AM by jaikiran pai

    Mysterious difference of mapping on Integer on windows an Bi

    Adrien Adrien Apprentice

      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