cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo4j Community compatability with JAVA 11

Hi Everyone, I have a problem running neo4j in JAVA 11.. currently Im running neo4j 3.3.5 in JAVA 8 and it's working fine, however upon upgrading to JAVA 11 I can run neo4j in console but wasn't able to login. I read some comments here(https://github.com/neo4j/neo4j-browser/issues/671) saying that the correct java version should be used. Just want to ask if neo4j is supported in JAVA 11.? Thanks in advance guys

22 REPLIES 22

Java 11 isn't currently supported at all; I would expect that you would run into problems with it. It's on the roadmap but unfortunately I don't have a date when it would be ready.

Hi David,

Thanks for the reply. How about with enterprise edition? Do you have an idea if how we could use AWS-EC2(https://aws.amazon.com/marketplace/pp/B071P26C9D) for deploying neo4j instead of a physical server.?

Thanks,
Errol

Java 11 isn't supported for either enterprise or community.

If you'd like to run Neo4j on AWS, that is well supported - there are several different options. The docs on how to do that, you can find here:

It should be working with Java up to 11, just recently in 3.4.9 the restrictions check in the startup script has been updated to reflect that.

Hi michael,

This is good news. Just when was this released? Is it both with community and enterprise? Just to clarify, we can now run 3.4.9 neo4j in java 11 in windows 10?. how about with linux?

Thanks,
Errol

All the releases are the same. So should be no difference between the operating systems.

Hi @michael.hunger

I have installed openjdk 11 on my Amazon Linux 2 instance and then neo4j 3.4.9, and I get this error message :

ERROR! Neo4j cannot be started using java version 11.0.1.
Please use Oracle(R) Java(TM) 8, OpenJDK(TM) or IBM J9 to run Neo4j.
Please see https://neo4j.com/docs/ for Neo4j installation instructions.

Could you please confirm it is possible to start neo4j with java > 8 ?

Thanks

Hi @michael.hunger

Actually, I have made another installation of OpenJDK 11 and now neo4j is starting fine.
I was using previously an ansible galaxy role which did not perform well apparently.

Thanks again.

That's noted michael. Thank you for the response 🙂

Hi @Michael Hunger

I have installed openjdk 11 on my environment and then neo4j 3.4.9, and I get this error message :

its not starting the service

Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...
Service neo4j boot error, restarting...

when i try to ckeck the version its getting error message
/var/lib/neo4j/bin/neo4j version
ERROR! Neo4j cannot be started using java version 11.0.1.

  • Please use Oracle(R) Java(TM) 8, OpenJDK(TM) or IBM J9 to run Neo4j.
  • Please see https://neo4j.com/docs/ for Neo4j installation instructions.

can you suggest me how to use neo4j in java 11

It works for me, can you share /var/log/neo4j/debug.log ?

java -version
openjdk version "11.0.1" 2018-10-16 LTS
OpenJDK Runtime Environment Zulu11.2+3 (build 11.0.1+13-LTS)
OpenJDK 64-Bit Server VM Zulu11.2+3 (build 11.0.1+13-LTS, mixed mode)

$ ./bin/neo4j version
neo4j 3.4.7

$ ./bin/neo4j console

Active database: graph.db
Directories in use:
  home:         /Users/mh/v/neo4j-enterprise-3.4.7
Starting Neo4j.
2018-11-21 10:21:39.803+0000 WARN  You are using an unsupported version of the Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 8, OpenJDK(TM) 8 or IBM J9.
2018-11-21 10:21:39.831+0000 INFO  ======== Neo4j 3.4.7 ========
2018-11-21 10:21:39.873+0000 INFO  Starting...
2018-11-21 10:21:41.387+0000 INFO  Initiating metrics...
...
2018-11-21 10:21:48.609+0000 INFO  Started.
2018-11-21 10:21:48.682+0000 INFO  Mounted REST API at: /db/manage
2018-11-21 10:21:48.843+0000 INFO  Server thread metrics has been registered successfully

eric13013
Node Clone

Hi @michael.hunger

Here are some news about my use of Neo4j 3.4.10 on my Amazon Linux 2 instance with OpenJDK 11.

When I install Neo4j, it is starting well :

[root@ip-172-31-35-129 ec2-user]# systemctl status neo4j
● neo4j.service - Neo4j Graph Database
   Loaded: loaded (/usr/lib/systemd/system/neo4j.service; enabled; vendor preset: disabled)
   Active: active (running) since jeu 2018-11-22 12:13:45 UTC; 1min 5s ago
 Main PID: 4076 (java)
   CGroup: /system.slice/neo4j.service
           └─4076 /usr/bin/java -cp /var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/* -server -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFi...

nov 22 12:13:46 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: 2018-11-22 12:13:46.188+0000 INFO  ======== Neo4j 3.4.10 ========
nov 22 12:13:46 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: 2018-11-22 12:13:46.215+0000 INFO  Starting...
nov 22 12:13:48 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: WARNING: An illegal reflective access operation has occurred
nov 22 12:13:48 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: WARNING: Illegal reflective access by org.neo4j.io.pagecache.impl.SingleFilePageSwapper (file:/usr/share/neo4j/lib/neo4j-io-3.4.10.jar) to field sun...l.positionLock
nov 22 12:13:48 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: WARNING: Please consider reporting this to the maintainers of org.neo4j.io.pagecache.impl.SingleFilePageSwapper
nov 22 12:13:48 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
nov 22 12:13:48 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: WARNING: All illegal access operations will be denied in a future release
nov 22 12:13:48 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: 2018-11-22 12:13:48.777+0000 INFO  Bolt enabled on 127.0.0.1:7687.
nov 22 12:13:50 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: 2018-11-22 12:13:50.832+0000 INFO  Started.
nov 22 12:13:51 ip-172-31-35-129.eu-west-3.compute.internal neo4j[4076]: 2018-11-22 12:13:51.810+0000 INFO  Remote interface available at http://localhost:7474/

However, after I reboot the instance, it fails to start :

[root@ip-172-31-35-129 ec2-user]# systemctl status neo4j
● neo4j.service - Neo4j Graph Database
   Loaded: loaded (/usr/lib/systemd/system/neo4j.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since jeu 2018-11-22 12:15:54 UTC; 48s ago
  Process: 3440 ExecStart=/usr/share/neo4j/bin/neo4j console (code=exited, status=1/FAILURE)
 Main PID: 3440 (code=exited, status=1/FAILURE)

nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: neo4j.service: main process exited, code=exited, status=1/FAILURE
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: Unit neo4j.service entered failed state.
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: neo4j.service failed.
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: neo4j.service holdoff time over, scheduling restart.
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: start request repeated too quickly for neo4j.service
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: Failed to start Neo4j Graph Database.
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: Unit neo4j.service entered failed state.
nov 22 12:15:54 ip-172-31-35-129.eu-west-3.compute.internal systemd[1]: neo4j.service failed.

And here is the result of java -version :

[root@ip-172-31-35-129 ec2-user]# java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

Same behavior with Oracle JDK, or Zulu OpenJDK.
Do you have an idea why only after the instance reboot Neo4j fails to start with Java 11 ?

Can you please also share debug.log from your instance?

Hi @michael.hunger

Here it is : debug.log

Regards,

This is odd, no indication of what triggered the shutdown

Could it be something else like file permissions or such?
Could you test if it works with Java 8?

eric13013
Node Clone

Hi @michael.hunger

I've just performed the same install of Neo4j 3.4.10 on a new Amazon Linux 2 instance, but with Java 8. And it works great, even after I reboot the instance.

Seems like I have the same problem described here. And the solution is to fallback to Java 8.

For my previous debug.log with Java 11, after I reboot the instance, Neo4j doesn't start anymore, and nothing is written anymore in the debug.log. So, no indication of what triggered the shutdown.

It would be great to start Neo4j with Java > 8 and stay with it.

It would be good to find the root cause. It should actually work.
Would you mind creating at GH issue yourself and adding the information you've posted here?

Esp. also the bit about Amazon LInux.

eric13013
Node Clone

I have posted a comment here.

szenyo
Node Clone

I think slowly everybody should move to Java 11 (or 12 soon), so I am personally waiting for the support of this. It would be nice to see when it happens.

folterj
Node Clone

We are now nearing the end of 2019 - almost a year after this question. Using Java 11 with the latest version of neo4j enterprise (3.5.12) still shows an error message. We've also lost some essential functions (randomUUID()) - perhaps related to this.

Using OpenJDK 11 on CentOS7:
openjdk version "11.0.4" 2019-07-16 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.4+11-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.4+11-LTS, mixed mode, sharing

Results in this startup:
2019-10-22 20:07:02.393+0000 WARN You are using an unsupported version of the Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 8, OpenJDK(TM) 8 or IBM J9.
2019-10-22 20:07:02.408+0000 INFO ======== Neo4j 3.5.12 ========
2019-10-22 20:07:02.414+0000 INFO Starting...
2019-10-22 20:07:03.487+0000 INFO Initiating metrics...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.collections.impl.utility.ArrayListIterate (file:/usr/share/neo4j/lib/eclipse-collections-9.2.0.jar) to field java.util.ArrayList.elementData
WARNING: Please consider reporting this to the maintainers of org.eclipse.collections.impl.utility.ArrayListIterate
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-10-22 20:07:05.190+0000 INFO Sending metrics to CSV file at /var/lib/neo4j/metrics
2019-10-22 20:07:05.835+0000 INFO Bolt enabled on 0.0.0.0:7687.
2019-10-22 20:07:07.370+0000 INFO Started.
2019-10-22 20:07:07.554+0000 INFO Mounted REST API at: /db/manage
2019-10-22 20:07:07.706+0000 INFO Server thread metrics have been registered successfully
2019-10-22 20:07:08.626+0000 INFO Remote interface available at https://localhost:7473/

It's not an error but a warning. It's just what we guarantee for customers.
It still works.

Neo4j 4.0 will be running on Java 11.