eXist-db / expath-crypto-module

expath
GNU Lesser General Public License v2.1
1 stars 9 forks source link

[BUG] Mac App: exist-db startup after deinstallation throws #50

Open line-o opened 3 years ago

line-o commented 3 years ago

Describe the bug

This is the exception that is logged when starting exist-db after crypto-lib (6.0.1) was deinstalled.

2021-07-01 14:23:39,696 [AWT-EventQueue-0] WARN  (WebAppContext.java [doStart]:533) - Failed startup of context eXist-db Open Source Native XML Database 
java.io.FileNotFoundException: /Users/jll/Library/Application Support/org.exist/expathrepo/crypto-6.0.1/content/crypto-java-lib-1.8.0.jar (No such file or directory)
    at java.util.zip.ZipFile.open(Native Method) ~[?:1.8.0_152]
    at java.util.zip.ZipFile.<init>(ZipFile.java:225) ~[?:1.8.0_152]
    at java.util.zip.ZipFile.<init>(ZipFile.java:155) ~[?:1.8.0_152]
    at java.util.jar.JarFile.<init>(JarFile.java:166) ~[?:1.8.0_152]
    at java.util.jar.JarFile.<init>(JarFile.java:103) ~[?:1.8.0_152]
    at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93) ~[?:1.8.0_152]
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69) ~[?:1.8.0_152]
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:84) ~[?:1.8.0_152]
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122) ~[?:1.8.0_152]
    at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89) ~[?:1.8.0_152]
    at org.eclipse.jetty.webapp.MetaInfConfiguration.getTlds(MetaInfConfiguration.java:445) ~[jetty-webapp-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.webapp.MetaInfConfiguration.scanForTlds(MetaInfConfiguration.java:361) ~[jetty-webapp-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.webapp.MetaInfConfiguration.scanJars(MetaInfConfiguration.java:172) ~[jetty-webapp-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:101) ~[jetty-webapp-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:488) ~[jetty-webapp-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:523) ~[jetty-webapp-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:517) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:157) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:173) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:448) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:66) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:785) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:754) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.Scanner.scan(Scanner.java:641) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:540) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:146) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:252) ~[jetty-deploy-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.Server.start(Server.java:423) ~[jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) ~[jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.server.Server.doStart(Server.java:387) ~[jetty-server-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) ~[jetty-util-9.4.42.v20210604.jar:9.4.42.v20210604]
    at org.exist.jetty.JettyStart.startJetty(JettyStart.java:478) ~[exist-core-5.3.0.jar:5.3.0]
    at org.exist.jetty.JettyStart.run(JettyStart.java:248) ~[exist-core-5.3.0.jar:5.3.0]
    at org.exist.launcher.Launcher.lambda$7(Launcher.java:283) ~[exist-core-5.3.0.jar:5.3.0]
    at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_152]
    at org.exist.launcher.Launcher.lambda$6(Launcher.java:279) ~[exist-core-5.3.0.jar:5.3.0]
    at java.awt.MenuItem.processActionEvent(MenuItem.java:669) [?:1.8.0_152]
    at java.awt.MenuItem.processEvent(MenuItem.java:628) [?:1.8.0_152]
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357) [?:1.8.0_152]
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345) [?:1.8.0_152]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761) [?:1.8.0_152]
    at java.awt.EventQueue.access$500(EventQueue.java:97) [?:1.8.0_152]
    at java.awt.EventQueue$3.run(EventQueue.java:709) [?:1.8.0_152]
    at java.awt.EventQueue$3.run(EventQueue.java:703) [?:1.8.0_152]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_152]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_152]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) [?:1.8.0_152]
    at java.awt.EventQueue$4.run(EventQueue.java:731) [?:1.8.0_152]
    at java.awt.EventQueue$4.run(EventQueue.java:729) [?:1.8.0_152]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_152]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_152]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [?:1.8.0_152]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_152]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_152]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_152]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_152]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_152]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_152]

Expected behavior

An exist-db instance to start-up normally after crypto-lib was removed.

To Reproduce

This was tested with v6.0.1 but it is unsure which versions are affected.

Context (please always complete the following information):

Additional context

line-o commented 3 years ago

This exception will only go away if the Mac application is Quit. Which hints at the Mac app keeping something in memory or cache as long as it is running.

These two additional lines are written to exist.log when the Mac application is Quit:

2021-07-01 14:49:32,258 [AWT-EventQueue-0] DEBUG (JettyStart.java [lambda$9]:539) - BrokerPoolsAndJetty.ShutdownHook hook unregistered 
2021-07-01 14:49:32,260 [global.BrokerPools.ShutdownHook] INFO  (BrokerPools.java [lambda$0]:70) - Executing shutdown thread 
adamretter commented 3 years ago

@line-o I vaguely recall that eXist-db has a problem with any Java XAR, whereby it needs to be restarted after it is installed.

line-o commented 3 years ago

@adamretter I heard this too some time ago. But in my testing this is not the case. Installation runs fine and the included jars can be used right away. The CI for exist-jwt also proves that.