Embedded: repair:clean-all(), repair:repair() give stack trace #297

Closed
dizzzz opened this Issue Aug 14, 2014 · 0 comments

Comments

Projects
None yet
1 participant
Owner

dizzzz commented Aug 14, 2014

In embedded (local) mode running the following query

import module namespace repair="http://exist-db.org/xquery/repo/repair" at "resource:org/exist/xquery/modules/expathrepo/repair.xql";
repair:clean-all(),
repair:repair()

results in the following trace

org.xmldb.api.base.XMLDBException: err:XPST0081 error found while loading module repair: Error while loading module resource:org/exist/xquery/modules/expathrepo/repair.xql: No namespace defined for prefix compression [at line 100, column 26]
    at org.exist.xmldb.LocalXPathQueryService.compile(LocalXPathQueryService.java:259)
    at org.exist.client.QueryDialog$QueryThread.run(QueryDialog.java:600)
Caused by: org.exist.xquery.XPathException: err:XPST0081 error found while loading module repair: Error while loading module resource:org/exist/xquery/modules/expathrepo/repair.xql: No namespace defined for prefix compression [at line 100, column 26]
    at org.exist.dom.QName.parse(QName.java:289)
    at org.exist.xquery.FunctionFactory.createFunction(FunctionFactory.java:48)
    at org.exist.xquery.parser.XQueryTreeParser.functionCall(XQueryTreeParser.java:9843)
    at org.exist.xquery.parser.XQueryTreeParser.primaryExpr(XQueryTreeParser.java:7071)
    at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:3651)
    at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:367)
    at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:1668)
    at org.exist.xquery.parser.XQueryTreeParser.functionDecl(XQueryTreeParser.java:5688)
    at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:4851)
    at org.exist.xquery.parser.XQueryTreeParser.libraryModule(XQueryTreeParser.java:4108)
    at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:3943)
    at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3731)
    at org.exist.xquery.XQueryContext.compileModule(XQueryContext.java:2902)
    at org.exist.xquery.XQueryContext.compileOrBorrowModule(XQueryContext.java:2831)
    at org.exist.xquery.XQueryContext.importModule(XQueryContext.java:2773)
    at org.exist.xquery.parser.XQueryTreeParser.importDecl(XQueryTreeParser.java:5804)
    at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:4844)
    at org.exist.xquery.parser.XQueryTreeParser.mainModule(XQueryTreeParser.java:4120)
    at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:4065)
    at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3731)
    at org.exist.xquery.XQuery.compile(XQuery.java:160)
    at org.exist.xquery.XQuery.compile(XQuery.java:109)
    at org.exist.xquery.XQuery.compile(XQuery.java:93)
    at org.exist.xquery.XQuery.compile(XQuery.java:85)
    at org.exist.xmldb.LocalXPathQueryService.compileAndCheck(LocalXPathQueryService.java:272)
    at org.exist.xmldb.LocalXPathQueryService.compile(LocalXPathQueryService.java:257)
    ... 1 more
Caused by: org.exist.xquery.XPathException: err:XPST0081 error found while loading module repair: Error while loading module resource:org/exist/xquery/modules/expathrepo/repair.xql: No namespace defined for prefix compression [at line 100, column 26]
    at org.exist.dom.QName.parse(QName.java:289)
    at org.exist.xquery.FunctionFactory.createFunction(FunctionFactory.java:48)
    at org.exist.xquery.parser.XQueryTreeParser.functionCall(XQueryTreeParser.java:9843)
    at org.exist.xquery.parser.XQueryTreeParser.primaryExpr(XQueryTreeParser.java:7071)
    at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:3651)
    at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:367)
    at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:1668)
    at org.exist.xquery.parser.XQueryTreeParser.functionDecl(XQueryTreeParser.java:5688)
    at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:4851)
    at org.exist.xquery.parser.XQueryTreeParser.libraryModule(XQueryTreeParser.java:4108)
    at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:3943)
    at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3731)
    at org.exist.xquery.XQueryContext.compileModule(XQueryContext.java:2902)
    at org.exist.xquery.XQueryContext.compileOrBorrowModule(XQueryContext.java:2831)
    at org.exist.xquery.XQueryContext.importModule(XQueryContext.java:2773)
    at org.exist.xquery.parser.XQueryTreeParser.importDecl(XQueryTreeParser.java:5804)
    at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:4844)
    at org.exist.xquery.parser.XQueryTreeParser.mainModule(XQueryTreeParser.java:4120)
    at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:4065)
    at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3731)
    at org.exist.xquery.XQuery.compile(XQuery.java:160)
    at org.exist.xquery.XQuery.compile(XQuery.java:109)
    at org.exist.xquery.XQuery.compile(XQuery.java:93)
    at org.exist.xquery.XQuery.compile(XQuery.java:85)
    at org.exist.xmldb.LocalXPathQueryService.compileAndCheck(LocalXPathQueryService.java:272)
    at org.exist.xmldb.LocalXPathQueryService.compile(LocalXPathQueryService.java:257)
    at org.exist.client.QueryDialog$QueryThread.run(QueryDialog.java:600)

this is bad for repairing the database :-). Query is taken from documentation.
In ``exist.log` the following trace is visible:

2014-08-14 21:32:49,970 [main] ERROR (Configuration.java [lookupModuleClass]:462) - Module http://exist-db.org/xquery/compression could not be initialized due to a missing dependancy (NoClassDefFoundError): org/apache/commons/compress/archivers/tar/TarArchiveOutputStream 
java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/tar/TarArchiveOutputStream
        at org.exist.xquery.modules.compression.CompressionModule.<clinit>(CompressionModule.java:47)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at org.exist.util.Configuration.lookupModuleClass(Configuration.java:446)
        at org.exist.util.Configuration.loadModuleClasses(Configuration.java:412)
        at org.exist.util.Configuration.configureXQuery(Configuration.java:348)
        at org.exist.util.Configuration.<init>(Configuration.java:253)
        at org.exist.xmldb.DatabaseImpl.configure(DatabaseImpl.java:107)
        at org.exist.xmldb.DatabaseImpl.getLocalCollection(DatabaseImpl.java:183)
        at org.exist.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:162)
        at org.exist.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:153)
        at org.xmldb.api.DatabaseManager.getCollection(Unknown Source)
        at org.exist.client.InteractiveClient.connect(InteractiveClient.java:330)
        at org.exist.client.InteractiveClient.connectToDatabase(InteractiveClient.java:2338)
        at org.exist.client.InteractiveClient.run(InteractiveClient.java:2426)
        at org.exist.client.InteractiveClient.main(InteractiveClient.java:292)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.exist.start.Main.invokeMain(Main.java:126)
        at org.exist.start.Main.run(Main.java:448)
        at org.exist.start.Main.main(Main.java:50)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 23 more

dizzzz removed the investigate label Aug 14, 2014

dizzzz closed this Aug 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment