Exist: [BUG] Crypto module broken in eXist develop

Created on 23 Sep 2020  Â·  12Comments  Â·  Source: eXist-db/exist

Describe the bug

Any query that imports the crypto module returns the following error:

Cannot compile xquery: exerr:ERROR error found while loading module crypto: Unable to instantiate module from EXPathrepository: org.expath.exist.crypto.ExistExpathCryptoModule

This bug does not affect eXist 5.2.0.

Expected behavior

Imports of the crypto module should not raise this error.

To Reproduce

The following query triggers the error:

xquery version "3.1";

import module namespace crypto = "http://expath.org/ns/crypto";

1

The full stack trace from exist.log:

2020-09-23 15:50:13,715 [qtp772128296-94] ERROR (XQueryServlet.java [process]:558) - Cannot compile xquery: exerr:ERROR error found while loading module crypto: Unable to instantiate module from EXPathrepository: org.expath.exist.crypto.ExistExpathCryptoModule 
org.exist.EXistException: Cannot compile xquery: exerr:ERROR error found while loading module crypto: Unable to instantiate module from EXPathrepository: org.expath.exist.crypto.ExistExpathCryptoModule
    at org.exist.http.servlets.XQueryServlet.process(XQueryServlet.java:451) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.http.servlets.XQueryServlet.doPost(XQueryServlet.java:192) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[javax.servlet-api-3.1.0.jar:3.1.0]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
    at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1411) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:569) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:620) ~[jetty-security-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1377) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:507) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1292) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:160) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:78) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:51) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.http.urlrewrite.XQueryURLRewrite.doRewrite(XQueryURLRewrite.java:524) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:343) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
    at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1402) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) ~[websocket-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:567) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) ~[jetty-security-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1377) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:507) ~[jetty-servlet-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1292) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:717) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.Server.handle(Server.java:501) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~[jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) [jetty-server-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [jetty-io-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.31.v20200723.jar:9.4.31.v20200723]
    at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.exist.xquery.XPathException: exerr:ERROR error found while loading module crypto: Unable to instantiate module from EXPathrepository: org.expath.exist.crypto.ExistExpathCryptoModule
    at org.exist.repo.ExistRepository.instantiateModule(ExistRepository.java:193) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.repo.ExistRepository.getModule(ExistRepository.java:149) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.repo.ExistRepository.resolveJavaModule(ExistRepository.java:134) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQueryContext.resolveInEXPathRepository(XQueryContext.java:487) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQueryContext.importModule(XQueryContext.java:2339) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.importDecl(XQueryTreeParser.java:6321) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:5340) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.mainModule(XQueryTreeParser.java:4042) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:3987) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3642) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQuery.compile(XQuery.java:128) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQuery.compile(XQuery.java:79) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQuery.compile(XQuery.java:71) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.http.servlets.XQueryServlet.process(XQueryServlet.java:448) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    ... 64 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.expath.exist.crypto.ExistExpathCryptoModule
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
    at org.exist.repo.ExistRepository.instantiateModule(ExistRepository.java:175) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.repo.ExistRepository.getModule(ExistRepository.java:149) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.repo.ExistRepository.resolveJavaModule(ExistRepository.java:134) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQueryContext.resolveInEXPathRepository(XQueryContext.java:487) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQueryContext.importModule(XQueryContext.java:2339) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.importDecl(XQueryTreeParser.java:6321) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:5340) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.mainModule(XQueryTreeParser.java:4042) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:3987) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3642) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQuery.compile(XQuery.java:128) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQuery.compile(XQuery.java:79) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.xquery.XQuery.compile(XQuery.java:71) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    at org.exist.http.servlets.XQueryServlet.process(XQueryServlet.java:448) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
    ... 64 more

Context (please always complete the following information):

  • OS: macOS 10.15.6
  • eXist-db version: eXist 5.3.0-SNAPSHOT 3c26d39ad84dd15420064b23bb1f091716331837 20200923074340
  • Java Version: liberica-jdk11-full (openjdk version "11.0.8" 2020-07-14 LTS)

Additional context

  • How is eXist-db installed? build from source
  • Any custom changes in e.g. conf.xml? none
deprecation

Most helpful comment

@dizzzz Sure.

All 12 comments

Hmm eXist-db 5.2.0 and 5.3.0-SNAPSHOT should be API compatible... at least in terms of a public API.

