Skip to content

Commit 2b7f2c1

Browse files
authored
Fix Neo4j startup crash: pin APOC 4.2.0.9 jar to avoid Guava IncompatibleClassChangeError
NEO4JLABS_PLUGINS auto-downloads the latest APOC version which now bundles a Guava version that conflicts with Neo4j 4.2.19's internal Guava, causing GlobalProceduresRegistry to crash at startup with IncompatibleClassChangeError on MapMakerInternalMap$WeakValueReference. Fix: remove APOC from NEO4JLABS_PLUGINS and instead ADD the pinned apoc-4.2.0.9-all.jar directly into the image. GDS is kept in NEO4JLABS_PLUGINS as it was unaffected.
1 parent ca4de20 commit 2b7f2c1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎Dockerfile‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,26 @@ ENV NEO4J_dbms_security_auth__enabled=true
1111
ENV NEO4J_dbms_memory_heap_maxSize=4G
1212
ENV NEO4J_dbms_memory_heap_initial__size=1G
1313
ENV NEO4J_dbms_read__only=false
14-
ENV NEO4J_dbms_query__cache__size=0
1514
ENV NEO4J_dbms_default__listen__address=0.0.0.0
1615
ENV NEO4J_dbms_connector_http_advertised__address=0.0.0.0:7474
1716
ENV NEO4J_dbms_connector_bolt_advertised__address=0.0.0.0:7687
1817
ENV NEO4J_dbms_connector_http_listen__address=0.0.0.0:7474
1918
ENV NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:7687
2019
ENV NEO4J_dbms_security_procedures_unrestricted=ebi.spot.neo4j2owl.*,apoc.*,gds.*
2120
ENV NEO4J_dbms_jvm_additional="-Dlog4j2.formatMsgNoLookups=true -Dlog4j2.disable.jmx=true"
22-
ENV NEO4JLABS_PLUGINS='["apoc","graph-data-science"]'
21+
# Pin GDS only - APOC pinned below as a jar to avoid Guava version conflict with NEO4JLABS_PLUGINS auto-download
22+
ENV NEO4JLABS_PLUGINS='["graph-data-science"]'
2323

2424
RUN apt-get -y update && apt-get -y install tar gzip curl wget zip unzip
2525

2626
COPY loadKB.sh /opt/VFB/
27-
ADD https://github.com/VirtualFlyBrain/neo4j2owl/releases/download/1.2.3-PRE/neo4j2owl.jar /var/lib/neo4j/plugins/neo4j2owl.jar
27+
ADD https://github.com/VirtualFlyBrain/neo4j2owl/releases/download/1.2.3-PRE/neo4j2owl.jar /var/lib/neo4j/plugins/neo4j2owl.jar
28+
# Pin APOC 4.2.x explicitly - NEO4JLABS_PLUGINS downloads an incompatible version causing Guava IncompatibleClassChangeError
29+
ADD https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/4.2.0.9/apoc-4.2.0.9-all.jar /var/lib/neo4j/plugins/apoc.jar
2830

29-
RUN mkdir -p /opt/VFB/backup/
31+
RUN mkdir -p /opt/VFB/backup/
3032

31-
RUN chmod -R 777 /opt/VFB/backup/
33+
RUN chmod -R 777 /opt/VFB/backup/
3234

3335
RUN chmod +x /opt/VFB/loadKB.sh
3436

0 commit comments

Comments
 (0)