HEllo Everybody!

Before annoying you again with my batik project, I would like to thank you
all for the help given by this mailing (as well in the archives thant in the
discussions threads i throw). I generaly dont post thanks messages when a
problem is solved (in order not to spam the mailing), so i take a few lines
of this message to thank you all!

Son I know it's a recurent problem in the batik-users mailing list, but the
old threads speaking of this error didn't  really helped me. It's a quite
complex issue, but I'll try to explain it to you the more clearly i can!

First, i work with batik 1.7, Java JDK 1.6 and Netbeans IDE 5.0

I've got two projects:
- an application (which modifies svg documents) (I call it first project)
- a library (which i use in the upper mentionned application) which displays
svg documents: this library will be used in other java projects. (I call it
second project)

Here is the point: When i create a JSVGCanvas to a class of the first
project, and when i try to display in this canvas a svg file with
Javascript, everything is fine! But when I try to do the same with a method
of an object of a class of the second project instanciated in the first
project, i face the folowing error:

#################################################
Stack trace of the exception thrown when i try to display my file in a
canvas created in the second project
#################################################
java.lang.Exception: Unknown language: text/ecmascript
    at
org.apache.batik.bridge.BridgeContext.getInterpreter(BridgeContext.java:575)
    at
org.apache.batik.bridge.BaseScriptingEnvironment.getInterpreter(BaseScriptingEnvironment.java:289)
    at
org.apache.batik.bridge.BaseScriptingEnvironment.loadScripts(BaseScriptingEnvironment.java:404)
    at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.java:238)
    at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.java:220)
    at
org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher.java:100)

#################################################
End
#################################################


In the two cases, I call the following list of instructions:
        JSVGCanvas canvas = new JSVGCanvas();
        canvas.setSVGDocument((SVGDocument) previewDocument);
        canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
        canvas.setSVGDocument(document);

where document is the SVGDocument of my svg file! The only différence is
that in the first case, the canvas is created in an object of the first
project, and in the second case, it's created in an object of the second
project.

In netbeans, in the library manager, I created a Batik library, containing
the jars of batik 1.7 . I added this same library to the list of compil
library in the property panel of the two projects. In the property panel of
the first project, I added the second project as a compil library too.

When I clean and build my two projects nd when i look at the differents dist
folders of my project, i find out that:

   -  The manifest of the second project is empty, and there is no lib
   folder in the dist folder (I searched the web and I read that it's a normal
   behavior of Netbeans, because this project is a Library Project)
   - The manifest of the first project is the following manifest:


#################################################
Manifest of the first project
#################################################

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 14.0-b08 (Sun Microsystems Inc.)
Main-Class: see.svgview.Main
Class-Path: lib/swing-layout-1.0.jar lib/batik-anim.jar lib/batik-awt-
 util.jar lib/batik-bridge.jar lib/batik-codec.jar lib/batik-css.jar l
 ib/batik-dom.jar lib/batik-ext.jar lib/batik-extension.jar lib/batik-
 gui-util.jar lib/batik-gvt.jar lib/batik-parser.jar lib/batik-script.
 jar lib/batik-svg-dom.jar lib/batik-svggen.jar lib/batik-swing.jar li
 b/batik-transcoder.jar lib/batik-util.jar lib/batik-xml.jar lib/js.ja
 r lib/pdf-transcoder.jar lib/xalan-2.6.0.jar lib/xerces_2_5_0.jar lib
 /xml-apis-ext.jar lib/xml-apis.jar lib/seesvg2.jar lib/AbsoluteLayout
 .jar
X-COMMENT: Main-Class will be added automatically by build

#################################################
END of the manifest
#################################################


   - There is a lib folder in the dist folder containing all the jars of the
   batik API (including js.jar) and also the jar of the second project
   - No one of the jars of the two projects doesn't contain any file
   META-INF/services/org.apache.batik.scrip.InterpreterFactory (I've seen many
   messages of Thomas Deweese talking of this file, but i've never seen it in
   my jars, and, 'till now, I've allways displayed svg with javascript whithout
   problem

Can you help me please? If you need any other information, i can answer to
anyne of your questions!

Thanks a lot!

Reply via email to