Cannot install apoc 3.4.0.4 on neo4j community 3.5.1

Hi all
I'm trying to install AOPC on Neo4j community 3.5.1 but after the installation the server refuses to start with errors.
What I'm doing wrong?

Installed files

neo4j-community-3.5.1-unix.tar.gz
apoc-3.4.0.4-all.jar

Settings in neo4.conf

dbms.security.procedures.unrestricted=apoc.*
dbms.security.procedures.whitelist=apoc.*

Errors received at startup:

nohup: input ignorato
2018-12-27 19:13:32.812+0000 INFO  ======== Neo4j 3.5.1 ========
2018-12-27 19:13:32.819+0000 INFO  Starting...
2018-12-27 19:13:33.640+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5f354bcf' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.kernel.impl.logging.LogService". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5f354bcf' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.kernel.impl.logging.LogService".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5f354bcf' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.kernel.impl.logging.LogService".
        at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:184)
        at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:123)
        at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
        at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@5f354bcf' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.kernel.impl.logging.LogService".
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:177)
        ... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /home/sysop/NEO4J/neo4j-community-3.5.1/data/databases
        at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:212)
        at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:135)
        at org.neo4j.server.database.CommunityGraphFactory.newGraphDatabase(CommunityGraphFactory.java:40)
        at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:78)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
        ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.GlobalKernelExtensions@6cc558c6' failed to initialize. Please see the attached cause exception "org.neo4j.kernel.impl.logging.LogService".
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:434)
        at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102)
        at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:207)
        ... 9 more
Caused by: org.neo4j.kernel.extension.FailedToBuildKernelExtensionException: Failed to build kernel extension KernelExtension:ApocKernelExtensionFactory[APOC] because it is compiled with a reference to a class, method, or field, that is not in the class path: 'org/neo4j/kernel/impl/logging/LogService'. The most common cause of this problem, is that Neo4j has been upgraded without also upgrading allinstalled extensions, such as APOC. Make sure that all of your extensions are build against your specific version of Neo4j.
        at org.neo4j.kernel.extension.KernelExtensionFailureStrategies.wrap(KernelExtensionFailureStrategies.java:60)
        at org.neo4j.kernel.extension.KernelExtensionFailureStrategies.access$100(KernelExtensionFailureStrategies.java:26)
        at org.neo4j.kernel.extension.KernelExtensionFailureStrategies$1.handle(KernelExtensionFailureStrategies.java:76)
        at org.neo4j.kernel.extension.AbstractKernelExtensions.init(AbstractKernelExtensions.java:72)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:413)
        ... 12 more
Caused by: java.lang.NoClassDefFoundError: org/neo4j/kernel/impl/logging/LogService
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetPublicMethods(Class.java:2902)
        at java.lang.Class.getMethods(Class.java:1615)
        at sun.misc.ProxyGenerator.generateClassFile(ProxyGenerator.java:451)
        at sun.misc.ProxyGenerator.generateProxyClass(ProxyGenerator.java:339)
        at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:639)
        at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
        at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
        at java.lang.reflect.WeakCache.get(WeakCache.java:127)
        at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
        at org.neo4j.kernel.impl.util.DependenciesProxy.dependencies(DependenciesProxy.java:55)
        at org.neo4j.kernel.extension.AbstractKernelExtensions.getKernelExtensionDependencies(AbstractKernelExtensions.java:114)
        at org.neo4j.kernel.extension.AbstractKernelExtensions.init(AbstractKernelExtensions.java:61)
        ... 13 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.kernel.impl.logging.LogService
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 28 more
2018-12-27 19:13:33.642+0000 INFO  Neo4j Server shutdown initiated by request

The first two parts of the APOC version (major.minor.x.x.) match up the major and minor versions of the Neo4j version for compatibility purposes, so APOC 3.4.0.4 is meant to be used with Neo4j 3.4.x. You need to use a 3.5.x.x flavor of APOC to match your Neo4j version, 3.5.0.1 is the latest release.

That said, it looks like the documentation page isn't reflecting the new version, we'll get that fixed up.

Thanks a lot!
It worked!!!

I have the same error in stack. I'm running Neo4j 3.5.9 in a docker container and I have https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.4/apoc-3.5.0.4-all.jar

added to plugins. I get the following:

neo4j_1  | 2019-09-14 19:58:28.862+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@54da32dc' was successfully initialized, but failed to start. Please see the attached cause exception "Some jar procedure files are invalid, see log for details.". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@54da32dc' was successfully initialized, but failed to start. Please see the attached cause exception "Some jar procedure files are invalid, see log for details.".
neo4j_1  | org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@54da32dc' was successfully initialized, but failed to start. Please see the attached cause exception "Some jar procedure files are invalid, see log for details.".
neo4j_1  | 	at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
neo4j_1  | 	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
neo4j_1  | 	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:124)
neo4j_1  | 	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
neo4j_1  | 	at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
neo4j_1  | Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@54da32dc' was successfully initialized, but failed to start. Please see the attached cause exception "Some jar procedure files are invalid, see log for details.".
neo4j_1  | 	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
neo4j_1  | 	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
neo4j_1  | 	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:180)
neo4j_1  | 	... 3 more
neo4j_1  | Caused by: java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /data/databases
neo4j_1  | 	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:232)
neo4j_1  | 	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:148)
neo4j_1  | 	at org.neo4j.server.database.CommunityGraphFactory.newGraphDatabase(CommunityGraphFactory.java:41)
neo4j_1  | 	at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:90)
neo4j_1  | 	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
neo4j_1  | 	... 5 more
neo4j_1  | Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@349d0836' was successfully initialized, but failed to start. Please see the attached cause exception "Some jar procedure files are invalid, see log for details.".
neo4j_1  | 	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
neo4j_1  | 	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
neo4j_1  | 	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:227)
neo4j_1  | 	... 9 more
neo4j_1  | Caused by: java.util.zip.ZipException: Some jar procedure files are invalid, see log for details.
neo4j_1  | 	at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:76)
neo4j_1  | 	at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:323)
neo4j_1  | 	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
neo4j_1  | 	... 11 more
neo4j_1  | 2019-09-14 19:58:28.865+0000 INFO  Neo4j Server shutdown initiated by request
kb-graph_neo4j_1 exited with code 1

Major, minor is matching though…

Ok, just had bad permissions from my docker build, "ZipException" was the tell. Needed chown on add:

ADD --chown=neo4j:neo4j https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.4/apoc-3.5.0.4-all.jar /var/lib/neo4j/plugins/
1 Like

Hey @hedefalk , literally made an account to say that you are the GOAT and this most likely resolves my issue! For anyone who might have this issue with Amundsen, see Adding `APOC` to Neo4J via Docker Compose · Discussion #1801 · amundsen-io/amundsen · GitHub