You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by anton dos santos <ad...@free.fr> on 2011/01/28 18:50:00 UTC

where is com.kitfox.svg.SVGDiagram?

Hi
I tried to display SVG images, but I got a ClassNotFoundException for  com.kitfox.svg.SVGDiagram:

Caused by: java.lang.NoClassDefFoundError: com/kitfox/svg/SVGCache
         at org.apache.pivot.wtk.media.SVGDiagramSerializer.readObject(SVGDiagramSerializer.java:43)
         at org.apache.pivot.wtk.media.Image$LoadTask.execute(Image.java:101)
         at org.apache.pivot.wtk.media.Image.load(Image.java:144)
         at org.apache.pivot.wtk.ImageView.setImage(ImageView.java:248)

Is another jar required beside the binary distribution?
Regards
Anton

Re: where is com.kitfox.svg.SVGDiagram?

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,

> The SVG Salamander library is required to build the platform - it just isn't required at runtime if you don't use the Drawing class.
Ok. Maybe in the future we can think to move only the wtk drawing part
in a dedicated jar ... let's see later.

Bye

Re: where is com.kitfox.svg.SVGDiagram?

Posted by Greg Brown <gk...@verizon.net>.
>> It is optional - it is only necessary if you want to use a Drawing in your app.
> Yes, I agree but as explained here (
> http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
> ) could be a good addition as optional dependency.

The SVG Salamander library is required to build the platform - it just isn't required at runtime if you don't use the Drawing class.

G


Re: where is com.kitfox.svg.SVGDiagram?

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,

2011/1/31 Greg Brown <gk...@verizon.net>:
>> just seen the same issue even in the Maven version of downloaded jars:
>> in the 2.0.1 I'll add the (optional if possible) dependency on
>> SVGSalamander to WTK.
>
> It is optional - it is only necessary if you want to use a Drawing in your app.
Yes, I agree but as explained here (
http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
) could be a good addition as optional dependency.

Take a look at this (from that page):

Why use optional dependencies?

It's not only important to declare optional dependencies in order to
save space/memory/etc. It's vital to control the list of actual
dependencies a person needs in order to use a project, since these
jars may eventually make it into a WAR, EAR, EJB, etc. Inclusion of
the wrong jars may violate a license agreement, cause classpath
issues, etc.
How do I use the optional tag?

A dependency is declared as optional by simply setting the <optional>
tag to true in your dependency declaration.



So, is it Ok for you (and others) ?
Tell me so I can fix it (I've already found the maven repository and
data for referring to svgSalamander), so now I have to make some tests
(for example if the remote repository is not reachable, if Pivot
artifacts will be downloaded and working the same, etc), but I think
the fix will be simple.


Otherwise (probably a more long-term solution) could be to split out
the drawing part of wtk in a dedicated subproject (with its jar) with
their dependencies ... maybe for 2.1 or 3.0 .

Probably could be useful to open a jira ticket for it, and put there
all these info, so we can see when/how to do with this ...
Comments ?


Bye

Re: where is com.kitfox.svg.SVGDiagram?

Posted by Greg Brown <gk...@verizon.net>.
> just seen the same issue even in the Maven version of downloaded jars:
> in the 2.0.1 I'll add the (optional if possible) dependency on
> SVGSalamander to WTK.

It is optional - it is only necessary if you want to use a Drawing in your app.


Re: where is com.kitfox.svg.SVGDiagram?

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
just seen the same issue even in the Maven version of downloaded jars:
in the 2.0.1 I'll add the (optional if possible) dependency on
SVGSalamander to WTK.


And, even the demo.jnlp.xsl (which generates jnlp files for demos) has
to be fixed for references to SVGSalamander wrong inside ... or
better, the generated jnlp file is not working.


As soon as possible I'll add a JIRA ticket for both things (in this
moment our JIRA is down for maintenance) ...

Bye,
Sandro

Re: where is com.kitfox.svg.SVGDiagram?

Posted by Greg Brown <gk...@verizon.net>.
> I tried to display SVG images, but I got a ClassNotFoundException for  com.kitfox.svg.SVGDiagram:
> 
> Caused by: java.lang.NoClassDefFoundError: com/kitfox/svg/SVGCache
>        at org.apache.pivot.wtk.media.SVGDiagramSerializer.readObject(SVGDiagramSerializer.java:43)
>        at org.apache.pivot.wtk.media.Image$LoadTask.execute(Image.java:101)
>        at org.apache.pivot.wtk.media.Image.load(Image.java:144)
>        at org.apache.pivot.wtk.ImageView.setImage(ImageView.java:248)
> 
> Is another jar required beside the binary distribution?

Yes. From the README:

* SVG support requires SVG Salamander, which is licensed under a dual LGPL/BSD
  license and is available here:

  https://svgsalamander.dev.java.net/

G