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 Denis Bohm <de...@fireflydesign.com> on 2003/10/01 06:25:57 UTC

Scripting with Java Error

I'm trying to script using Java according to the SVG 1.1 specification:

http://www.w3.org/TR/SVG11/java.html

But when I try to load my demo.svg file into Squiggle I get:

"SVG Error: com.fireflydesign.svg.SVGHandler

java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
..."

I checked the archive and it seems to contain the handler class.  Anyone
have any idea why the class can't be found?

Thanks,
  Denis


Here is my SVG (demo.svg):

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
]>
<svg width="600" height="800" viewBox="0 0 600 800"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <script type="application/java-archive" xlink:href="demo.jar"/>
    <text x="10" y="20" fill="black">Hello</text>
</svg>

Here is my manifest:

Manifest-Version: 1.0
SVG-Handler-Class: com.fireflydesign.svg.SVGHandler


And my Java source:

package com.fireflydesign.svg;

import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventListener;

import org.w3c.dom.svg.EventListenerInitializer;
import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.svg.SVGSVGElement;

public class SVGHandler implements EventListenerInitializer {

    public SVGHandler() {
    }

    public void initializeEventListeners(SVGDocument document) {
        SVGSVGElement root = document.getRootElement();
        EventListener listener = new EventListener() {
            public void handleEvent(Event event) {
                System.out.println("onload");
            }
        };
        root.addEventListener("onload", listener, false);
    }

}


Re: Scripting with Java Error

Posted by Denis Bohm <de...@fireflydesign.com>.
Looks like my other problem was using "onload" rather than "SVGLoad".
Confusing since "onload" seemed to work from JavaScript...

So I'm running now.

----- Original Message ----- 
From: "Denis Bohm" <de...@fireflydesign.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, October 01, 2003 2:22 PM
Subject: Re: Scripting with Java Error


> I think the problem was that there was trailing whie space after the class
> name.  I removed that and now the Java class is loaded.
>
> However, the onload event listener doesn't seem to be getting called...
>
> ----- Original Message ----- 
> From: "Denis Bohm" <de...@fireflydesign.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Tuesday, September 30, 2003 9:25 PM
> Subject: Scripting with Java Error
>
>
> > I'm trying to script using Java according to the SVG 1.1 specification:
> >
> > http://www.w3.org/TR/SVG11/java.html
> >
> > But when I try to load my demo.svg file into Squiggle I get:
> >
> > "SVG Error: com.fireflydesign.svg.SVGHandler
> >
> > java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> > ..."
> >
> > I checked the archive and it seems to contain the handler class.  Anyone
> > have any idea why the class can't be found?
> >
> > Thanks,
> >   Denis
> >
> >
> > Here is my SVG (demo.svg):
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> > "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> > ]>
> > <svg width="600" height="800" viewBox="0 0 600 800"
> >     xmlns:xlink="http://www.w3.org/1999/xlink">
> >     <script type="application/java-archive" xlink:href="demo.jar"/>
> >     <text x="10" y="20" fill="black">Hello</text>
> > </svg>
> >
> > Here is my manifest:
> >
> > Manifest-Version: 1.0
> > SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
> >
> >
> > And my Java source:
> >
> > package com.fireflydesign.svg;
> >
> > import org.w3c.dom.events.Event;
> > import org.w3c.dom.events.EventListener;
> >
> > import org.w3c.dom.svg.EventListenerInitializer;
> > import org.w3c.dom.svg.SVGDocument;
> > import org.w3c.dom.svg.SVGSVGElement;
> >
> > public class SVGHandler implements EventListenerInitializer {
> >
> >     public SVGHandler() {
> >     }
> >
> >     public void initializeEventListeners(SVGDocument document) {
> >         SVGSVGElement root = document.getRootElement();
> >         EventListener listener = new EventListener() {
> >             public void handleEvent(Event event) {
> >                 System.out.println("onload");
> >             }
> >         };
> >         root.addEventListener("onload", listener, false);
> >     }
> >
> > }
> >
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > ---------------------------------------------------------------------
> > 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
>
>


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


Re: SVG & Batik - RunnableQueue

Posted by Christophe Jolif <cj...@ilog.fr>.

Thomas DeWeese wrote:

>>>   Well the Window object we provide has a method 'getBridgeContext' and
>>> the BridgeContext can provide you with the UpdateManager (if there is 
>>> one).
>>
>>
>> I can't seem to find a way to get the Window from the SVGDocument in 
>> Java.
> 
> 
>   This does appear to be a hole in the current Java binding, as I had
> suggested I think this area of the specification is under review.

http://www.w3.org/TR/SVG12/#WindowObject

"A method will be added to the SVGDocument interface to enable access to the 
SVGWindow interface."

So Thomas is right, this method will be aded.

-- 
Christophe


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


Re: SVG & Batik - RunnableQueue

Posted by Thomas DeWeese <Th...@Kodak.com>.
Denis Bohm wrote:

>>>I would like to sping off a thread that creates a socket connection and
>>>listens for data.  When the data arrives I would like to update the SVG DOM.
>>>To do that I need to ask the Batik canvas for the update manager and ask
>>>that for the runnable queue then queue up a runnable to do the update.
>>>However, I don't have a reference to the canvas.  Is there some way to
>>>get one from the document?
>>
>>   Well the Window object we provide has a method 'getBridgeContext' and
>>the BridgeContext can provide you with the UpdateManager (if there is one).
> 
> I can't seem to find a way to get the Window from the SVGDocument in Java.

   This does appear to be a hole in the current Java binding, as I had
suggested I think this area of the specification is under review.

   In Batik there is a method called 'getSVGContext' that you could
call on the DOM nodes this returns one of the Bridges, and they
all have a '.ctx' member that is the BridgeContext.  But this is
all _very_ non-standard (I'm also not sure if all the needed methods
and members are public).



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


Re: SVG & Batik - RunnableQueue

Posted by Denis Bohm <de...@fireflydesign.com>.
> > I have an application that I would like to implement using SVG and the
Java
> > Language Binding Scripting.  I have an SVG document and a Java
> > EventListenerInitializer that is working in Squiggle.  So far, so good.
Now
> > I would like to sping off a thread that creates a socket connection and
> > listens for data.  When the data arrives I would like to update the SVG
DOM.
> > To do that I need to ask the Batik canvas for the update manager and ask
> > that for the runnable queue then queue up a runnable to do the update.
> > However, I don't have a reference to the canvas.  Is there some way to
get
> > one from the document?
>
>    Well the Window object we provide has a method 'getBridgeContext' and
> the BridgeContext can provide you with the UpdateManager (if there is
one).

I can't seem to find a way to get the Window from the SVGDocument in Java.


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


Re: SVG & Batik - RunnableQueue

Posted by Thomas DeWeese <Th...@Kodak.com>.
Denis Bohm wrote:

> I have an application that I would like to implement using SVG and the Java
> Language Binding Scripting.  I have an SVG document and a Java
> EventListenerInitializer that is working in Squiggle.  So far, so good.  Now
> I would like to sping off a thread that creates a socket connection and
> listens for data.  When the data arrives I would like to update the SVG DOM.
> To do that I need to ask the Batik canvas for the update manager and ask
> that for the runnable queue then queue up a runnable to do the update.
> However, I don't have a reference to the canvas.  Is there some way to get
> one from the document?

   Well the Window object we provide has a method 'getBridgeContext' and
the BridgeContext can provide you with the UpdateManager (if there is one).

> I would also like my code to not use any Batik implementation specific stuff
> (in the hope that other browsers will also support SVG with Java scripting).

   The above is 100% pure Batik :)

> So I took a look at the SVG 1.2 spec to see if there was some upcoming
> standard way to do this.  Section 11 talks about adding a SVGWindow
> interface with a way to create SVGTimer objects that can run a set of
> SVGRunnable objects.  So it sounds like the following:

[...]

> but it could potentially run in other implementations.  Does that sound
> right?

   This might be a route to go.  I suspect they WG is trying to
standardize on how to access the DOM in a multi-threaded environment,
so it may provide a less 'hacky' way to do this in the future.

> BTW: It looks like adding these interfaces and an implementation that just
> routes the calls the existing Batik code would be fairly straight forward.
> Is there any interest in that?

    Contributions are always welcome!

> 
> Thanks,
>   Denis
> 
> 
> ---------------------------------------------------------------------
> 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


SVG & Batik - RunnableQueue

Posted by Denis Bohm <de...@fireflydesign.com>.
I have an application that I would like to implement using SVG and the Java
Language Binding Scripting.  I have an SVG document and a Java
EventListenerInitializer that is working in Squiggle.  So far, so good.  Now
I would like to sping off a thread that creates a socket connection and
listens for data.  When the data arrives I would like to update the SVG DOM.
To do that I need to ask the Batik canvas for the update manager and ask
that for the runnable queue then queue up a runnable to do the update.
However, I don't have a reference to the canvas.  Is there some way to get
one from the document?

I would also like my code to not use any Batik implementation specific stuff
(in the hope that other browsers will also support SVG with Java scripting).
So I took a look at the SVG 1.2 spec to see if there was some upcoming
standard way to do this.  Section 11 talks about adding a SVGWindow
interface with a way to create SVGTimer objects that can run a set of
SVGRunnable objects.  So it sounds like the following:

SVGDocument document = ?:
SVGWindow window = document.getSVGWindow();
SVGTimer timer = window.createTimer(0, false);
timer.addHandler(new SVGRunnable() {
    public void run() {
    }
});
timer.start();

will have the same effect as:

SVGCanvas canvas = ?;
UpdateManager updateManager = canvas.getUpdateManager();
RunnableQueue runnableQueue = updateManager.getRunnableQueue();
runnableQueue.invokeLater(new Runnable() {
    public void run() {
    }
});

but it could potentially run in other implementations.  Does that sound
right?

BTW: It looks like adding these interfaces and an implementation that just
routes the calls the existing Batik code would be fairly straight forward.
Is there any interest in that?

Thanks,
  Denis


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


Re: Scripting with Java Error

Posted by Thomas DeWeese <Th...@Kodak.com>.
Denis Bohm wrote:

> I think the problem was that there was trailing whie space after the class
> name.  I removed that and now the Java class is loaded.

Good!

> However, the onload event listener doesn't seem to be getting called...

    Check the spec, the DOM event names are not the same as the event attributes.
'onload' == 'SVGLoad' There is a table in an appendix that lists them all.




> 
> ----- Original Message ----- 
> From: "Denis Bohm" <de...@fireflydesign.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Tuesday, September 30, 2003 9:25 PM
> Subject: Scripting with Java Error
> 
> 
> 
>>I'm trying to script using Java according to the SVG 1.1 specification:
>>
>>http://www.w3.org/TR/SVG11/java.html
>>
>>But when I try to load my demo.svg file into Squiggle I get:
>>
>>"SVG Error: com.fireflydesign.svg.SVGHandler
>>
>>java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
>>..."
>>
>>I checked the archive and it seems to contain the handler class.  Anyone
>>have any idea why the class can't be found?
>>
>>Thanks,
>>  Denis
>>
>>
>>Here is my SVG (demo.svg):
>>
>><?xml version="1.0" encoding="utf-8"?>
>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
>>]>
>><svg width="600" height="800" viewBox="0 0 600 800"
>>    xmlns:xlink="http://www.w3.org/1999/xlink">
>>    <script type="application/java-archive" xlink:href="demo.jar"/>
>>    <text x="10" y="20" fill="black">Hello</text>
>></svg>
>>
>>Here is my manifest:
>>
>>Manifest-Version: 1.0
>>SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
>>
>>
>>And my Java source:
>>
>>package com.fireflydesign.svg;
>>
>>import org.w3c.dom.events.Event;
>>import org.w3c.dom.events.EventListener;
>>
>>import org.w3c.dom.svg.EventListenerInitializer;
>>import org.w3c.dom.svg.SVGDocument;
>>import org.w3c.dom.svg.SVGSVGElement;
>>
>>public class SVGHandler implements EventListenerInitializer {
>>
>>    public SVGHandler() {
>>    }
>>
>>    public void initializeEventListeners(SVGDocument document) {
>>        SVGSVGElement root = document.getRootElement();
>>        EventListener listener = new EventListener() {
>>            public void handleEvent(Event event) {
>>                System.out.println("onload");
>>            }
>>        };
>>        root.addEventListener("onload", listener, false);
>>    }
>>
>>}
>>
>>
> 
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> 
>>---------------------------------------------------------------------
>>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
> 
> 




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


Re: Scripting with Java Error

Posted by Denis Bohm <de...@fireflydesign.com>.
I think the problem was that there was trailing whie space after the class
name.  I removed that and now the Java class is loaded.

However, the onload event listener doesn't seem to be getting called...

----- Original Message ----- 
From: "Denis Bohm" <de...@fireflydesign.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Tuesday, September 30, 2003 9:25 PM
Subject: Scripting with Java Error


> I'm trying to script using Java according to the SVG 1.1 specification:
>
> http://www.w3.org/TR/SVG11/java.html
>
> But when I try to load my demo.svg file into Squiggle I get:
>
> "SVG Error: com.fireflydesign.svg.SVGHandler
>
> java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> ..."
>
> I checked the archive and it seems to contain the handler class.  Anyone
> have any idea why the class can't be found?
>
> Thanks,
>   Denis
>
>
> Here is my SVG (demo.svg):
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> ]>
> <svg width="600" height="800" viewBox="0 0 600 800"
>     xmlns:xlink="http://www.w3.org/1999/xlink">
>     <script type="application/java-archive" xlink:href="demo.jar"/>
>     <text x="10" y="20" fill="black">Hello</text>
> </svg>
>
> Here is my manifest:
>
> Manifest-Version: 1.0
> SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
>
>
> And my Java source:
>
> package com.fireflydesign.svg;
>
> import org.w3c.dom.events.Event;
> import org.w3c.dom.events.EventListener;
>
> import org.w3c.dom.svg.EventListenerInitializer;
> import org.w3c.dom.svg.SVGDocument;
> import org.w3c.dom.svg.SVGSVGElement;
>
> public class SVGHandler implements EventListenerInitializer {
>
>     public SVGHandler() {
>     }
>
>     public void initializeEventListeners(SVGDocument document) {
>         SVGSVGElement root = document.getRootElement();
>         EventListener listener = new EventListener() {
>             public void handleEvent(Event event) {
>                 System.out.println("onload");
>             }
>         };
>         root.addEventListener("onload", listener, false);
>     }
>
> }
>
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> 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: Scripting with Java Error

Posted by Denis Bohm <de...@fireflydesign.com>.
Sorry - this was due to a build problem on my part.  I have squiggle running
in the Forte debugger now.

----- Original Message ----- 
From: "Denis Bohm" <de...@fireflydesign.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, October 01, 2003 1:34 PM
Subject: Re: Scripting with Java Error


> The default with my setup is that the clases go into the sources tree, so
I
> added another check for that in setDevBase and added a new permission
entry
> for sources.  Now it gets farther and I see the error shown below.  Any
idea
> why that one is happening?
>
> java.lang.NoSuchFieldError: OPACITY
>         at
>
org.apache.batik.bridge.SVGTextElementBridge.addPaintAttributes(SVGTextEleme
> ntBridge.java:1264)
>         at
>
org.apache.batik.bridge.SVGTextElementBridge.computeLayoutedText(SVGTextElem
> entBridge.java:524)
>         at
>
org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(SVGTextElemen
> tBridge.java:222)
>         at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:160)
>         at
>
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUs
> eElementBridge.java:209)
>         at
>
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
> Bridge.java:118)
>         at
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:220)
>         at
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
>         at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:158)
>         at
>
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUs
> eElementBridge.java:209)
>         at
>
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
> Bridge.java:118)
>         at
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:220)
>         at
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
>         at
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:226)
>         at
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
>         at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:158)
>         at
>
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUs
> eElementBridge.java:209)
>         at
>
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
> Bridge.java:118)
>         at
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:220)
>         at
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
>         at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:108)
>         at
> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:136)
>
> ----- Original Message ----- 
> From: "Thomas DeWeese" <Th...@Kodak.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Wednesday, October 01, 2003 12:25 PM
> Subject: Re: Scripting with Java Error
>
>
> > Actually I think the problem may be with forte.
> > The batik security policy needs to know the root
> > of the Batik 'distribution' so it can grant appropriate
> > permissions.
> >
> > The way it does this when running from class files
> > (it does something different for jar files) is
> > it get's the URL to one of the class files and
> > looks for 'classes/org/apache/batik/...' in that path
> > it then makes the parent of 'classes' the root of the
> > distribution.
> >
> > When running in Forte it appears that either this URL is strange
> > or it doesn't include 'classes'.
> >
> >
> > Denis Bohm wrote:
> >
> > > I tried all the different settings and don't see any difference -
still
> the
> > > same error.
> > >
> > > I tried to run squiggle from Forte in the debugger, but I get:
> > >
> > > java.lang.Error
> > >         at
> > >
>
org.apache.batik.util.ApplicationSecurityEnforcer.setDevBase(ApplicationSecu
> > > rityEnforcer.java:345)
> > >         at
> > >
>
org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(App
> > > licationSecurityEnforcer.java:276)
> > >         at
> > >
>
org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Applicatio
> > > nSecurityEnforcer.java:203)
> > >         at
> > > org.apache.batik.apps.svgbrowser.Main.setPreferences(Main.java:709)
> > >         at org.apache.batik.apps.svgbrowser.Main.<init>(Main.java:347)
> > >         at org.apache.batik.apps.svgbrowser.Main.main(Main.java:190)
> > > Exception in thread "main"
> > >
> > > Do I need to specify some command line args to squiggle so that it can
> be
> > > run from the debugger?
> > >
> > > ----- Original Message ----- 
> > > From: "Thomas DeWeese" <Th...@Kodak.com>
> > > To: "Batik Users" <ba...@xml.apache.org>
> > > Sent: Wednesday, October 01, 2003 10:52 AM
> > > Subject: Re: Scripting with Java Error
> > >
> > >
> > >
> > >>Hi,
> > >>
> > >>    Perhaps you have security settings set differently in Squiggle.
> > >>Preferences->Browser Options->Security Settings
> > >>
> > >>
> > >>
> > >>Denis Bohm wrote:
> > >>
> > >>
> > >>>Hi,
> > >>>
> > >>>Glad to hear that it works for someone.  I'm running out of a fresh
CVS
> > >>>checkout using 'ant squiggle'.  Still not working for me... :^(
> > >>>
> > >>>Denis
> > >>>
> > >>>----- Original Message ----- 
> > >>>From: "Christophe Jolif" <cj...@ilog.fr>
> > >>>To: "Batik Users" <ba...@xml.apache.org>
> > >>>Sent: Wednesday, October 01, 2003 2:10 AM
> > >>>Subject: Re: Scripting with Java Error
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>Denis,
> > >>>>
> > >>>>This is working fine for me. Which version of Batik are you using?
You
> > >>>
> > >>>need at
> > >>>
> > >>>
> > >>>>least 1.5 (not a beta).
> > >>>>
> > >>>>Denis Bohm wrote:
> > >>>>
> > >>>>
> > >>>>>I'm trying to script using Java according to the SVG 1.1
> specification:
> > >>>>>
> > >>>>>http://www.w3.org/TR/SVG11/java.html
> > >>>>>
> > >>>>>But when I try to load my demo.svg file into Squiggle I get:
> > >>>>>
> > >>>>>"SVG Error: com.fireflydesign.svg.SVGHandler
> > >>>>>
> > >>>>>java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> > >>>>>..."
> > >>>>>
> > >>>>>I checked the archive and it seems to contain the handler class.
> > >
> > > Anyone
> > >
> > >>>>>have any idea why the class can't be found?
> > >>>>>
> > >>>>>Thanks,
> > >>>>> Denis
> > >>>>>
> > >>>>>
> > >>>>>Here is my SVG (demo.svg):
> > >>>>>
> > >>>>><?xml version="1.0" encoding="utf-8"?>
> > >>>>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> > >>>>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> > >>>>>]>
> > >>>>><svg width="600" height="800" viewBox="0 0 600 800"
> > >>>>>   xmlns:xlink="http://www.w3.org/1999/xlink">
> > >>>>>   <script type="application/java-archive" xlink:href="demo.jar"/>
> > >>>>>   <text x="10" y="20" fill="black">Hello</text>
> > >>>>></svg>
> > >>>>>
> > >>>>>Here is my manifest:
> > >>>>>
> > >>>>>Manifest-Version: 1.0
> > >>>>>SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
> > >>>>>
> > >>>>>
> > >>>>>And my Java source:
> > >>>>>
> > >>>>>package com.fireflydesign.svg;
> > >>>>>
> > >>>>>import org.w3c.dom.events.Event;
> > >>>>>import org.w3c.dom.events.EventListener;
> > >>>>>
> > >>>>>import org.w3c.dom.svg.EventListenerInitializer;
> > >>>>>import org.w3c.dom.svg.SVGDocument;
> > >>>>>import org.w3c.dom.svg.SVGSVGElement;
> > >>>>>
> > >>>>>public class SVGHandler implements EventListenerInitializer {
> > >>>>>
> > >>>>>   public SVGHandler() {
> > >>>>>   }
> > >>>>>
> > >>>>>   public void initializeEventListeners(SVGDocument document) {
> > >>>>>       SVGSVGElement root = document.getRootElement();
> > >>>>>       EventListener listener = new EventListener() {
> > >>>>>           public void handleEvent(Event event) {
> > >>>>>               System.out.println("onload");
> > >>>>>           }
> > >>>>>       };
> > >>>>>       root.addEventListener("onload", listener, false);
> > >>>>>   }
> > >>>>>
> > >>>>>}
> > >>>>>
> > >>>>>
> > >>>>>
> > >>
> >
>
>>>>------------------------------------------------------------------------
> > >>>>
> >
>>>>>---------------------------------------------------------------------
> > >>>>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > >>>>>For additional commands, e-mail: batik-users-help@xml.apache.org
> > >>>>
> > >>>>
> > >>>>-- 
> > >>>>Christophe
> > >>>>
> > >>>>
> >
>>>>---------------------------------------------------------------------
> > >>>>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
> > >>>
> > >>>
> > >>
> > >>
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>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
> > >
> > >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>


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


Re: Scripting with Java Error

Posted by Denis Bohm <de...@fireflydesign.com>.
The default with my setup is that the clases go into the sources tree, so I
added another check for that in setDevBase and added a new permission entry
for sources.  Now it gets farther and I see the error shown below.  Any idea
why that one is happening?

java.lang.NoSuchFieldError: OPACITY
        at
org.apache.batik.bridge.SVGTextElementBridge.addPaintAttributes(SVGTextEleme
ntBridge.java:1264)
        at
org.apache.batik.bridge.SVGTextElementBridge.computeLayoutedText(SVGTextElem
entBridge.java:524)
        at
org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(SVGTextElemen
tBridge.java:222)
        at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:160)
        at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUs
eElementBridge.java:209)
        at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
Bridge.java:118)
        at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:220)
        at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
        at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:158)
        at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUs
eElementBridge.java:209)
        at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
Bridge.java:118)
        at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:220)
        at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
        at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:226)
        at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
        at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:158)
        at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(SVGUs
eElementBridge.java:209)
        at
org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseElement
Bridge.java:118)
        at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:220)
        at
org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:186)
        at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:108)
        at
org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:136)

----- Original Message ----- 
From: "Thomas DeWeese" <Th...@Kodak.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, October 01, 2003 12:25 PM
Subject: Re: Scripting with Java Error


> Actually I think the problem may be with forte.
> The batik security policy needs to know the root
> of the Batik 'distribution' so it can grant appropriate
> permissions.
>
> The way it does this when running from class files
> (it does something different for jar files) is
> it get's the URL to one of the class files and
> looks for 'classes/org/apache/batik/...' in that path
> it then makes the parent of 'classes' the root of the
> distribution.
>
> When running in Forte it appears that either this URL is strange
> or it doesn't include 'classes'.
>
>
> Denis Bohm wrote:
>
> > I tried all the different settings and don't see any difference - still
the
> > same error.
> >
> > I tried to run squiggle from Forte in the debugger, but I get:
> >
> > java.lang.Error
> >         at
> >
org.apache.batik.util.ApplicationSecurityEnforcer.setDevBase(ApplicationSecu
> > rityEnforcer.java:345)
> >         at
> >
org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(App
> > licationSecurityEnforcer.java:276)
> >         at
> >
org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Applicatio
> > nSecurityEnforcer.java:203)
> >         at
> > org.apache.batik.apps.svgbrowser.Main.setPreferences(Main.java:709)
> >         at org.apache.batik.apps.svgbrowser.Main.<init>(Main.java:347)
> >         at org.apache.batik.apps.svgbrowser.Main.main(Main.java:190)
> > Exception in thread "main"
> >
> > Do I need to specify some command line args to squiggle so that it can
be
> > run from the debugger?
> >
> > ----- Original Message ----- 
> > From: "Thomas DeWeese" <Th...@Kodak.com>
> > To: "Batik Users" <ba...@xml.apache.org>
> > Sent: Wednesday, October 01, 2003 10:52 AM
> > Subject: Re: Scripting with Java Error
> >
> >
> >
> >>Hi,
> >>
> >>    Perhaps you have security settings set differently in Squiggle.
> >>Preferences->Browser Options->Security Settings
> >>
> >>
> >>
> >>Denis Bohm wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>Glad to hear that it works for someone.  I'm running out of a fresh CVS
> >>>checkout using 'ant squiggle'.  Still not working for me... :^(
> >>>
> >>>Denis
> >>>
> >>>----- Original Message ----- 
> >>>From: "Christophe Jolif" <cj...@ilog.fr>
> >>>To: "Batik Users" <ba...@xml.apache.org>
> >>>Sent: Wednesday, October 01, 2003 2:10 AM
> >>>Subject: Re: Scripting with Java Error
> >>>
> >>>
> >>>
> >>>
> >>>>Denis,
> >>>>
> >>>>This is working fine for me. Which version of Batik are you using? You
> >>>
> >>>need at
> >>>
> >>>
> >>>>least 1.5 (not a beta).
> >>>>
> >>>>Denis Bohm wrote:
> >>>>
> >>>>
> >>>>>I'm trying to script using Java according to the SVG 1.1
specification:
> >>>>>
> >>>>>http://www.w3.org/TR/SVG11/java.html
> >>>>>
> >>>>>But when I try to load my demo.svg file into Squiggle I get:
> >>>>>
> >>>>>"SVG Error: com.fireflydesign.svg.SVGHandler
> >>>>>
> >>>>>java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> >>>>>..."
> >>>>>
> >>>>>I checked the archive and it seems to contain the handler class.
> >
> > Anyone
> >
> >>>>>have any idea why the class can't be found?
> >>>>>
> >>>>>Thanks,
> >>>>> Denis
> >>>>>
> >>>>>
> >>>>>Here is my SVG (demo.svg):
> >>>>>
> >>>>><?xml version="1.0" encoding="utf-8"?>
> >>>>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> >>>>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> >>>>>]>
> >>>>><svg width="600" height="800" viewBox="0 0 600 800"
> >>>>>   xmlns:xlink="http://www.w3.org/1999/xlink">
> >>>>>   <script type="application/java-archive" xlink:href="demo.jar"/>
> >>>>>   <text x="10" y="20" fill="black">Hello</text>
> >>>>></svg>
> >>>>>
> >>>>>Here is my manifest:
> >>>>>
> >>>>>Manifest-Version: 1.0
> >>>>>SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
> >>>>>
> >>>>>
> >>>>>And my Java source:
> >>>>>
> >>>>>package com.fireflydesign.svg;
> >>>>>
> >>>>>import org.w3c.dom.events.Event;
> >>>>>import org.w3c.dom.events.EventListener;
> >>>>>
> >>>>>import org.w3c.dom.svg.EventListenerInitializer;
> >>>>>import org.w3c.dom.svg.SVGDocument;
> >>>>>import org.w3c.dom.svg.SVGSVGElement;
> >>>>>
> >>>>>public class SVGHandler implements EventListenerInitializer {
> >>>>>
> >>>>>   public SVGHandler() {
> >>>>>   }
> >>>>>
> >>>>>   public void initializeEventListeners(SVGDocument document) {
> >>>>>       SVGSVGElement root = document.getRootElement();
> >>>>>       EventListener listener = new EventListener() {
> >>>>>           public void handleEvent(Event event) {
> >>>>>               System.out.println("onload");
> >>>>>           }
> >>>>>       };
> >>>>>       root.addEventListener("onload", listener, false);
> >>>>>   }
> >>>>>
> >>>>>}
> >>>>>
> >>>>>
> >>>>>
> >>
>
>>>>------------------------------------------------------------------------
> >>>>
> >>>>>---------------------------------------------------------------------
> >>>>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> >>>>>For additional commands, e-mail: batik-users-help@xml.apache.org
> >>>>
> >>>>
> >>>>-- 
> >>>>Christophe
> >>>>
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>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
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> 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: Scripting with Java Error

Posted by Thomas DeWeese <Th...@Kodak.com>.
Actually I think the problem may be with forte.
The batik security policy needs to know the root
of the Batik 'distribution' so it can grant appropriate
permissions.

The way it does this when running from class files
(it does something different for jar files) is
it get's the URL to one of the class files and
looks for 'classes/org/apache/batik/...' in that path
it then makes the parent of 'classes' the root of the
distribution.

When running in Forte it appears that either this URL is strange
or it doesn't include 'classes'.


Denis Bohm wrote:

> I tried all the different settings and don't see any difference - still the
> same error.
> 
> I tried to run squiggle from Forte in the debugger, but I get:
> 
> java.lang.Error
>         at
> org.apache.batik.util.ApplicationSecurityEnforcer.setDevBase(ApplicationSecu
> rityEnforcer.java:345)
>         at
> org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(App
> licationSecurityEnforcer.java:276)
>         at
> org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Applicatio
> nSecurityEnforcer.java:203)
>         at
> org.apache.batik.apps.svgbrowser.Main.setPreferences(Main.java:709)
>         at org.apache.batik.apps.svgbrowser.Main.<init>(Main.java:347)
>         at org.apache.batik.apps.svgbrowser.Main.main(Main.java:190)
> Exception in thread "main"
> 
> Do I need to specify some command line args to squiggle so that it can be
> run from the debugger?
> 
> ----- Original Message ----- 
> From: "Thomas DeWeese" <Th...@Kodak.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Wednesday, October 01, 2003 10:52 AM
> Subject: Re: Scripting with Java Error
> 
> 
> 
>>Hi,
>>
>>    Perhaps you have security settings set differently in Squiggle.
>>Preferences->Browser Options->Security Settings
>>
>>
>>
>>Denis Bohm wrote:
>>
>>
>>>Hi,
>>>
>>>Glad to hear that it works for someone.  I'm running out of a fresh CVS
>>>checkout using 'ant squiggle'.  Still not working for me... :^(
>>>
>>>Denis
>>>
>>>----- Original Message ----- 
>>>From: "Christophe Jolif" <cj...@ilog.fr>
>>>To: "Batik Users" <ba...@xml.apache.org>
>>>Sent: Wednesday, October 01, 2003 2:10 AM
>>>Subject: Re: Scripting with Java Error
>>>
>>>
>>>
>>>
>>>>Denis,
>>>>
>>>>This is working fine for me. Which version of Batik are you using? You
>>>
>>>need at
>>>
>>>
>>>>least 1.5 (not a beta).
>>>>
>>>>Denis Bohm wrote:
>>>>
>>>>
>>>>>I'm trying to script using Java according to the SVG 1.1 specification:
>>>>>
>>>>>http://www.w3.org/TR/SVG11/java.html
>>>>>
>>>>>But when I try to load my demo.svg file into Squiggle I get:
>>>>>
>>>>>"SVG Error: com.fireflydesign.svg.SVGHandler
>>>>>
>>>>>java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
>>>>>..."
>>>>>
>>>>>I checked the archive and it seems to contain the handler class.
> 
> Anyone
> 
>>>>>have any idea why the class can't be found?
>>>>>
>>>>>Thanks,
>>>>> Denis
>>>>>
>>>>>
>>>>>Here is my SVG (demo.svg):
>>>>>
>>>>><?xml version="1.0" encoding="utf-8"?>
>>>>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
>>>>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
>>>>>]>
>>>>><svg width="600" height="800" viewBox="0 0 600 800"
>>>>>   xmlns:xlink="http://www.w3.org/1999/xlink">
>>>>>   <script type="application/java-archive" xlink:href="demo.jar"/>
>>>>>   <text x="10" y="20" fill="black">Hello</text>
>>>>></svg>
>>>>>
>>>>>Here is my manifest:
>>>>>
>>>>>Manifest-Version: 1.0
>>>>>SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
>>>>>
>>>>>
>>>>>And my Java source:
>>>>>
>>>>>package com.fireflydesign.svg;
>>>>>
>>>>>import org.w3c.dom.events.Event;
>>>>>import org.w3c.dom.events.EventListener;
>>>>>
>>>>>import org.w3c.dom.svg.EventListenerInitializer;
>>>>>import org.w3c.dom.svg.SVGDocument;
>>>>>import org.w3c.dom.svg.SVGSVGElement;
>>>>>
>>>>>public class SVGHandler implements EventListenerInitializer {
>>>>>
>>>>>   public SVGHandler() {
>>>>>   }
>>>>>
>>>>>   public void initializeEventListeners(SVGDocument document) {
>>>>>       SVGSVGElement root = document.getRootElement();
>>>>>       EventListener listener = new EventListener() {
>>>>>           public void handleEvent(Event event) {
>>>>>               System.out.println("onload");
>>>>>           }
>>>>>       };
>>>>>       root.addEventListener("onload", listener, false);
>>>>>   }
>>>>>
>>>>>}
>>>>>
>>>>>
>>>>>
>>
>>>>------------------------------------------------------------------------
>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>>>>For additional commands, e-mail: batik-users-help@xml.apache.org
>>>>
>>>>
>>>>-- 
>>>>Christophe
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>>
>>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
> 
> 




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


Re: Scripting with Java Error

Posted by Denis Bohm <de...@fireflydesign.com>.
I tried all the different settings and don't see any difference - still the
same error.

I tried to run squiggle from Forte in the debugger, but I get:

java.lang.Error
        at
org.apache.batik.util.ApplicationSecurityEnforcer.setDevBase(ApplicationSecu
rityEnforcer.java:345)
        at
org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(App
licationSecurityEnforcer.java:276)
        at
org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Applicatio
nSecurityEnforcer.java:203)
        at
org.apache.batik.apps.svgbrowser.Main.setPreferences(Main.java:709)
        at org.apache.batik.apps.svgbrowser.Main.<init>(Main.java:347)
        at org.apache.batik.apps.svgbrowser.Main.main(Main.java:190)
Exception in thread "main"

Do I need to specify some command line args to squiggle so that it can be
run from the debugger?

----- Original Message ----- 
From: "Thomas DeWeese" <Th...@Kodak.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, October 01, 2003 10:52 AM
Subject: Re: Scripting with Java Error


> Hi,
>
>     Perhaps you have security settings set differently in Squiggle.
> Preferences->Browser Options->Security Settings
>
>
>
> Denis Bohm wrote:
>
> > Hi,
> >
> > Glad to hear that it works for someone.  I'm running out of a fresh CVS
> > checkout using 'ant squiggle'.  Still not working for me... :^(
> >
> > Denis
> >
> > ----- Original Message ----- 
> > From: "Christophe Jolif" <cj...@ilog.fr>
> > To: "Batik Users" <ba...@xml.apache.org>
> > Sent: Wednesday, October 01, 2003 2:10 AM
> > Subject: Re: Scripting with Java Error
> >
> >
> >
> >>Denis,
> >>
> >>This is working fine for me. Which version of Batik are you using? You
> >
> > need at
> >
> >>least 1.5 (not a beta).
> >>
> >>Denis Bohm wrote:
> >>
> >>>I'm trying to script using Java according to the SVG 1.1 specification:
> >>>
> >>>http://www.w3.org/TR/SVG11/java.html
> >>>
> >>>But when I try to load my demo.svg file into Squiggle I get:
> >>>
> >>>"SVG Error: com.fireflydesign.svg.SVGHandler
> >>>
> >>>java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> >>>..."
> >>>
> >>>I checked the archive and it seems to contain the handler class.
Anyone
> >>>have any idea why the class can't be found?
> >>>
> >>>Thanks,
> >>>  Denis
> >>>
> >>>
> >>>Here is my SVG (demo.svg):
> >>>
> >>><?xml version="1.0" encoding="utf-8"?>
> >>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> >>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> >>>]>
> >>><svg width="600" height="800" viewBox="0 0 600 800"
> >>>    xmlns:xlink="http://www.w3.org/1999/xlink">
> >>>    <script type="application/java-archive" xlink:href="demo.jar"/>
> >>>    <text x="10" y="20" fill="black">Hello</text>
> >>></svg>
> >>>
> >>>Here is my manifest:
> >>>
> >>>Manifest-Version: 1.0
> >>>SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
> >>>
> >>>
> >>>And my Java source:
> >>>
> >>>package com.fireflydesign.svg;
> >>>
> >>>import org.w3c.dom.events.Event;
> >>>import org.w3c.dom.events.EventListener;
> >>>
> >>>import org.w3c.dom.svg.EventListenerInitializer;
> >>>import org.w3c.dom.svg.SVGDocument;
> >>>import org.w3c.dom.svg.SVGSVGElement;
> >>>
> >>>public class SVGHandler implements EventListenerInitializer {
> >>>
> >>>    public SVGHandler() {
> >>>    }
> >>>
> >>>    public void initializeEventListeners(SVGDocument document) {
> >>>        SVGSVGElement root = document.getRootElement();
> >>>        EventListener listener = new EventListener() {
> >>>            public void handleEvent(Event event) {
> >>>                System.out.println("onload");
> >>>            }
> >>>        };
> >>>        root.addEventListener("onload", listener, false);
> >>>    }
> >>>
> >>>}
> >>>
> >>>
> >>>
>
>>>------------------------------------------------------------------------
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> >>>For additional commands, e-mail: batik-users-help@xml.apache.org
> >>
> >>
> >>-- 
> >>Christophe
> >>
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> 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: Scripting with Java Error

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi,

    Perhaps you have security settings set differently in Squiggle.
Preferences->Browser Options->Security Settings



Denis Bohm wrote:

