Hi: I am still having problems and have tracked this down to be caused
by the line
PNGTranscoder t = new PNGTranscoder();
I shall appreciate any help that resolves this.
Regards, Robert.
This is the full java code:
import java.lang.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import org.apache.batik.transcoder.image.*;
import org.apache.batik.transcoder.*;
import org.apache.batik.*;
public class Graph_01 extends HttpServlet {
public void doGet( HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
emitPNG( response );
} /*Graph_xx*/
public void emitPNG( HttpServletResponse response ){
try{
response.setContentType("image/png");
PNGTranscoder t = new PNGTranscoder();
TranscoderInput input = new TranscoderInput(
"http://www.asrdesigns.ltd.uk/graphics/simple.svg" ) ;
TranscoderOutput output = new TranscoderOutput(
response.getOutputStream() ) ;
t.transcode( input, output ) ;
response.getOutputStream().close();
}catch( Exception e){
e.printStackTrace() ;
}
} /*emitPNG*/
}
and this is the stacktrace:
Apr 14, 2005 3:31:19 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet Graph_01 threw exception
java.lang.ClassFormatError: Unknown constant tag 117 in class file
org/apache/batik/css/engine/value/svg/SVGValueConstants
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1626)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at
org.apache.batik.css.engine.value.svg.ColorManager.<clinit>(Unknown
Source)
at
org.apache.batik.extension.svg.BatikDomExtension.registerTags(Unknown
Source)
at
org.apache.batik.dom.svg.ExtensibleSVGDOMImplementation.<init>(Unknown
Source)
at
org.apache.batik.dom.svg.ExtensibleSVGDOMImplementation.<clinit>(Unknown
Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.<init>(Unknown
Source)
at org.apache.batik.transcoder.image.ImageTranscoder.<init>(Unknown
Source)
at org.apache.batik.transcoder.image.PNGTranscoder.<init>(Unknown
Source)
at Graph_01.emitPNG(Graph_01.java:19)
at Graph_01.doGet(Graph_01.java:13)
--- In [email protected], "asrdesigns" <[EMAIL PROTECTED]> wrote:
>
> Thanks Thomas,
>
> yes, I am using batik 1.5.1 and it is only my servlet code that I am
> compiling (but obviously needs access to the jar files).
>
> I now have a full set of jars loaded to the server and it not crashing
> at boot-up. I just got a 404 and I'm too tired to chase it this
> evening ... tomorrow is another day ;�}
>
> Regards, Robert.
>
> --- In [email protected], Thomas DeWeese
> <[EMAIL PROTECTED]> wrote:
> > Hi Robert,
> >
> > asrdesigns wrote:
> > >
> > > Thomas: I am using 1.5.0 for both development and hosting: batik
needs
> > > anything over 1.3?
> >
> > Batik should be happy to run under any JDK >= 1.3
> > (compiling with 1.5 is a little complex but running should be fine).
> > I would suggest upgrading your Batik at the very least to 1.5.1.
> > Version 1.6 would be my recommendation but given it's
> > newness I can understand some caution.
> >
> >
> > >
> > > Regards, Robert.
> > >
> > > --- In [email protected], "Rick Bullotta"
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > >>Most often this is a corrupted class file or JAR file (bad bits
or bad
> > >>spot on the disk).
> > >>
> > >>
> > >>-----Original Message-----
> > >>From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
> > >>Sent: Tuesday, April 12, 2005 6:02 PM
> > >>To: [email protected]
> > >>Subject: Re: [svg-developers] batik JPEGTranscoder
> > >>
> > >>
> > >>asrdesigns wrote:
> > >>
> > >>
> > >>>has anybody gotten this to work please?
> > >>
> > >> Yes, lots of people have gotten this to work...
> > >>
> > >>
> > >>>I am getting the following error:
> > >>>
> > >>>java.lang.ClassFormatError: Unknown constant tag 47 in class file
> > >>>org/apache/batik/gvt/AbstractGraphicsNode
> > >>
> > >> This is a new one... What version of Java are you using?
> > >>
> > >>
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/