You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Jane Singer <js...@cc.huji.ac.il> on 2002/11/11 16:15:41 UTC

JSVGCanvas / SVGDocument errors

I am getting a some "NoSuchMethodError" messages at, or nearly after, the
point in the code where I add an SVGDocument to and JSVGCanvas:

svgcanvas.setSVGDocument(svgdoc);

I know this usually has to do with problems with the class path, but it is
strange that other classes from within the same jar files work fine.

I'm working with JBuilder.

Can someone help me?

Jane


java.lang.NoSuchMethodError
        at org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
Source)
        at
org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source)
java.lang.NoSuchMethodError
        at org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
Source)
        at
org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source)



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: JSVGCanvas / SVGDocument errors

Posted by Thierry Kormann <tk...@ilog.fr>.
>    What do think about changing computeRenderintTransform so if
> getSize() returns zero for either dimension, we either use the
> identity transform or set that dimension to 1?

Sounds good to me.

>    It would help avoid this common issue.  It is a bit of a hack, but
> we know that passing zero into the getviewTransform will generate a
> NonInvertableTransformException.  Also I think it's reasonable to set
> the URL and only when the gvtBuild is complete add the
> canvas/component to the swing tree - this would allow that to happen
> 'cleanly'.

I agree.

Thierry.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: JSVGCanvas / SVGDocument errors

Posted by Thomas E Deweese <th...@kodak.com>.
Hi Thierry,

   What do think about changing computeRenderintTransform so if
getSize() returns zero for either dimension, we either use the
identity transform or set that dimension to 1?

   It would help avoid this common issue.  It is a bit of a hack, but
we know that passing zero into the getviewTransform will generate a
NonInvertableTransformException.  Also I think it's reasonable to set
the URL and only when the gvtBuild is complete add the
canvas/component to the swing tree - this would allow that to happen
'cleanly'.

  



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: JSVGCanvas / SVGDocument errors

Posted by Jane Singer <js...@cc.huji.ac.il>.
OK, that makes sense, because I used to show the empty canvas before setting
the SVGdocument, and I had no problems.
Thanks so much.

----- Original Message -----
From: "Thierry Kormann" <tk...@ilog.fr>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Monday, November 11, 2002 11:19 PM
Subject: RE: JSVGCanvas / SVGDocument errors


> > This did get rid of the error message (changing around the order of the
> > classpath).
> >
> > Now I'm on to the Exception I receive...
> >
> > java.awt.geom.NoninvertibleTransformException: Determinant is 0
>
> Your JSVGCanvas must have a size in order to compute the user agent
> transform so you need to add the canvas to the frame and show it first.
> Another approach (not as clean as the first one) is to set a size to the
> canvas (using setSize method).
>
>
> Hope that helps,
> Thierry.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: JSVGCanvas / SVGDocument errors

Posted by Thierry Kormann <tk...@ilog.fr>.
> This did get rid of the error message (changing around the order of the
> classpath).
>
> Now I'm on to the Exception I receive...
>
> java.awt.geom.NoninvertibleTransformException: Determinant is 0

Your JSVGCanvas must have a size in order to compute the user agent
transform so you need to add the canvas to the frame and show it first.
Another approach (not as clean as the first one) is to set a size to the
canvas (using setSize method).


Hope that helps,
Thierry.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: JSVGCanvas / SVGDocument errors

Posted by Jane Singer <js...@cc.huji.ac.il>.
Low-and-behold.....

This did get rid of the error message (changing around the order of the
classpath).

Now I'm on to the Exception I receive...

java.awt.geom.NoninvertibleTransformException: Determinant is 0


Hmmmmm.


Thanks.


----- Original Message -----
From: "Thomas E Deweese" <th...@kodak.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Monday, November 11, 2002 5:58 PM
Subject: Re: JSVGCanvas / SVGDocument errors


> >>>>> "JS" == Jane Singer <js...@cc.huji.ac.il> writes:
>
> JS> Thanks for your prompt answer.  No, I definitely have the
> JS> lib/batik-css.jar file, and it is in the class path.  Also, the
> JS> message is inconsistent. Just now I ran it and it occurred at this
> JS> line:
>
> JS>  svgcanvas = new JSVGCanvas() ;
>
> JS> the message was:
>
> JS> java.lang.NoSuchMethodError: org.w3c.dom.css.CSSValue: method
> JS> getCssValueType()S not found
>
> JS> Any more suggestions?
>
>     Ahh, that makes it look like you have an 'old' DOM binding earlier
> on your class path than Batik's (we need one that supports styling).
> There are many potential sources of DOM bindings, if you don't
> explicity include something like Xerces before the Batik jars you
> might also have something stuck in your jre/lib/ext directory.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: JSVGCanvas / SVGDocument errors

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "JS" == Jane Singer <js...@cc.huji.ac.il> writes:

