0 Replies Latest reply on Aug 11, 2010 8:04 AM by 843804

    Java 6 Update 21 zip library not loading in Solaris 10


      We have installed Java 6 Update 21 with 64 bit JVM support in Solaris SPARC.

      I was testing JBoss 4.2.3 GA with Java 6 Update 21 with 64 bit JVM, then got the below error.
      Exception in thread "main" java.lang.NoSuchFieldError: strm
      Used the Java Options as
      JAVA_OPTS="-d64 -Xms3g -Xmx3g -XX:ThreadStackSize=512 -XX:+UseParallelGC -XX:MaxPermSize=256m -XX:NewRatio=2" 
      I have posted this in Solaris 10 forum here [http://forums.sun.com/thread.jspa?threadID=5447068|http://forums.sun.com/thread.jspa?threadID=5447068]

      After running the below sample using the Inflater class, I found this is nothing to do with JBoss or Solaris environment.
                     // TODO Auto-generated method stub
                      // Encode a String into bytes
                      String inputString = "blahblahblah??";
                      byte[] input = inputString.getBytes("UTF-8");
                      // Compress the bytes
                      byte[] output = new byte[100];
                      Deflater compresser = new Deflater();
                      int compressedDataLength = compresser.deflate(output);
                      // Decompress the bytes
                      Inflater decompresser = new Inflater();
                      decompresser.setInput(output, 0, compressedDataLength);
                      byte[] result = new byte[100];
                      int resultLength = decompresser.inflate(result);
                      // Decode the bytes into a String
                      String outputString = new String(result, 0, resultLength, "UTF-8");
                      System.out.println("OUTPUT ==>" + outputString);
                }catch (Exception e) {
                     // TODO: handle exception
                     System.out.println("Exception ==> " + e.getMessage());
      Because I got the same error as
      Exception in thread "main" java.lang.NoSuchFieldError: strm
              at java.util.zip.Deflater.initIDs(Native Method)
              at java.util.zip.Deflater.<clinit>(Deflater.java:110)
              at ziptest.ZIPTest.main(ZIPTest.java:21)
      However if I run a simple HelloWorld program with 64 bit option there is no error.

      Looks like the library file libzip.so is corrupted. I have replaced that file with a new file [extracted from the tar.z] , but same error exists.


      How to resolve this error? Do I need to reinstall Java 6 Update 21?
      How can I verify that the library files are in good format?
      Or whether the library file in the update 21 installation package itself is corrupted?