7 Replies Latest reply on Oct 29, 2011 2:52 AM by EJP

    Long.parseLong("2") returned 6001

      I ran into a really strange issue where Long.parseLong("2") started returning 6001. Here is what happened:

      - This happened on windows 7 - 64 bit OS and in an application running on the weblogic server - v10.3.2. Weblogic was set to use jdk160_14_R27.6.5-32 that comes along with it.
      - When this started happening, I debugged the server using eclipse and entered the expression Long.parseLong("2") in the eclipse-debug expression window. This itself was returning 6001.
      - Even Long.valueOf("2") returned 6001.
      - Other values - like Long.parseLong("1"), Long.parseLong("3"), Long.parseLong("4"), Long.parseLong("8"), etc were fine.
      - I tried giving a radix of 10, etc but nothing helped

      I suspect there was some corruption in the JVM due to which the representation of 2 got screwed.
      Do note 1 thing, this started happening on a morning when I had resumed the machine from a hibernation that I had done the previous night.
      It so happened that when I had hibernated the machine the previous night, the debugger was attached to the JVM and thats the state the machine was hibernated in.
      I have done this many times on previous occasions but never came across any issues. I am not sure if this could be the cause of the issue.

      I restarted the server and all was well after that.

      Anyone having any clue what could have happened here ?