Project

Profile

Help

Cannot run Saxon 9.8.0-1

Added by Vladimir Nesterovsky almost 7 years ago

I've tried the latest release of Saxon HE and immediately got an error:

     [java] Exception in thread "main" java.lang.ExceptionInInitializerError
     [java] 	at net.sf.saxon.regex.RECompiler.escape(RECompiler.java:348)
     [java] 	at net.sf.saxon.regex.RECompiler.parseTerminal(RECompiler.java:930)
     [java] 	at net.sf.saxon.regex.RECompiler.piece(RECompiler.java:971)
     [java] 	at net.sf.saxon.regex.RECompiler.parseBranch(RECompiler.java:1091)
     [java] 	at net.sf.saxon.regex.RECompiler.parseExpr(RECompiler.java:1141)
     [java] 	at net.sf.saxon.regex.RECompiler.compile(RECompiler.java:1273)
     [java] 	at net.sf.saxon.regex.ARegularExpression.(ARegularExpression.java:50)
     [java] 	at net.sf.saxon.java.JavaPlatform.compileRegularExpression(JavaPlatform.java:326)
     [java] 	at net.sf.saxon.functions.RegexFunction.tryToBindRegularExpression(RegexFunction.java:48)
     [java] 	at net.sf.saxon.functions.RegexFunction.makeFunctionCall(RegexFunction.java:71)
     [java] 	at net.sf.saxon.functions.RegexFunctionSansFlags.makeFunctionCall(RegexFunctionSansFlags.java:47)
     [java] 	at net.sf.saxon.functions.registry.BuiltInFunctionSet.bind(BuiltInFunctionSet.java:188)
     [java] 	at net.sf.saxon.functions.FunctionLibraryList.bind(FunctionLibraryList.java:105)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3187)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2074)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:1955)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseRelativePath(XPathParser.java:1880)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parsePathExpression(XPathParser.java:1842)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseSimpleMappingExpression(XPathParser.java:1856)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseUnaryExpression(XPathParser.java:1711)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseExprSingle(XPathParser.java:658)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parseExpression(XPathParser.java:593)
     [java] 	at net.sf.saxon.expr.parser.XPathParser.parse(XPathParser.java:464)
     [java] 	at net.sf.saxon.expr.parser.ExpressionTool.make(ExpressionTool.java:103)
     [java] 	at net.sf.saxon.style.StyleElement.makeExpression(StyleElement.java:754)
     [java] 	at net.sf.saxon.style.XSLSequence.prepareAttributes(XSLSequence.java:76)
     [java] 	at net.sf.saxon.style.StyleElement.processAttributes(StyleElement.java:628)
     [java] 	at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:573)
     [java] 	at net.sf.saxon.style.StyleElement.processAllAttributes(StyleElement.java:578)
     [java] 	at net.sf.saxon.style.PrincipalStylesheetModule.processAllAttributes(PrincipalStylesheetModule.java:602)
     [java] 	at net.sf.saxon.style.PrincipalStylesheetModule.preprocess(PrincipalStylesheetModule.java:375)
     [java] 	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:288)
     [java] 	at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:257)
     [java] 	at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:106)
     [java] 	at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:743)
     [java] 	at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:154)
...
     [java] Caused by: java.lang.RuntimeException: Unable to read categories.xml file
     [java] 	at net.sf.saxon.regex.charclass.Categories.build(Categories.java:116)
     [java] 	at net.sf.saxon.regex.charclass.Categories.getCategory(Categories.java:206)
     [java] 	at net.sf.saxon.regex.charclass.Categories.(Categories.java:180)
     [java] 	... 39 more

Looking into the code, I can see that categories.xml is right inside the jar at the top level, while Configuration.locateResource() has a following code to locate the resources:

       filename = "net/sf/saxon/data/" + filename;
        ClassLoader loader = null;
..
            URL u = loader.getResource(filename);

Please advice


Replies (2)

RE: Cannot run Saxon 9.8.0-1 - Added by O'Neil Delpratt almost 7 years ago

Hi,

Thanks for reporting the issue you have found. We have resolved this issue already and it will be available in the next maintenance release. See bug issue #3252

The Saxon-HE 9.80.1 download on source forge will work fine.

RE: Cannot run Saxon 9.8.0-1 - Added by Michael Kay almost 7 years ago

In fact, the problem is specific to the Maven build, and you can avoid it by downloading from Sourceforge.

    (1-2/2)

    Please register to reply