JS> Thanks for your prompt answer.  No, I definitely have the
JS> lib/batik-css.jar file, and it is in the class path.  Also, the
JS> message is inconsistent. Just now I ran it and it occurred at this
JS> line:

JS>  svgcanvas = new JSVGCanvas() ;

JS> the message was:

JS> java.lang.NoSuchMethodError: org.w3c.dom.css.CSSValue: method
JS> getCssValueType()S not found

JS> Any more suggestions?

    Ahh, that makes it look like you have an 'old' DOM binding earlier
on your class path than Batik's (we need one that supports styling).
There are many potential sources of DOM bindings, if you don't
explicity include something like Xerces before the Batik jars you
might also have something stuck in your jre/lib/ext directory.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: JSVGCanvas / SVGDocument errors

Posted by Jane Singer <js...@cc.huji.ac.il>.
Thanks for your prompt answer.

No, I definitely have the lib/batik-css.jar file, and it is in the class
path.
Also, the message is inconsistent. Just now I ran it and it occurred at this
line:

 svgcanvas = new JSVGCanvas() ;

the message was:

java.lang.NoSuchMethodError: org.w3c.dom.css.CSSValue: method
getCssValueType()S
 not found


Any more suggestions?

Thanks



----- Original Message -----
From: "Thomas E Deweese" <th...@kodak.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Monday, November 11, 2002 5:16 PM
Subject: RE: JSVGCanvas / SVGDocument errors


> >>>>> "JS" == Jane Singer <js...@cc.huji.ac.il> writes:
>
> JS> I am getting a some "NoSuchMethodError" messages at, or nearly
> JS> after, the point in the code where I add an SVGDocument to and
> JS> JSVGCanvas:
>
> JS> svgcanvas.setSVGDocument(svgdoc);
>
> JS> I know this usually has to do with problems with the class path,
> JS> but it is strange that other classes from within the same jar
> JS> files work fine.
>
>     Go with your first instincts :)
>
>     Looking at the attached stack trace the no-such method error is
> _in_ the convertVisibility method it is not the convertVisibility it's
> self.  Since the convertVisibility method is mostly calling things in
> the css engine I suspect you are missing the lib/batik-css.jar file...
>
>     Of course doing a debug build would probably help a lot here...
>
> JS> I'm working with JBuilder.
>
> JS> Can someone help me?
>
> JS> Jane
>
>
> JS> java.lang.NoSuchMethodError at
> JS> org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
> JS> Source) at
> JS> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
> JS> Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown
> JS> Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown
> JS> Source) java.lang.NoSuchMethodError at
> JS> org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
> JS> Source) at
> JS> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
> JS> Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown
> JS> Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown
> JS> Source)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: JSVGCanvas / SVGDocument errors

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "JS" == Jane Singer <js...@cc.huji.ac.il> writes:

JS> I am getting a some "NoSuchMethodError" messages at, or nearly
JS> after, the point in the code where I add an SVGDocument to and
JS> JSVGCanvas:

JS> svgcanvas.setSVGDocument(svgdoc);

JS> I know this usually has to do with problems with the class path,
JS> but it is strange that other classes from within the same jar
JS> files work fine.

    Go with your first instincts :)

    Looking at the attached stack trace the no-such method error is
_in_ the convertVisibility method it is not the convertVisibility it's
self.  Since the convertVisibility method is mostly calling things in
the css engine I suspect you are missing the lib/batik-css.jar file...

    Of course doing a debug build would probably help a lot here...

JS> I'm working with JBuilder.

JS> Can someone help me?

JS> Jane


JS> java.lang.NoSuchMethodError at
JS> org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
JS> Source) at
JS> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
JS> Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown
JS> Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown
JS> Source) java.lang.NoSuchMethodError at
JS> org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
JS> Source) at
JS> org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
JS> Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown
JS> Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown
JS> Source)


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org