Hi Thomas,

You are right, I meant baseclass method. I have removed the
batik.jar from FOP, but then I just got some other error.

java.lang.NoClassDefFoundError: org/apache/batik/i18n/Localizable
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.<init>(Unknown Source)
        at testing.TiledImageTranscoder.<init>(TiledImageTranscoder.java:23)
        at testing.TiledImageTranscoder.main(TiledImageTranscoder.java:76)
Exception in thread "main"

Line 76 looks like
TiledImageTranscoder tit = new TiledImageTranscoder();

Line 23 looks like
protected TiledImageTranscoder() {}

The jar's I've included to the classpath is the follow

batik-1.5.zip/batik-1.5/*.jar
batik-1.5.zip/batik-1.5/lib/*.jar
batik-1.5.zip/batik-1.5/extensions/*.jar

When I removed the batik.jar ( FOP version ) I could find the "KEY_INDEXED"
field
as well.

I really appreciate your help !
/Gergely

-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 3:15 PM
To: Batik Users
Subject: Re: How to use "org.apache.batik.ext.awt.image.codec.tiff " ?


Gergely Hajdu wrote:

> Hi Thomas,
>
> I looked at the documentation for SVGAbstractRenderer-class,
> and there are no constructor that takes these arguments :
>
> super.transcode(document, uri, output);

    This is a call to a baseclass method not a constructor, and
because this method shows up in the stack trace the call succeeds,
the problem is in some method it tries to call internally.

> so therefore I got the NoSuchMethodErrorException. I recently
> downloaded batik-1.5.zip, and thats the version I am running.
>
> Besides that, when I use the PNGTranscoder for setting TranscodingHints,
> I get errors when using "KEY_INDEXED" field, although it's part of the
API.

    You must somehow have gotten mixed jars.  The sample rasterizer
application uses KEY_INDEXED and that works for me from the 1.5 zip.

> -----Original Message-----
> From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 04, 2003 2:59 PM
> To: Batik Users
> Subject: Re: How to use "org.apache.batik.ext.awt.image.codec.tiff " ?
>
>
> Gergely Hajdu wrote:
>
>
>>I have downloaded the file and running the static-main method of
>>the TileImageEncoder class. But I got the following error-message :
>>
>>ava.lang.NoSuchMethodError
>>      at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown
>>Source)
>
>
>  > Do you have any idea why ?
>
> Hi Gergely,
>
>     Short answer, no.  Longer answer, the problem is not the
> call to super.transcode but something inside of that method.  I would
> suspect some sort of version mismatch.  At this point I would suggest
> getting the CVS source dist and build with debug on (this can be
> done by creating the file xml-batik/build.properties with the one
> line 'debug=on').
>
>     It's possible that the problem will just go away with the
> CVS code, or at least you will be able to point to what method
> doesn't exist.
>
>
>>      at testing.TiledImageTranscoder.transcode(TiledImageTranscoder.java:41)
>>      at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
>>Source)
>>      at testing.TiledImageTranscoder.main(TiledImageTranscoder.java:80)
>>Exception in thread "main"
>>
>>When I try to run the line that calls the superclass (line 41)
>>SVGAbstractTranscoder.transcode(document, uri, output)
>>
>>protected void transcode(Document document,String uri,TranscoderOutput
>>output)
>>                      throws TranscoderException {
>>
>>      // Sets up root, curTxf & curAoi
>>      super.transcode(document, uri, output);
>>
>>Thanks for helping me.
>>/Gergely
>>
>>
>>
>>-----Original Message-----
>>From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, December 04, 2003 11:57 AM
>>To: Batik Users
>>Subject: Re: How to use "org.apache.batik.ext.awt.image.codec.tiff " ?
>>
>>
>>Gergely Hajdu wrote:
>>
>>
>>
>>>Sorry, but I can't find the contribution where the
>>>TileImageTranscoder is. The only "contributor" area
>>>I find, is the one with the Batik Committers
>>>(http://xml.apache.org/batik/whoAreWe.html).
>>
>>
>>
>>    Sorry, if you are working with the binary distribution
>>you won't see it, here is a pointer to it from viewcvs:
>>
>>http://cvs.apache.org/viewcvs.cgi/xml-batik/contrib/tiledTranscoder/
>>
>>
>>
>>
>>>-----Original Message-----
>>>From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
>>>Sent: Thursday, December 04, 2003 11:31 AM
>>>To: Batik Users
>>>Subject: Re: How to use "org.apache.batik.ext.awt.image.codec.tiff " ?
>>>
>>>
>>>Gergely Hajdu wrote:
>>>
>>>
>>>
>>>>I am using the org.apache.batik.transcoder and
>>>>org.apache.batik.transcoder.image
>>>>packages to create TIFF-images.I wonder how to
>>>>combine these with org.apache.batik.ext.awt.image.codec.tiff
>>>>packages to compress the TIFF-image I am about
>>>>to create. In this code snippet, "Images/Template.svg" is the
>>>>file that will be created as a TIFF-image.My code, so far :
>>>
>>>
>>>Hi Gergely,
>>>
>>>   As I think I said when you first asked about Compressed
>>>Tiffs you will be better off using the tileImageTranscoder
>>
>>>from the contrib area of Batik.  This directly exposes the
>>
>>>Tiff encoder so you can add the TiffEncodeParam you want.
>>>
>>>   It also directly exposes the width/height of the image.
>>>
>>>   It also rasterizes the image in chunks so you don't
>>>need 2GB of ram to raserize large images.
>>>
>>>   It doesn't have all the funky switches that the
>>>normal transcoders have.
>>>
>>>
>>>
>>>
>>>
>>>>// create a JPEG transcoder
>>>>TIFFTranscoder transcoder = new TIFFTranscoder();
>>>>// create the transcoder input
>>>>String svgURI = new File("Images/Template.svg").toURL().toString();
>>>>TranscoderInput input = new TranscoderInput(svgURI);
>>>>
>>>>// create the transcoder output
>>>>OutputStream ostream = new
>>>
>>>FileOutputStream("Archived_Images/Template.tif");
>>>
>>>
>>>
>>>>TranscoderOutput output = new TranscoderOutput(ostream);
>>>>/* HERE I WOULD LIKE TO INCLUDE CODE FOR DOING COMPRESSION, USING
CLASSES
>>>
>>>>FROM org.apache.batik.ext.awt.image.codec.tiff package. BUT I JUST DON'T
>>>
>>>
>>>>KNOW
>>>>WHAT TO WRITE */
>>>>// save the image
>>>>transcoder.transcode(input, output);
>>>>Thanks in advance
>>>>/Gergely
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to