glassfish
  1. glassfish
  2. GLASSFISH-16507

Servlet 2.3 test case compile error with JDK7 - missing package com.sun.image.codec.jpeg

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1_b03
    • Fix Version/s: None
    • Component/s: test
    • Labels:
      None
    • Environment:

      Description

      When compiling our Servlet 2.3 test cases, it fails due error: package com.sun.image.codec.jpeg does not exist

      In researching through Google, found several references that in OpenJDK this package has been removed and in the Java Advance Imaging Home page (http://java.sun.com/products/java-media/jai/iio.html), under the JPEG section, it mentions that some of the classes are unofficially implemented in the com.sun.image.codec.jpeg package.

      What is not clear is what is the story with JDK7 and whether this is a JDK or an implementation issue that needs to be solved in our test case, thus, the reason for the bug report. We hope to get clarity on this point and perhaps instructions on how to replace these classes with a supported type in JDK7.

      To see the problem, please follow the following example, but please adjust the glassfish3, jdk, ant location and your id in CVSROOT

      % setenv CVSROOT :pserver:cvsguest@sunsw.us.oracle.com:/m/jws
      % setenv SPS_HOME /space/test1/ws/appserver-sqe
      % setenv S1AS_HOME /space/test1/glassfish3/glassfish
      % setenv JAVA_HOME /space/test1/tool/jdk1.7.0-b136
      % setenv ANT_HOME /space/test1/tool/apache-ant-1.7.1
      % setenv PATH $JAVA_HOME/bin:$ANT_HOME/bin:$S1AS_HOME/bin:$PATH

      To check out test source

      % cvs co appserver-sqe/bootstrap.xml
      % cd appserver-sqe
      % ant -f bootstrap.xml co-core

      To run the test
      % ant start-domain
      % ant startDerby
      % ant v3g-core-all
      % ant v3g-tomcat-all

      After the test fishines (or aborts), run the following to stop the server
      % ant stopDerby
      % ant stop-domain

      The complete compile error is:
      [javac] Compiling 18 source files to /export/hudson/workspace/alex-core-jdk7/appserver-sqe/build/pe/amd64_wolfrun.us.oracle.com_Linux/tomcat-servlets/classes/com/sun/s1aspesqe/product_test/servlet2_3/WEB-INF/classes
      [javac] /export/hudson/workspace/alex-core-jdk7/appserver-sqe/pe/tomcat/servlet/product_test
      /servlet2_3/src/filters/FilterImage.java:72: error: package com.sun.image.codec.jpeg does not ex
      ist [javac] import com.sun.image.codec.jpeg.JPEGImageEncoder; [javac] ^
      [javac] /export/hudson/workspace/alex-core-jdk7/appserver-sqe/pe/tomcat/servlet/product_test
      /servlet2_3/src/filters/FilterWEG.java:73: error: package com.sun.image.codec.jpeg does not exis
      t [javac] import com.sun.image.codec.jpeg.JPEGImageEncoder; [javac] ^
      [javac] /export/hudson/workspace/alex-core-jdk7/appserver-sqe/pe/tomcat/servlet/product_test
      /servlet2_3/src/filters/FilterWRES.java:72: error: package com.sun.image.codec.jpeg does not exi
      st [javac] import com.sun.image.codec.jpeg.JPEGImageEncoder;
      [javac] ^ [javac] /export/hudson/workspace/alex-core-jdk7/appserver-sqe/pe/tomcat/servlet/product_test
      /servlet2_3/src/filters/ResponseWrapperNR.java:72: error: package com.sun.image.codec.jpeg does
      not exist
      [javac] import com.sun.image.codec.jpeg.JPEGImageEncoder;
      [javac] ^ [javac] /export/hudson/workspace/alex-core-jdk7/appserver-sqe/pe/tomcat/servlet/product_test/servlet2_3/src/filters/FilterImage.java:144: error: cannot find symbol
      [javac] JPEGImageEncoder encoder=com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(imageStream);
      [javac] ^
      [javac] symbol: class JPEGImageEncoder
      [javac] location: class FilterImage
      [javac] /export/hudson/workspace/alex-core-jdk7/appserver-sqe/pe/tomcat/servlet/product_test
      /servlet2_3/src/filters/FilterImage.java:144: error: package com.sun.image.codec.jpeg does not e
      xist
      [javac] JPEGImageEncoder encoder=com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(imageStream);
      [javac] ^ [javac] Note: Some input files use unchecked or unsafe operations.
      [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 6 errors

      BUILD FAILED

        Activity

          People

          • Assignee:
            sb110099
            Reporter:
            Alex Pineda
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: