Thank you! Now it is working. 

It was the service file that was missing , as you wrote. I am repackaging the 
batik jar files into one batik file that is to be signed. In the repackaging 
process I (the IDE) miss the service files. My solution was to copy the service 
file and include it in the project.

Thanks again.

Manne Lindberg 

-----Ursprungligt meddelande-----
Fr�n: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Skickat: den 19 april 2005 11:44
Till: [email protected]
�mne: Re: scripting initialization problem in batik1.6 when running
webstart


Hi Lindberg,

    In 1.6 Batik switched to using the Services API
to decide what interpreters should be loaded.  I would
guess that what ever is building your webstart bundle
(assuming there is such a thing ;) is missing the default
service file:

resources/META-INF/services/org.apache.batik.script.InterpreterFactory

    Which currently just lists Rhino (all we ship with Batik).

    Please let me know if this solves your problem...

Lindberg, Manne wrote:
> 
> 
> Hi
> 
> After switching from batik 1.5.1 to 1.6 I fail to call script methods 
> (javascript) when running the application as a webstart application. It 
> works when I switch back to 1.5.1. It also works for batik 1.6 if I do 
> not use webstart. Here is the code I use for initialization in an own 
> defined method callJS() :
> 
> 1)
>   
> jSVGCanvas.getUpdateManager().getScriptingEnvironment().getInterpreter().evaluate(scriptstr);
>  
> // works with batik151 but not with (batik16 AND webstart)
> 
> I also tried the following code (after reading about some problems 
> concerning applet and security)
> 2)
>  Interpreter ipret = 
> jSVGCanvas.getUpdateManager().getBridgeContext().getInterpreter("text/ecmascript");
>  
> 
>  ipret.evaluate(scriptstr);
> 
> In both cases I get an null pointer exception.
> 
> First at startup I get the following exception (as an svg error dialog 
> created by batik package)
> java.lang.NullPointerException 
> at org.apache.batik.script.InterpreterPool.createInterpreter(Unknown 
> Source)   
> at org.apache.batik.bridge.BridgeContext.getInterpreter(Unknown Source) 
>        
> at 
> org.apache.batik.bridge.BaseScriptingEnvironment.getInterpreter(Unknown 
> Source)     
> at 
> org.apache.batik.bridge.BaseScriptingEnvironment.getInterpreter(Unknown 
> Source)     
> at 
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoad(Unknown 
> Source)    
> at 
> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(Unknown 
> Source)       
> at org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown 
> Source)  
> at org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(Unknown Source)
> 
> and then (when calling "callJS", i.e. evaluating scriptstr) (also as an 
> svg error dialog created by batik package)
> java.lang.NullPointerException 
> at org.apache.batik.script.InterpreterPool.createInterpreter(Unknown 
> Source)
> at org.apache.batik.bridge.BridgeContext.getInterpreter(Unknown Source) 
>        
> at 
> org.apache.batik.bridge.BaseScriptingEnvironment.getInterpreter(Unknown 
> Source)     
> at 
> org.apache.batik.bridge.BaseScriptingEnvironment.getInterpreter(Unknown 
> Source)     
> at 
> com.automine.pcs.gui.plan.ProdPlanGraph.callJS(ProdPlanGraph.java:459) 
>      
> at 
> com.automine.pcs.gui.plan.ProdPlanGraph.addCrusherValue(ProdPlanGraph.java:416)
>  
>     
> at 
> com.automine.pcs.gui.plan.ProdPlanGraph.update(ProdPlanGraph.java:624) 
>      
> at java.util.Observable.notifyObservers(Unknown Source)         at 
> java.util.Observable.notifyObservers(Unknown Source)        
> 
> at 
> com.automine.pcs.gui.plan.ProductionPlan.notifyObs(ProductionPlan.java:416)  
> 
> at 
> com.automine.pcs.gui.plan.ProductionPlan.setCurrentCrusherTons(ProductionPlan.java:97)
>  
>      
> at 
> com.automine.communication.StatusUpdater.setCurrentCrusherTons(StatusUpdater.java:1174)
>  
>     
> at 
> com.automine.communication.G2Communication.setCurrentCrusherTons(G2Communication.java:3590)
>   
> 
> at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)        
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     
> at java.lang.reflect.Method.invoke(Unknown Source)     
> at com.gensym.jgi.JGInterface$RunMethodThread.run(JGInterface.java:1876) 
>       
> at com.gensym.jgi.JGInterface$MethodCallQueue.run(JGInterface.java:2005)
> 
> I have debugged that the code (callJS) is called after the 
> "gvtRenderingCompleted(GVTTreeRendererEvent e)".
> 
> Does anybody have an idea what could cause this? How to get it work with 
> batik 1.6 and webstart?
> 
> 
> Regards
> 
> Manne Lindberg
> [EMAIL PROTECTED]
> Benima Mellan Ab
>    
> 


---------------------------------------------------------------------
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