You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mohanraj Loganathan <mo...@gmail.com> on 2009/10/15 20:44:43 UTC

[classlib][suncompat] missing method com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream)

Apache ANT has the target called image which actually uses Suns Java
Advanced Imaging API (JAI). JAI intern uses the functions in suncompat.jar.
Unit tests pertaining to image target is failing with the exception[1] when
run with HDK.

I read the mailing list
http://harmony.markmail.org/message/7dzju3fmkvi3hpeb?q=suncompat
which talks about why suncompat is not included in boot classpath and the
purpose of suncompat jar. But when i enabled the suncompat.jar in boot
classpath, I get the exception [1].

So it looks like suncompat libraries in hdk is outdated. Also I believe we
dont have the specification to update.

Any thoughts on this ?

[1] Exception :
Caused by: java.lang.NoSuchMethodError:
com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream;)Lcom/
sun/image/codec/jpeg/JPEGImageDecoder; while resolving constant pool entry
at index 7 in class com/sun/media/jai/codecim
pl/JPEGImage
        at
com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:106)
        at
com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:46)
        at
com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
        at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:43)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        ... 23 more


Thanks and Regards,
Mohan

Re: [classlib][suncompat] missing method com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream)

Posted by Mohanraj Loganathan <mo...@gmail.com>.
JAI API works with Sun Java and IBM Java.

I am not aware of alternative to JAI API.

- Mohan

On Fri, Oct 16, 2009 at 5:54 AM, Nathan Beyer <nd...@apache.org> wrote:

> On Thu, Oct 15, 2009 at 1:44 PM, Mohanraj Loganathan
> <mo...@gmail.com> wrote:
> > Apache ANT has the target called image which actually uses Suns Java
> > Advanced Imaging API (JAI). JAI intern uses the functions in
> suncompat.jar.
> > Unit tests pertaining to image target is failing with the exception[1]
> when
> > run with HDK.
>
> Is there a standard alternative to this API? Or is this an API that
> can be used with any JRE?
>
> -Nathan
> >
> > I read the mailing list
> > http://harmony.markmail.org/message/7dzju3fmkvi3hpeb?q=suncompat
> > which talks about why suncompat is not included in boot classpath and the
> > purpose of suncompat jar. But when i enabled the suncompat.jar in boot
> > classpath, I get the exception [1].
> >
> > So it looks like suncompat libraries in hdk is outdated. Also I believe
> we
> > dont have the specification to update.
> >
> > Any thoughts on this ?
> >
> > [1] Exception :
> > Caused by: java.lang.NoSuchMethodError:
> >
> com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream;)Lcom/
> > sun/image/codec/jpeg/JPEGImageDecoder; while resolving constant pool
> entry
> > at index 7 in class com/sun/media/jai/codecim
> > pl/JPEGImage
> >        at
> > com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:106)
> >        at
> >
> com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:46)
> >        at
> > com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
> >        at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:43)
> >        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> >        ... 23 more
> >
> >
> > Thanks and Regards,
> > Mohan
> >
>

Re: [classlib][suncompat] missing method com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream)

Posted by Tim Ellison <t....@gmail.com>.
On 16/Oct/2009 01:24, Nathan Beyer wrote:
> On Thu, Oct 15, 2009 at 1:44 PM, Mohanraj Loganathan
> <mo...@gmail.com> wrote:
>> Apache ANT has the target called image which actually uses Suns Java
>> Advanced Imaging API (JAI). JAI intern uses the functions in suncompat.jar.
>> Unit tests pertaining to image target is failing with the exception[1] when
>> run with HDK.
> 
> Is there a standard alternative to this API? Or is this an API that
> can be used with any JRE?

AIUI JAI covers the package javax.media.jai, which is not part of the SE
spec.

I would not expect you to be able to drop in Sun's implementation of
javax.media.jai and have it work on Harmony.

Regards,
Tim

Re: [classlib][suncompat] missing method com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream)

Posted by Nathan Beyer <nd...@apache.org>.
On Thu, Oct 15, 2009 at 1:44 PM, Mohanraj Loganathan
<mo...@gmail.com> wrote:
> Apache ANT has the target called image which actually uses Suns Java
> Advanced Imaging API (JAI). JAI intern uses the functions in suncompat.jar.
> Unit tests pertaining to image target is failing with the exception[1] when
> run with HDK.

Is there a standard alternative to this API? Or is this an API that
can be used with any JRE?

-Nathan
>
> I read the mailing list
> http://harmony.markmail.org/message/7dzju3fmkvi3hpeb?q=suncompat
> which talks about why suncompat is not included in boot classpath and the
> purpose of suncompat jar. But when i enabled the suncompat.jar in boot
> classpath, I get the exception [1].
>
> So it looks like suncompat libraries in hdk is outdated. Also I believe we
> dont have the specification to update.
>
> Any thoughts on this ?
>
> [1] Exception :
> Caused by: java.lang.NoSuchMethodError:
> com/sun/image/codec/jpeg/JPEGCodec.createJPEGDecoder(Ljava/io/InputStream;)Lcom/
> sun/image/codec/jpeg/JPEGImageDecoder; while resolving constant pool entry
> at index 7 in class com/sun/media/jai/codecim
> pl/JPEGImage
>        at
> com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:106)
>        at
> com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:46)
>        at
> com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
>        at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:43)
>        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>        ... 23 more
>
>
> Thanks and Regards,
> Mohan
>