> Hi,
> 
> Glad to hear that it works for someone.  I'm running out of a fresh CVS
> checkout using 'ant squiggle'.  Still not working for me... :^(
> 
> Denis
> 
> ----- Original Message ----- 
> From: "Christophe Jolif" <cj...@ilog.fr>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Wednesday, October 01, 2003 2:10 AM
> Subject: Re: Scripting with Java Error
> 
> 
> 
>>Denis,
>>
>>This is working fine for me. Which version of Batik are you using? You
> 
> need at
> 
>>least 1.5 (not a beta).
>>
>>Denis Bohm wrote:
>>
>>>I'm trying to script using Java according to the SVG 1.1 specification:
>>>
>>>http://www.w3.org/TR/SVG11/java.html
>>>
>>>But when I try to load my demo.svg file into Squiggle I get:
>>>
>>>"SVG Error: com.fireflydesign.svg.SVGHandler
>>>
>>>java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
>>>..."
>>>
>>>I checked the archive and it seems to contain the handler class.  Anyone
>>>have any idea why the class can't be found?
>>>
>>>Thanks,
>>>  Denis
>>>
>>>
>>>Here is my SVG (demo.svg):
>>>
>>><?xml version="1.0" encoding="utf-8"?>
>>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
>>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
>>>]>
>>><svg width="600" height="800" viewBox="0 0 600 800"
>>>    xmlns:xlink="http://www.w3.org/1999/xlink">
>>>    <script type="application/java-archive" xlink:href="demo.jar"/>
>>>    <text x="10" y="20" fill="black">Hello</text>
>>></svg>
>>>
>>>Here is my manifest:
>>>
>>>Manifest-Version: 1.0
>>>SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
>>>
>>>
>>>And my Java source:
>>>
>>>package com.fireflydesign.svg;
>>>
>>>import org.w3c.dom.events.Event;
>>>import org.w3c.dom.events.EventListener;
>>>
>>>import org.w3c.dom.svg.EventListenerInitializer;
>>>import org.w3c.dom.svg.SVGDocument;
>>>import org.w3c.dom.svg.SVGSVGElement;
>>>
>>>public class SVGHandler implements EventListenerInitializer {
>>>
>>>    public SVGHandler() {
>>>    }
>>>
>>>    public void initializeEventListeners(SVGDocument document) {
>>>        SVGSVGElement root = document.getRootElement();
>>>        EventListener listener = new EventListener() {
>>>            public void handleEvent(Event event) {
>>>                System.out.println("onload");
>>>            }
>>>        };
>>>        root.addEventListener("onload", listener, false);
>>>    }
>>>
>>>}
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>>For additional commands, e-mail: batik-users-help@xml.apache.org
>>
>>
>>-- 
>>Christophe
>>
>>
>>---------------------------------------------------------------------
>>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
> 
> 




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


Re: Scripting with Java Error

Posted by Denis Bohm <de...@fireflydesign.com>.
Hi,

Glad to hear that it works for someone.  I'm running out of a fresh CVS
checkout using 'ant squiggle'.  Still not working for me... :^(

Denis

----- Original Message ----- 
From: "Christophe Jolif" <cj...@ilog.fr>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Wednesday, October 01, 2003 2:10 AM
Subject: Re: Scripting with Java Error


> Denis,
>
> This is working fine for me. Which version of Batik are you using? You
need at
> least 1.5 (not a beta).
>
> Denis Bohm wrote:
> > I'm trying to script using Java according to the SVG 1.1 specification:
> >
> > http://www.w3.org/TR/SVG11/java.html
> >
> > But when I try to load my demo.svg file into Squiggle I get:
> >
> > "SVG Error: com.fireflydesign.svg.SVGHandler
> >
> > java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> > ..."
> >
> > I checked the archive and it seems to contain the handler class.  Anyone
> > have any idea why the class can't be found?
> >
> > Thanks,
> >   Denis
> >
> >
> > Here is my SVG (demo.svg):
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> > "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> > ]>
> > <svg width="600" height="800" viewBox="0 0 600 800"
> >     xmlns:xlink="http://www.w3.org/1999/xlink">
> >     <script type="application/java-archive" xlink:href="demo.jar"/>
> >     <text x="10" y="20" fill="black">Hello</text>
> > </svg>
> >
> > Here is my manifest:
> >
> > Manifest-Version: 1.0
> > SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
> >
> >
> > And my Java source:
> >
> > package com.fireflydesign.svg;
> >
> > import org.w3c.dom.events.Event;
> > import org.w3c.dom.events.EventListener;
> >
> > import org.w3c.dom.svg.EventListenerInitializer;
> > import org.w3c.dom.svg.SVGDocument;
> > import org.w3c.dom.svg.SVGSVGElement;
> >
> > public class SVGHandler implements EventListenerInitializer {
> >
> >     public SVGHandler() {
> >     }
> >
> >     public void initializeEventListeners(SVGDocument document) {
> >         SVGSVGElement root = document.getRootElement();
> >         EventListener listener = new EventListener() {
> >             public void handleEvent(Event event) {
> >                 System.out.println("onload");
> >             }
> >         };
> >         root.addEventListener("onload", listener, false);
> >     }
> >
> > }
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
> -- 
> Christophe
>
>
> ---------------------------------------------------------------------
> 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: Scripting with Java Error

Posted by Christophe Jolif <cj...@ilog.fr>.
Denis,

This is working fine for me. Which version of Batik are you using? You need at 
least 1.5 (not a beta).

Denis Bohm wrote:
> I'm trying to script using Java according to the SVG 1.1 specification:
> 
> http://www.w3.org/TR/SVG11/java.html
> 
> But when I try to load my demo.svg file into Squiggle I get:
> 
> "SVG Error: com.fireflydesign.svg.SVGHandler
> 
> java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler
> ..."
> 
> I checked the archive and it seems to contain the handler class.  Anyone
> have any idea why the class can't be found?
> 
> Thanks,
>   Denis
> 
> 
> Here is my SVG (demo.svg):
> 
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
> ]>
> <svg width="600" height="800" viewBox="0 0 600 800"
>     xmlns:xlink="http://www.w3.org/1999/xlink">
>     <script type="application/java-archive" xlink:href="demo.jar"/>
>     <text x="10" y="20" fill="black">Hello</text>
> </svg>
> 
> Here is my manifest:
> 
> Manifest-Version: 1.0
> SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
> 
> 
> And my Java source:
> 
> package com.fireflydesign.svg;
> 
> import org.w3c.dom.events.Event;
> import org.w3c.dom.events.EventListener;
> 
> import org.w3c.dom.svg.EventListenerInitializer;
> import org.w3c.dom.svg.SVGDocument;
> import org.w3c.dom.svg.SVGSVGElement;
> 
> public class SVGHandler implements EventListenerInitializer {
> 
>     public SVGHandler() {
>     }
> 
>     public void initializeEventListeners(SVGDocument document) {
>         SVGSVGElement root = document.getRootElement();
>         EventListener listener = new EventListener() {
>             public void handleEvent(Event event) {
>                 System.out.println("onload");
>             }
>         };
>         root.addEventListener("onload", listener, false);
>     }
> 
> }
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org


-- 
Christophe


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