[Bug 914681] New: jing doesn't find Saxon extension
http://bugzilla.suse.com/show_bug.cgi?id=914681 Bug ID: 914681 Summary: jing doesn't find Saxon extension Classification: openSUSE Product: openSUSE Distribution Version: 13.2 Hardware: Other OS: Other Status: NEW Severity: Minor Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: thomas.schraitle@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The jing package is used to validate an XML document with a RNG schema. When installing the jing package and running it without any options, you get: ----------------- $ rpm -q jing jing-20091111-19.1.3.noarch $ jing /usr/bin/build-classpath: error: Could not find saxon Java extension for this JVM /usr/bin/build-classpath: error: Some specified jars were not found Jing version 20091111 usage: java com.thaiopensource.relaxng.util.Driver [-i] [-c] [-s] [-t] [-C catalogFile] [-e encoding] RNGFile XMLFile... RELAX NG is a schema language for XML See http://relaxng.org/ for more information. ----------------- After investigating it, the respective line is this: BASE_JARS="jing xerces-j2 xml-commons-apis saxon xml-commons-resolver" This contains the list of all JAR files which is used by jing. However, "saxon" doesn't exist anymore, it should be "saxon6". The above line should be therefor look like this: BASE_JARS="jing xerces-j2 xml-commons-apis saxon6 xml-commons-resolver" -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 Thomas Schraitle <thomas.schraitle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fs@suse.com Found By|--- |Documentation Assignee|bnc-team-screening@forge.pr |thomas.schraitle@suse.com |ovo.novell.com | Target Milestone|--- |13.2 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 Thomas Schraitle <thomas.schraitle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS --- Comment #2 from Thomas Schraitle <thomas.schraitle@suse.com> --- Submitted fix in devel project Java:packages https://build.opensuse.org/request/show/282929 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 --- Comment #5 from Thomas Schraitle <thomas.schraitle@suse.com> --- After looking through the spec file, there is also another typo: jing must depends on saxon6, not saxon9. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c6 Andrew Daugherity <adaugherity@tamu.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adaugherity@tamu.edu --- Comment #6 from Andrew Daugherity <adaugherity@tamu.edu> --- The RPM dependency on saxon9 is already correct, but jing.script (installed as /usr/bin/jing) is wrong -- saxon6 should be saxon9. Very simple fix: ==== --- jing.script 2015-06-26 19:43:11.814812104 -0500 +++ jing.script 2015-06-22 17:51:35.818580908 -0500 @@ -7,7 +7,7 @@ MAIN_CLASS=com.thaiopensource.relaxng.util.Driver -BASE_JARS="jing xerces-j2 xml-commons-apis saxon6 xml-commons-resolver" +BASE_JARS="jing xerces-j2 xml-commons-apis saxon9 xml-commons-resolver" args= BASE_FLAGS= ==== This affects openSUSE 13.1, 13.2, and SLES 12. Please release an updated package for all of those! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c7 --- Comment #7 from Thomas Schraitle <thomas.schraitle@suse.com> --- Hi Andrew, thanks for your comment. (In reply to Andrew Daugherity from comment #6)
The RPM dependency on saxon9 is already correct, but jing.script (installed as /usr/bin/jing) is wrong -- saxon6 should be saxon9. Very simple fix: ==== --- jing.script 2015-06-26 19:43:11.814812104 -0500 +++ jing.script 2015-06-22 17:51:35.818580908 -0500 @@ -7,7 +7,7 @@
MAIN_CLASS=com.thaiopensource.relaxng.util.Driver
-BASE_JARS="jing xerces-j2 xml-commons-apis saxon6 xml-commons-resolver" +BASE_JARS="jing xerces-j2 xml-commons-apis saxon9 xml-commons-resolver"
args= BASE_FLAGS= ====
This affects openSUSE 13.1, 13.2, and SLES 12. Please release an updated package for all of those!
Actually, it was on purpose as I was under the impression, Jing uses Saxon6 only. Unfortunately, it isn't really clear what Jing depends on. There is no clear list of dependencies in the readme.txt. However, after some research, Jing brings all its dependencies in the lib directory. It includes both saxon6 _and_ saxon9. According to issue27[1], James Clark (the main developer of Jing) states in comment 4: "Fixed in r2194. Jing now tries for XSLT implementations in the order: new Saxon (net.sf.saxon), old Saxon (com.icl.saxon), Xalan, JAXP-provided (typically XSLTC)." I tried it with saxon6, saxon9, and both. All three worked. As Jing is merely a RNG validator and uses XSLT only for Schematron it is happy as long as there is an xslt processor, regardless of its version. So I don't think this is a critical issue. I will add saxon9 to the list of BASE_JARS, so it doesn't matter which XSLT processor is installed. Does that fit your needs? [1] https://code.google.com/p/jing-trang/issues/detail?id=27 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c8 --- Comment #8 from Thomas Schraitle <thomas.schraitle@suse.com> --- For some odd reason, you can find only the jing-20091111.zip download, but not a more recent version. According to the tags directory, there is a V20131210 version which doesn't seem to be published. :-/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c9 Liu Shukui <skliu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |skliu@suse.com --- Comment #9 from Liu Shukui <skliu@suse.com> --- Hello everyone, I almost finish the verification in maintenance. but I don't know to make a regression test. I try to use the sample case in the package, but failed, I know rarely about java, is there anyone can provide me a regression test case? sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing src/com/thaiopensource/datatype/sample/BalancedString.java valid.xml /usr/share/doc/packages/jing/sample/datatype/src/com/thaiopensource/datatype/sample/BalancedString.java:1:1: fatal: prolog 中不允许有内容。 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c10 --- Comment #10 from Thomas Schraitle <thomas.schraitle@suse.com> --- Hi, (In reply to Liu Shukui from comment #9)
Hello everyone, I almost finish the verification in maintenance.
but I don't know to make a regression test. I try to use the sample case in the package, but failed, I know rarely about java, is there anyone can provide me a regression test case?
sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing src/com/thaiopensource/datatype/sample/BalancedString.java valid.xml /usr/share/doc/packages/jing/sample/datatype/src/com/thaiopensource/datatype/ sample/BalancedString.java:1:1: fatal: prolog 中不允许有内容。
Are you sure you pass to jing the correct parameters? Let's see what jing expects: $ jing Jing version 20091111 usage: java com.thaiopensource.relaxng.util.Driver [-i] [-c] [-s] [-t] [-C catalogFile] [-e encoding] RNGFile XMLFile... RELAX NG is a schema language for XML See http://relaxng.org/ for more information. In other words, jing expects (a) an RNG file and (b) a XML file. However, your input looks strange: You can't validate a Java file. Probably this is where the error came from. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c11 --- Comment #11 from Liu Shukui <skliu@suse.com> --- (In reply to Thomas Schraitle from comment #10)
Hi,
(In reply to Liu Shukui from comment #9)
Hello everyone, I almost finish the verification in maintenance.
but I don't know to make a regression test. I try to use the sample case in the package, but failed, I know rarely about java, is there anyone can provide me a regression test case?
sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing src/com/thaiopensource/datatype/sample/BalancedString.java valid.xml /usr/share/doc/packages/jing/sample/datatype/src/com/thaiopensource/datatype/ sample/BalancedString.java:1:1: fatal: prolog 中不允许有内容。
Are you sure you pass to jing the correct parameters?
Let's see what jing expects:
$ jing Jing version 20091111 usage: java com.thaiopensource.relaxng.util.Driver [-i] [-c] [-s] [-t] [-C catalogFile] [-e encoding] RNGFile XMLFile... RELAX NG is a schema language for XML See http://relaxng.org/ for more information.
In other words, jing expects (a) an RNG file and (b) a XML file. However, your input looks strange: You can't validate a Java file. Probably this is where the error came from.
You are right. I know rarely about java and jing. I know I put the wrong parameters. I don't kow HOW and WHERE I can put the correct parameters. sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing datatype-sample.rng valid.xml /usr/share/doc/packages/jing/sample/datatype/datatype-sample.rng:4:32: error: datatype library "http://www.thaiopensource.com/relaxng/datatypes/sample" not recognized -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c12 --- Comment #12 from Thomas Schraitle <thomas.schraitle@suse.com> --- (In reply to Liu Shukui from comment #11)
[...] You are right. I know rarely about java and jing. I know I put the wrong parameters.
I don't kow HOW and WHERE I can put the correct parameters.
sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing datatype-sample.rng valid.xml
/usr/share/doc/packages/jing/sample/datatype/datatype-sample.rng:4:32: error: datatype library "http://www.thaiopensource.com/relaxng/datatypes/sample" not recognized
Could you append the file datatype-sample.rng to Bugzilla? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c13 --- Comment #13 from Liu Shukui <skliu@suse.com> --- (In reply to Thomas Schraitle from comment #12)
(In reply to Liu Shukui from comment #11)
[...] You are right. I know rarely about java and jing. I know I put the wrong parameters.
I don't kow HOW and WHERE I can put the correct parameters.
sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing datatype-sample.rng valid.xml
/usr/share/doc/packages/jing/sample/datatype/datatype-sample.rng:4:32: error: datatype library "http://www.thaiopensource.com/relaxng/datatypes/sample" not recognized
Could you append the file datatype-sample.rng to Bugzilla?
the file datatype-sample.rng is at /usr/share/doc/packages/jing/sample/datatype and the description of the regression test is at: /usr/share/doc/packages/jing/sample/datatype/index.html cat datatype-sample.rng <element name="balancedString" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.thaiopensource.com/relaxng/datatypes/sample"> <data type="balancedString"/> </element> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c14 --- Comment #14 from Thomas Schraitle <thomas.schraitle@suse.com> --- (In reply to Liu Shukui from comment #13)
Could you append the file datatype-sample.rng to Bugzilla?
the file datatype-sample.rng is at /usr/share/doc/packages/jing/sample/datatype and the description of the regression test is at:
/usr/share/doc/packages/jing/sample/datatype/index.html
cat datatype-sample.rng <element name="balancedString" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.thaiopensource.com/relaxng/datatypes/sample"> <data type="balancedString"/> </element>
Ok. As Jing uses the JPackage project, you can use/set VERBOSE and/or CLASSPATH. The following steps works for me: # VERBOSE turns on debugging; leave it out, if you don't want it $ export VERBOSE=1 $ export CLASSPATH=/usr/share/doc/packages/jing/sample/datatype/datatype-sample.jar $ jing datatype-sample.rng valid.xml java virtual machine used: /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0//bin/java classpath used: /usr/share/java/jing.jar:/usr/share/java/xerces-j2.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/saxon9.jar:/usr/share/java/saxon6.jar:/usr/share/java/xml-commons-resolver.jar:/usr/share/doc/packages/jing/sample/datatype/datatype-sample.jar main class used: com.thaiopensource.relaxng.util.Driver flags used: options used: arguments used: datatype-sample.rng valid.xml Loaded balanced string $ $ echo $? 0 The last line gives the return code of the validation. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c15 --- Comment #15 from Thomas Schraitle <thomas.schraitle@suse.com> --- I forget to add: The CLASSPATH is only needed because of the external datatype library. Normally you wouldn't set it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c16 --- Comment #16 from Liu Shukui <skliu@suse.com> --- (In reply to Thomas Schraitle from comment #15)
I forget to add:
The CLASSPATH is only needed because of the external datatype library. Normally you wouldn't set it.
Thank you very much, then I will finish the qa-maintenance requests. sles12-x64:/usr/share/doc/packages/jing/sample/datatype # export CLASSPATH=/usr/share/doc/packages/jing/sample/datatype/datatype-sample.jar sles12-x64:/usr/share/doc/packages/jing/sample/datatype # jing datatype-sample.rng valid.xml Loaded balanced string sles12-x64:/usr/share/doc/packages/jing/sample/datatype # echo $? 0 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c17 --- Comment #17 from Thomas Schraitle <thomas.schraitle@suse.com> --- (In reply to Liu Shukui from comment #16)
Thank you very much, then I will finish the qa-maintenance requests.
Thanks! :-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c19 Michel Normand <normand@linux.vnet.ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |normand@linux.vnet.ibm.com --- Comment #19 from Michel Normand <normand@linux.vnet.ibm.com> --- Hi there, What is the status of this bug ? I tried to use jing to validate an autoinst.xml as per cmd (1) and it still reports missing saxon6 package. The jing script still refer to saxon6 but the spec has saxon9 as Requires (2) (1) === $jing /usr/share/YaST2/schema/autoyast/rng/profile.rng /tmp/autoinst.xml /usr/bin/build-classpath: Could not find saxon6 Java extension for this JVM === (2) === $rpm -q jing saxon9 saxon6 jing-20091111-21.2.noarch saxon9-9.4.0.7-11.13.noarch package saxon6 is not installed === $rpm -qf /usr/bin/jing jing-20091111-21.2.noarch === $grep saxon /usr/bin/jing BASE_JARS="jing xerces-j2 xml-commons-apis saxon6 xml-commons-resolver" === -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c21 --- Comment #21 from Thomas Schraitle <thomas.schraitle@suse.com> --- Tumbleweed contains still the old name (jing). The package was renamed in Dec 1 2017:
Fix bsc#1069796 to combine jing and trang into a single jing-trang source package
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c22 --- Comment #22 from Thomas Schraitle <thomas.schraitle@suse.com> --- (In reply to Thomas Schraitle from comment #21)
Tumbleweed contains still the old name (jing). The package was renamed in Dec 1 2017:
Fix bsc#1069796 to combine jing and trang into a single jing-trang source package
Argh, sorry. I've meant the source file. Forget about the line. (In reply to Karl Cheng from comment #20)
[...] It looks like the fixes were done for Leap but not for TW.
I've downloaded the jing RPM. According to the changelog, this bug is mentioned so it contains the fix (which was dated January 26 2015). I think we can close this bug as fixed. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=914681 http://bugzilla.suse.com/show_bug.cgi?id=914681#c23 Karl Cheng <qantas94heavy@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |FIXED Flags|needinfo?(normand@linux.vne | |t.ibm.com) | --- Comment #23 from Karl Cheng <qantas94heavy@gmail.com> --- Alright, closing as fixed. If this is still an issue please reopen/comment. Thank you! -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com