Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6211177

One of Pack200 tests fail with -Dcom.sun.java.util.jar.pack.disable.native=true

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 6
    • 5.0
    • deploy
    • 5.0
    • 5.0
    • b38
    • generic
    • generic

    Description

        Filed By : JCK team
        JDK : java full version "1.5.0-b64"
        JCK : 1.5
        Platform[s] : Windows
        Failing Test [s] :
            api/java_util/jar/Pack200/index.html#PackAndUnpack[Pack2002017]

      Problem description:

        There is a property com.sun.java.util.jar.pack.disable.native, which
      determines whether or not a java implementation or native implementation
      for the new packing support is used. When the property is set to "false"
      (which is the default) the native implementation is used. When the
      property is set to "true", the java implementation is used. The problem
      is that the native MS Windows implementation does not do a version check on
      the packed file while the java implementation does do the version check.
        The end result is that the following test:
          api/java_util/jar/Pack200/index.html#PackAndUnpack[Pack2002017]
      passes OK on MS Windows when the property is not specified or when it is set
      to false. But fails when the property is set to true. It should behave
      the same in either case, but fails when set to true with the following error:

      java.lang.RuntimeException: Unexpected package minor version: got 3.0;
      expected 150.7

        If the native MS Windows implementation was implemented properly, it would
      throw the same error as the java implementation. But since the native
      implementation does not check the version, the error is never detected.

      Excerpt from jtr-file:
      --- begin-of-excerpt ---
      ...
      #-----environment-----
      command.testExecute=com.sun.jck.lib.ExecJCKTestOtherJVMCmd DISPLAY=RCHLATTE.RCHLAND.IBM.COM:2 HOME=${user.home} XAUTHORITY=/home/JCKUSER/.XAuthority QIBM_JAVA_PROPERTIES_FILE=/home/JCKUSER/jprop.15bringup /QIBM/ProdData/Java400/jdk15/bin/java -Xmx250M -Djava.version=1.5 -Djava.compiler=NONE -Dos400.awt.native=true -Dcom.sun.java.util.jar.pack.disable.native=true ${jvmtiAgentOptions} -Xfuture $jdwpAgentOptions -cp /JCK/JCK-runtime-15/cls:$testSuiteRootDir/classes/../classes.jar -Djava.library.path=/QSYS.LIB/JCK15.LIB:/JCK/JCK-runtime-15/lib/pase $JPLISAgentOpts $JPLISAgent2Opts -Djava.security.policy=$testSuiteRootDir/lib/jck.policy -Djava.rmi.activation.port=1598 $testExecuteClass $testExecuteArgs
      user.home=/home/JCKUSER

      #-----testresult-----
      description=file:///JCK/JCK-runtime-15/tests/api/java_util/jar/Pack200/index.html#PackAndUnpack
      end=Wed Dec 01 04:54:57 CST 2004
      environment=JCK15
      execStatus=Failed. test cases: 5; passed: 4; failed: 1; first test case failure: Pack2002017
      javatestOS=OS/400 V5R3M0 (PowerPC)
      javatestVersion=3.2
      script=com.sun.jck.lib.JCKScript
      sections=script_messages testExecute
      start=Wed Dec 01 04:54:54 CST 2004
      test=api/java_util/jar/Pack200/index.html#PackAndUnpack
      timeoutSeconds=1800
      work=/JCK/work/j15d1r_api/api/java_util/jar/Pack200

      #section:script_messages
      ----------messages:(1/24)----------
      Executing test class...

      #section:testExecute
      ----------messages:(1/751)----------
      command: com.sun.jck.lib.ExecJCKTestOtherJVMCmd DISPLAY=RCHLATTE.RCHLAND.IBM.COM:2 HOME=/home/JCKUSER XAUTHORITY=/home/JCKUSER/.XAuthority QIBM_JAVA_PROPERTIES_FILE=/home/JCKUSER/jprop.15bringup /QIBM/ProdData/Java400/jdk15/bin/java -Xmx250M -Djava.version=1.5 -Djava.compiler=NONE -Dos400.awt.native=true -Dcom.sun.java.util.jar.pack.disable.native=true -Xfuture -cp /JCK/JCK-runtime-15/cls:/JCK/JCK-runtime-15/classes/../classes.jar -Djava.library.path=/QSYS.LIB/JCK15.LIB:/JCK/JCK-runtime-15/lib/pase -Djava.security.policy=/JCK/JCK-runtime-15/lib/jck.policy -Djava.rmi.activation.port=1598 javasoft.sqe.tests.api.java.util.jar.Pack200.PackAndUnpackTests -TestURL file:///JCK/JCK-runtime-15/tests/api/java_util/jar/Pack200/index.html#PackAndUnpack
      ----------out1:(25/1774)----------
      Pack2002013: Passed. OKAY
      Pack2002015: Passed. OKAY
      Pack2002016: Passed. OKAY
      java.lang.RuntimeException: Unexpected package minor version: got 3.0; expected 150.7
          at java.lang.Throwable.<init>(Throwable.java:196)
          at java.lang.Exception.<init>(Exception.java:41)
          at java.lang.RuntimeException.<init>(RuntimeException.java:43)
          at com.sun.java.util.jar.pack.Package.checkVersion(Package.java:92)
          at com.sun.java.util.jar.pack.PackageReader.readArchiveHeader(PackageReader.java:232)
          at com.sun.java.util.jar.pack.PackageReader.readFileHeader(PackageReader.java:168)
          at com.sun.java.util.jar.pack.PackageReader.read(PackageReader.java:124)
          at com.sun.java.util.jar.pack.UnpackerImpl$DoUnpack.unpackSegment(UnpackerImpl.java:182)
          at com.sun.java.util.jar.pack.UnpackerImpl$DoUnpack.run(UnpackerImpl.java:170)
          at com.sun.java.util.jar.pack.UnpackerImpl.unpack(UnpackerImpl.java:100)
          at javasoft.sqe.tests.api.java.util.jar.Pack200.PackAndUnpackTests.Pack2002017(PackAndUnpackTests.java:256)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:399)
          at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
          at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
          at javasoft.sqe.tests.api.java.util.jar.Pack200.PackAndUnpackTests.main(PackAndUnpackTests.java:45)
      Pack2002017: Failed. Test case throws exception: java.lang.RuntimeException: Unexpected package minor version: got 3.0; expected 150.7
      Pack2002018: Passed. OKAY
      STATUS:Failed.test cases: 5; passed: 4; failed: 1; first test case failure: Pack2002017
      ----------out2:(0/0)----------
      result: Failed. test cases: 5; passed: 4; failed: 1; first test case failure: Pack2002017


      test result: Failed. test cases: 5; passed: 4; failed: 1; first test case failure: Pack2002017
      ...
      --- end-of-excerpt---


      ###@###.### 2004-12-21 12:24:37 GMT

      Attachments

        Issue Links

          Activity

            People

              ksrini Kumar Srinivasan
              ygaevsky Yuri Gaevsky (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: