Nextflow: Add support for Java 12

Created on 20 Mar 2019  Â·  7Comments  Â·  Source: nextflow-io/nextflow

When I try to install Nextflow with:

wget -qO- https://get.nextflow.io | bash

I get the following error:

ERROR: Cannot find Java or it's a wrong version -- please make sure that Java 8 is installed
NOTE: Nextflow is trying to use the Java VM defined by the following environment variables:
 JAVA_CMD: /Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/bin/java
 JAVA_HOME:

But when I check my Java version:

java --version

I see my java version is above 8:

openjdk 12 2019-03-19
OpenJDK Runtime Environment (build 12+33)
OpenJDK 64-Bit Server VM (build 12+33, mixed mode, sharing)
prlow

Most helpful comment

Just because I stumbled across it today: https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11

tl;dr: Not compatible (yet), Ignite >2.8 will have support for Java 11 and (likely) work with Java 12 as the 11->12 upgrade path didn't really change a lot compared to e.g. 9->10->11.

All 7 comments

create a file ~/.bash_profile (if not already present) and add a line with export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/bin/java".

Then source .bash_profile, you can check with echo $JAVA_HOME if it was set correctly. Then it should work.

Nope, Java 12 is not supported so far.

On Wed, Mar 20, 2019, 09:55 Sven F. notifications@github.com wrote:

create a file ~/.bash_profile (if not already present) and add a line
with export
JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/bin/java"
.

Then source .bash_profile, you can check with echo $JAVA_HOME if it was
set correctly. Then it should work.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/nextflow-io/nextflow/issues/1082#issuecomment-474741472,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAx3SF3aDo23XpEAfvGh6HwdIANw4FxKks5vYfd8gaJpZM4b9WV9
.

oh, my bad

The following error is actually reported by the ignite component

java.lang.ExceptionInInitializerError: null
    at org.apache.ignite.internal.util.IgniteUtils.<clinit>(IgniteUtils.java:759)
    at org.apache.ignite.spi.IgniteSpiAdapter.<init>(IgniteSpiAdapter.java:119)
    at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.<init>(TcpDiscoverySpi.java:226)
    at nextflow.daemon.IgGridFactory.discoveryConfig(IgGridFactory.groovy:175)
    at nextflow.daemon.IgGridFactory.config(IgGridFactory.groovy:124)
    at nextflow.daemon.IgGridFactory.start(IgGridFactory.groovy:105)
    at nextflow.executor.IgConnector.initialize(IgConnector.groovy:83)
    at nextflow.executor.IgConnector.<init>(IgConnector.groovy:70)
    at nextflow.executor.IgConnector.memoizedMethodPriv$createTaskPollingMonitor(IgConnector.groovy:48)
    at nextflow.executor.IgConnector.access$0(IgConnector.groovy)
    at nextflow.executor.IgConnector$__clinit__closure2.doCall(IgConnector.groovy)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
    at groovy.lang.Closure.call(Closure.java:405)
    at org.codehaus.groovy.runtime.memoize.Memoize$MemoizeFunction$1.provide(Memoize.java:139)
    at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
    at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:123)
    at org.codehaus.groovy.runtime.memoize.Memoize$MemoizeFunction.call(Memoize.java:136)
    at groovy.lang.Closure.call(Closure.java:421)
    at nextflow.executor.IgConnector.create(IgConnector.groovy)
    at nextflow.executor.IgExecutor.init(IgExecutor.groovy:47)
    at nextflow.executor.IgExecutor$init.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119)
    at nextflow.processor.ProcessFactory.createProcessor(ProcessFactory.groovy:261)
    at nextflow.processor.ProcessFactory.createProcessor(ProcessFactory.groovy)
    at nextflow.processor.ProcessFactory$createProcessor$0.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135)
    at nextflow.script.BaseScript.process(BaseScript.groovy:146)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:156)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
    at _nf_script_7521e5c6.run(_nf_script_7521e5c6:20)
    at nextflow.script.ScriptRunner.run(ScriptRunner.groovy:382)
    at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:170)
    at nextflow.cli.CmdRun.run(CmdRun.groovy:245)
    at nextflow.cli.Launcher.run(Launcher.groovy:449)
    at nextflow.cli.Launcher.main(Launcher.groovy:626)
Caused by: java.lang.RuntimeException: jdk.internal.misc.JavaNioAccess class is unavailable.
    at org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1459)
    at org.apache.ignite.internal.util.GridUnsafe.<clinit>(GridUnsafe.java:118)
    ... 54 common frames omitted
Caused by: java.lang.ClassNotFoundException: jdk.internal.misc.SharedSecrets
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:332)

Just because I stumbled across it today: https://apacheignite.readme.io/docs/getting-started#section-running-ignite-with-java-9-10-11

tl;dr: Not compatible (yet), Ignite >2.8 will have support for Java 11 and (likely) work with Java 12 as the 11->12 upgrade path didn't really change a lot compared to e.g. 9->10->11.

It's not that I really needed Java 12 -- I just went with the default version in Homebrew. I went back to Java 8 and I could install Nextflow.

Thank you all for your help!

Fixed. Note however the Ignite executor still requires a version of Java prior 12.

Was this page helpful?
0 / 5 - 0 ratings