Unexpected internal initialization error running Gradle version 1.1 on Linux RHEL 5.6 ppc64

Upgrading to gradle 1.1 from gradle-1.0-milestone-8a fixed initialization problem on HPUX, but now Linux RHEL 5.6 ppc64 won’t initialize. Success on 8 other UNIX platforms, so I think my upgrade is good. Doesn’t get far enough to create the .gradle directory. Could this be a bug, or is it a Java version issue? I’m running Java version 1.6.0. More details below.

Thanks,

— Tom C.

$ ./gradlew tasks -d 13:47:14.707 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@d190d19, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@69306930, org.gradle.logging.internal.JavaUtilLoggingConfigurer@74497449] 13:47:14.731 [DEBUG] [org.gradle.internal.nativeplatform.filesystem.FileSystemServices] Unable to load LibC library. Continuing with fallback filesystem implementations. 13:47:14.735 [DEBUG] [org.gradle.internal.nativeplatform.filesystem.FileSystemServices] Using FallbackSymlink implementation. 13:47:14.755 [ERROR] [org.gradle.BuildExceptionReporter]

13:47:14.756 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build aborted because of an internal error. 13:47:14.757 [ERROR] [org.gradle.BuildExceptionReporter]

13:47:14.758 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 13:47:14.762 [ERROR] [org.gradle.BuildExceptionReporter] Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.

$ ./gradlew tasks -S

FAILURE: Build aborted because of an internal error.

  • What went wrong: Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.

  • Try: Run with --debug option to get additional debug info.

  • Exception is: java.lang.ExceptionInInitializerError

at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)

at org.gradle.internal.nativeplatform.filesystem.FileSystems$DefaultFileSystem.(FileSystems.java:29)

at java.lang.J9VMInternals.initializeImpl(Native Method)

at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)

at org.gradle.internal.nativeplatform.filesystem.FileSystems.getDefault(FileSystems.java:22)

at org.gradle.initialization.DefaultCommandLineConverter.convert(DefaultCommandLineConverter.java:94)

at org.gradle.initialization.DefaultCommandLineConverter.convert(DefaultCommandLineConverter.java:35)

at org.gradle.launcher.cli.BuildActionsFactory.createAction(BuildActionsFactory.java:74)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.createAction(CommandLineActionFactory.java:205)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:195)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)

at org.gradle.launcher.Main.doAction(Main.java:48)

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)

at org.gradle.launcher.Main.main(Main.java:39)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

at java.lang.reflect.Method.invoke(Method.java:611)

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)

at org.gradle.launcher.GradleMain.main(GradleMain.java:26)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)

at java.lang.reflect.Method.invoke(Method.java:611)

at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:47) Caused by: java.lang.ClassCastException: org.jruby.ext.posix.JavaPOSIX incompatible with org.jruby.ext.posix.BaseNativePOSIX

at org.gradle.internal.nativeplatform.filesystem.FileSystemServices.addServices(FileSystemServices.java:64)

at org.gradle.internal.nativeplatform.filesystem.FileSystemServices.(FileSystemServices.java:38)

at java.lang.J9VMInternals.initializeImpl(Native Method)

at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)

… 31 more

$ java -version java version “1.6.0” Java™ SE Runtime Environment (build pxp6460sr9-20101125_01(SR9)) IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux ppc64-64 jvmxp6460sr9-20101124_69295 (JIT enabled, AOT enabled) J9VM - 20101124_069295 JIT - r9_20101028_17488ifx2 GC

  • 20101027_AA) JCL - 20101119_01

Hey Tom, this seems to be a bug. Can you do me a favour and test the output of the following java code:

System.out.println(System.getProperty("os.name"))

The thirdparty posix library expects the os.name systemproperty to start with linux and have the libc lib “libc.so.6” available on your machine.

thanks, René

as a workaround you can try to start gradle with commandline option -Dos.name=linux-RH or something similar.

I tried this, but no luck. Any other ideas? Thanks in advance.

-Dos.name=Linux -Dos.arch=ppc64 -Dos.version=2.6.18-238.5.1.el5

I’ve added GRADLE-2416 for this. This has now been fixed. Could you try a recent nightly build and let us know how whether it works for you: http://gradle.org/nightly

Thank you. I successfully tested this fix on Linux ppc64 with gradle build version 1.2-20120805220009+0000.