Incompatible JVM for 3.5 and Desktop

Hi, I've been dealing with bugs that have been cropping up lately, specifically in regards to some of our devs using neo4j desktop, as opposed to running directly from command line (./bin/neo4j console).

Issue was tested in macOS/Catalina. I'm on neo4j 3.5.x , and using python driver 1.7 in our tooling. I also use graphaware server / UUID plugins.

The main issue, I believe, is that Neo4j Desktop does not have a setting to use the system's java environment, as opposed to the one built into Desktop. It appears that after a certain release of Desktop, likely with the 4.0 release, it's only providing java 11, and doesn't appear to have logic to use java 8 on 3.5 (or at least that's my assumption based on the errors). Whenever I run a database through the Desktop interface now, I get the following warning:

2020-11-30 04:40:18.698+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.

Even though my JAVA_HOME and PATH are both configured correctly.

I normally would be fine ignoring this; however, it results in a separate error when I try to add data to my database, again in conjunction with the python neo4j driver 1.7 and graphaware.

neobolt.exceptions.ClientError: org/omg/CORBA/portable/IDLEntity

I found nothing on this error in my searching, and there weren't any other more descriptive logs I could find. I can't confirm what part of the stack is causing this, but it's clear now at least that having the correct version of Java avoids the problem.

My temporary solution is to run databases without the Desktop interface, but that's obviously not ideal. Long term we'll likely be migrating to using neo4j 4 and python driver 4, which I suppose will remove the need for a custom java path. In the meantime though, this seems like something that needs addressed. If neo4j desktop claims to support version 3, it would presumably have a mechanism to let you run that with the supported version of java. I was hoping to find a java path setting in neo4j.conf or something, but was not able to find documentation for it.

If anyone knows of a way to do that already that I've missed, or have other suggestions to deal with this, would be greatly appreciative. Also if someone knows whether this is specifically incompatibility between Java 11 and either Neo4j 3, python driver 1.7, or graphaware 3.5, that would help us in the short term.

Can you tell me what JAVA_HOME should be set to on the Mac (OSX 10.15.7)? I've been looking for what this should be and I see multiple answers, so I'm puzzled as heck.

Thanks.

For me at least, I added the following to my ~/.bash_profile :

export JAVA_HOME=$(/usr/libexec/java_home)

and then restarted terminal. When you then echo $JAVA_HOME, for me it outputs:

/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home

Also, I installed my JDK 8 through oracle's website download. Mileage may vary, but hope that helps.

1 Like

What do you have CLASSPATH set to?

BTW, I got my JAVA 8 installed this way on the mac (OSX 10.15.7 Catalina):

brew tap homebrew/cask-versions
brew update
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk/openjdk/adoptopenjdk8

BTW,
$(/usr/libexec/java_home)
is a command to get the JAVA_HOME which is why you get what you get when you do:
echo $JAVA_HOME

Thanks. That was very helpful.

@shields Could you try pointing JAVA_HOME to Java 11 and run Neo4j from the terminal?
According to the docs, Neo4j 3.5 should run fine with Java 11, so I wonder if the issue you're seeing is actually related to the different Java version.

Java 11 is supported as a runtime platform, but any custom provided code should remain Java 8 compatible.

There is no official way to make Desktop use the Java version available in your system. However, if after starting Desktop, you delete the symlinks in the path below, Desktop will fallback to whatever Java version you have available in your system. This trick will work only until you restart Desktop though, as the symlinks will be re-created during startup.

$HOME/Library/Caches/com.Neo4j.Relate/runtime/

No dice, unfortunately. This is how it starts still, from terminal and Java 11

2020-12-04 08:41:00.138+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.
2020-12-04 08:41:00.147+0000 INFO  ======== Neo4j 3.5.17 ========
2020-12-04 08:41:00.152+0000 INFO  Starting...
2020-12-04 08:41:05.939+0000 INFO  Initiating metrics...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.collections.impl.utility.ArrayListIterate (file:/Users/username/Library/Application%20Support/com.Neo4j.Relate/Data/dbmss/dbms-id/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

I will give that symlink trick a try. If it works, it'll at least let us use Desktop for the Bloom instance and stuff temporarily...

@nglgzz Just wanted to follow up on this, in case there were any other alternatives

Hey @shields, sorry for the late reply.

If it doesn't start from the terminal with Java 11, I would try posting in the server section https://community.neo4j.com/c/neo4j-graph-platform/server/96 and hopefully someone more knowledgeable about the DBMS will be able to help.

My guess is that there is some issue either with the plugins or the configuration, but I wouldn't know what exactly to check.

Thread continued at the below post, for record keeping:

https://community.neo4j.com/t/incompatible-jvm-for-3-5-and-desktop-cont/30518