Bug 32677

Summary: build failure on kaffe due to usage of com.sun.* classes
Product: XmlCommons - Now in JIRA Reporter: Dalibor Topic <robilad>
Component: XmlStylebookAssignee: Commons Developers Mailing List <commons-dev>
Status: RESOLVED FIXED    
Severity: critical    
Priority: P2    
Version: 1.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
URL: http://brutus.apache.org/gump/kaffe/xml-stylebook/xml-stylebook2/gump_work/build_xml-stylebook_xml-stylebook2.html

Description Dalibor Topic 2004-12-14 01:41:40 UTC
would it be possible to use standard apis for the code in question? I think
javax.imageio has a JPEG plugin.

Using standard APIs would make it possible for xmlStylebook to eventually run on
Kaffe, Gcj, and other free runtimes.

cheers,
dalibor topic
Comment 1 Dalibor Topic 2004-12-14 01:42:44 UTC
In case that you can't access the page above, the output from jikes is:

[javac] Found 5 semantic errors and issued 4 warnings compiling
"/home/gump/workspaces2/kaffe/workspace/xml-stylebook/src/org/apache/stylebook/printers/ImagePrinter.java":

    [javac]     11. import com.sun.image.codec.jpeg.*;
    [javac]                ^----------------------^
    [javac] *** Semantic Error: You need to modify your classpath, sourcepath,
bootclasspath, and/or extdirs setup. Jikes could not find package
"com.sun.image.codec.jpeg" in: 
    [javac]                
/usr/local/gump/kaffe/workspace/xml-xerces2/java/build/xercesImpl.jar
    [javac]                
/usr/local/gump/kaffe/workspace/xml-xalan/java/build/serializer.jar
    [javac]                
/usr/local/gump/kaffe/workspace/xml-xalan/java/build/xalan-unbundled.jar
    [javac]                
/usr/local/gump/kaffe/workspace/xml-commons/java/external/build/xml-apis.jar
    [javac]                 /usr/local/gump-kaffe/jre/lib/rt.jar
    [javac]                 /usr/local/gump-kaffe/lib/kjc.jar
    [javac]                 /usr/local/gump-kaffe/lib/gjdoc.jar
    [javac]                
/home/gump/workspaces2/kaffe/workspace/xml-stylebook/build2/classes
    [javac]                
/usr/local/gump/kaffe/workspace/ant/bootstrap/lib/ant-launcher.jar
    [javac]                
/usr/local/gump/kaffe/workspace/ant/bootstrap/lib/ant.jar
    [javac]                 /home/gump/workspaces2/kaffe/workspace/xml-stylebook/src
    [javac]                
/usr/local/gump/kaffe/workspace/xml-xerces2/java/tools/resolver.jar
    [javac]                 .



    [javac]    148.         JPEGEncodeParam
jpar=JPEGCodec.getDefaultJPEGEncodeParam(img);
    [javac]                 ^-------------^
    [javac] *** Semantic Error: Type
"org.apache.stylebook.printers.JPEGEncodeParam" was not found.


    [javac]    148.         JPEGEncodeParam
jpar=JPEGCodec.getDefaultJPEGEncodeParam(img);
    [javac]                                      ^-------^
    [javac] *** Semantic Error: No accessible field named "JPEGCodec" was found
in type "org.apache.stylebook.printers.ImagePrinter".


    [javac]    150.         JPEGImageEncoder
jenc=JPEGCodec.createJPEGEncoder(out,jpar);
    [javac]                 ^--------------^
    [javac] *** Semantic Error: Type
"org.apache.stylebook.printers.JPEGImageEncoder" was not found.


    [javac]    150.         JPEGImageEncoder
jenc=JPEGCodec.createJPEGEncoder(out,jpar);
    [javac]                                       ^-------^
    [javac] *** Semantic Error: No accessible field named "JPEGCodec" was found
in type "org.apache.stylebook.printers.ImagePrinter".


cheers,
dalibor topic
Comment 2 Shane Curcuru 2004-12-14 16:08:39 UTC
Oh my gods we really need to upgrade to JIRA...

Hmmm.  Do we even have a current maintainer for xml-stylebook these days?

Also: is it possible to compile and run xml-stylebook by manually specifying an
extra classpath?  This obviously isn't much of a workaround, but I am curious.
Comment 3 Davanum Srinivas 2004-12-14 16:53:34 UTC
Fixed in stylebook's build.xml