[GRADLE-2290] java.lang.ExceptionInInitializerError when running tests on IBM JDK Created: 10/May/12  Updated: 04/Jan/13  Resolved: 06/Dec/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-rc-3
Fix Version/s: 1.0-rc-1

Type: Bug
Reporter: Peter Niederwieser Assignee: Szczepan Faber
Resolution: Fixed Votes: 3


 Description   

When running the build from the multi-project build chapter of the Gradle workshop, the `:shared:test` task failed with the following exception:

Got throwable in Signal initialisation : java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
	at sun.misc.Signal.<init>(Signal.java:141)
	at java.lang.Terminator.setup(Terminator.java:51)
	at java.lang.System.completeInitialization(System.java:114)
	at java.lang.Thread.<init>(Thread.java:127)
Caused by: java.lang.RuntimeException: Could not initialise system classpath.
	at org.gradle.process.internal.child.BootstrapSecurityManager.checkPermission(BootstrapSecurityManager.java:77)
	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1297)
	at java.lang.System.getProperty(System.java:382)
	at java.lang.System.getProperty(System.java:366)
	at com.ibm.misc.SignalInfo.<clinit>(SignalInfo.java:26)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
	... 4 more
Caused by: java.io.UTFDataFormatException: malformed input around byte 132
	at java.io.DataInputStream.readUTF(DataInputStream.java:650)
	at java.io.DataInputStream.readUTF(DataInputStream.java:558)
	at org.gradle.process.internal.child.BootstrapSecurityManager.checkPermission(BootstrapSecurityManager.java:67)
	... 10 more
Ausnahmebedingung in Thread "main"# START NON-TRANSLATABLEjava/lang/RuntimeException: java.lang.ExceptionInInitializerError
	in sun/misc/Signal.<init> (Signal.java:145)
	in java/lang/Terminator.setup (Terminator.java:51)
	in java/lang/System.completeInitialization (System.java:114)
	in java/lang/Thread.<init> (Thread.java:127)
JVMJ9VM015W Initialisierungsfehler f?r Bibliothek jclscar_24(14): JVMJ9VM009E J9VMDllMain ist fehlgeschlagen.
Could not create the Java virtual machine.
Could not write process standard input.
java.io.IOException: The pipe has been ended.
	at java.io.FileOutputStream.write(FileOutputStream.java:277)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:76)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:134)
	at org.gradle.process.internal.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:51)
	at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
	at java.lang.Thread.run(Thread.java:736)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:test'.
> Gradle Worker 1 finished with (non-zero) exit value 1.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':shared:test'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:68)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
	at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)
	at org.gradle.cache.internal.DefaultCacheAccess$2.create(DefaultCacheAccess.java:200)
	at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:172)
	at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198)
	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:111)
	at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
	at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter.execute(CacheLockHandlingTaskExecuter.java:32)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
	at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:247)
	at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192)
	at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:177)
	at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:83)
	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:36)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
	at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
	at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
	at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
	at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111)
	at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
	at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109)
	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:103)
	at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
	at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
	at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
	at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
	at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)
	at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
	at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:31)
	at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:20)
	at org.gradle.launcher.Main.doAction(Main.java:48)
	at org.gradle.launcher.exec.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.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
	at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: org.gradle.process.internal.ExecException: Gradle Worker 1 finished with (non-zero) exit value 1.
	at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:339)
	at org.gradle.process.internal.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:78)
	at org.gradle.process.internal.DefaultWorkerProcess.access$000(DefaultWorkerProcess.java:31)
	at org.gradle.process.internal.DefaultWorkerProcess$1.executionFinished(DefaultWorkerProcess.java:51)
	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.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:85)
	at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:32)
	at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
	at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
	at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
	at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
	at java.lang.Thread.run(Thread.java:736)

I'm not sure if this is related to a security manager configuration (since it shows up in the stack trace). Running without daemon and clean did not help.



 Comments   
Comment by Szczepan Faber [ 25/May/12 ]

FYI - this is one of the manifestations of the ibm vm+windows issue that I'm working on at the moment.

Generated at Wed Jun 30 12:17:56 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.