I wonder if the problem is either:

  1. The Crypto Module uses an internal API that has changed? If so, the Crypto module will need to be updated for 5.3.0-SNAPSHOT
  2. We have accidentally changed a public API between 5.2.0 and 5.3.0-SNAPSHOT? If so, we should reinstate compatibility in eXist-db 5.3.0-SNAPSHOT.

it is a dependency issue: from the expath logfile:

2020-09-27 16:43:55,445 [qtp1783737980-82] ERROR (ExistRepository.java [instantiateModule]:191) - org/exist/util/io/FastByteArrayInputStream 
java.lang.NoClassDefFoundError: org/exist/util/io/FastByteArrayInputStream
        at org.expath.exist.crypto.ExistExpathCryptoModule.<clinit>(ExistExpathCryptoModule.java:63) ~[expath-crypto-module-exist-java-lib-1.0.0.jar:1.0.0]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
        at org.exist.repo.ExistRepository.instantiateModule(ExistRepository.java:175) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.repo.ExistRepository.getModule(ExistRepository.java:149) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.repo.ExistRepository.resolveJavaModule(ExistRepository.java:134) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.XQueryContext.resolveInEXPathRepository(XQueryContext.java:487) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.XQueryContext.importModule(XQueryContext.java:2339) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.parser.XQueryTreeParser.importDecl(XQueryTreeParser.java:6321) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.parser.XQueryTreeParser.prolog(XQueryTreeParser.java:5340) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.parser.XQueryTreeParser.mainModule(XQueryTreeParser.java:4042) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.parser.XQueryTreeParser.module(XQueryTreeParser.java:3987) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.parser.XQueryTreeParser.xpath(XQueryTreeParser.java:3642) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.functions.util.Compile.eval(Compile.java:140) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.BasicFunction.eval(BasicFunction.java:73) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:62) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.DebuggableExpression.eval(DebuggableExpression.java:58) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.LetExpr.eval(LetExpr.java:110) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
        at org.exist.xquery.LetExpr.eval(LetExpr.java:110) ~[exist-core-5.3.0-SNAPSHOT.jar:5.3.0-SNAPSHOT]
...
Caused by: java.lang.ClassNotFoundException: org.exist.util.io.FastByteArrayInputStream
        at java.net.URLClassLoader.findClass(URLClassLoader.java:471) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
        ... 94 more

it has been removed 14 days ago, as the actual code is now upstream in apache commons-io. Great achievement by Adam! link

@claudius108 please could you rework your plugin to match the commons-io equivalent?

@dizzzz Sure.

when I update/ install the crypto lib to version 5.3.0 the following error is raised when imported

Error: It is a static error if multiple functions declared or imported by a module have the number of arguments and their expanded QNames are equal (as defined by the eq operator). Error while loading module xmldb:///db/system/repo/jwt-1.0.1/test/jwt-spec.xqm: error found while loading module jwt: Error while loading module : Prolog has more than one imported module that defines the function: {http://expath.org/ns/crypto}generate-signature#7

Also it is hard to explain to people outside the community why the version changed to 5.3.0

Hi,

I have no idea about the module
xmldb:///db/system/repo/jwt-1.0.1/test/jwt-spec.xqm.

The version 5.3.0 is to synchronize the module with eXist versions.

Claudius

On Mon, 16 Nov 2020 at 14:03, Juri Leino notifications@github.com wrote:

Also it is hard to explain to people outside the community why the version
changed to 5.3.0

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/eXist-db/exist/issues/3540#issuecomment-727936374,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANKHHRF2TURBUO2BZ36QADSQEIJ5ANCNFSM4RXOH24Q
.

--
http://kuberam.ro

It happens with any library importing the crypto lib on 5.3.0-SNAPSHOT see the end of the error ... Prolog has more than one imported module that defines the function: {http://expath.org/ns/crypto}generate-signature#7

I am strongly in favour of semantic versioning. Since the new version of the crypto-lib introduces a breaking change to the current one, the new version should be 2.0.0

I do not see the need to synchronise its version with existdb. None of the bundled applications and libraries have that.

Could it be that the crypto module defines more than one generate-signature function of the same arity? If so that would be an error!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adamretter picture adamretter  Â·  4Comments

lguariento picture lguariento  Â·  5Comments

dizzzz picture dizzzz  Â·  4Comments

mathias-goebel picture mathias-goebel  Â·  4Comments

merenyics picture merenyics  Â·  3Comments