UncheckedIOException: Could not add entry to cache taskArtifacts.bin


(Przemyslaw Pastuszka) #1

I have a task, which runs a set of junit tests and fails at the very end, during persistence of artifacts. It’s happening on both gradle 1.3 and 1.4.

Weird thing is, that aforementioned gradle task fails if and only if all junit tests pass. In case of any junit failure, gradle task finishes (with “There were failing tests”, which is expected) and junit report is generated.

Here’s the task:

task integration(type: Test) {
  testClassesDir = sourceSets.integration.output.classesDir
  classpath = sourceSets.integration.runtimeClasspath
  systemProperty "java.library.path", someLibDir
  doFirst {
    // db initialization
  }
}

Stacktrace:

org.gradle.api.UncheckedIOException: Could not add entry ':x:integration' to cache taskArtifacts.bin (/home/hadapt/.gradle/1.4/taskArtifacts/taskArtifacts.bin).
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.put(BTreePersistentIndexedCache.java:152)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache$2.run(MultiProcessSafePersistentIndexedCache.java:53)
 at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:165)
 at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:154)
 at org.gradle.cache.internal.DefaultCacheAccess$UnitOfWorkFileAccess.writeFile(DefaultCacheAccess.java:316)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache.put(MultiProcessSafePersistentIndexedCache.java:51)
 at sun.reflect.GeneratedMethodAccessor243.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.gradle.listener.LazyCreationProxy$LazyInvocationHandler.invoke(LazyCreationProxy.java:49)
 at $Proxy24.put(Unknown Source)
 at org.gradle.api.internal.changedetection.CacheBackedTaskHistoryRepository$1.update(CacheBackedTaskHistoryRepository.java:80)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.afterTask(DefaultTaskArtifactStateRepository.java:162)
 at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$ShortCircuitArtifactState.afterTask(ShortCircuitTaskArtifactStateRepository.java:89)
 at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepository$1.afterTask(FileCacheBroadcastTaskArtifactStateRepository.java:51)
 at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:57)
 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:275)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:52)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:38)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:30)
 at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:84)
 at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.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.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
 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:165)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
 at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
 at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
 at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:45)
 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:70)
 at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:68)
 at org.gradle.util.Swapper.swap(Swapper.java:38)
 at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:68)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:59)
 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
 at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
 at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
 at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
 at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:48)
 at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
 at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
 at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
 at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: build_60glkvk4idfgqdona8rqrchf07
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 at java.util.TreeMap.writeObject(TreeMap.java:2252)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 at java.util.HashMap.writeObject(HashMap.java:1001)
 at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 at java.util.ArrayList.writeObject(ArrayList.java:570)
 at sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
 at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 at org.gradle.messaging.serialize.DefaultSerializer.write(DefaultSerializer.java:51)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache$DataBlock.setValue(BTreePersistentIndexedCache.java:648)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache$DataBlock.<init>(BTreePersistentIndexedCache.java:642)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.put(BTreePersistentIndexedCache.java:146)

#2

This exception indicates that Gradle cannot persist the Task execution state when the Task successfully completes, because some element in the Task state is not Serializable.

The most likely culprit is one of the Task inputs, which for the ‘Test’ task includes ‘systemProperties’. I suspect that ‘someLibDir’ is an unserializable type, not a regular File object. Try switching the setting to:

systemProperty "java.library.path", someLibDir.absolutePath

(Przemyslaw Pastuszka) #3

You are right, someLibDir is to blame. It wasn’t File object, but a closure :slight_smile:

Thanks for help!


#4

Thanks for the report: I’ve raised this as GRADLE-2697.


(Matthew Rusinak) #5

I have a similar problem:

apply plugin: 'java'
  task test(type: Test, overwrite: true) {
    group "Verification"
    description "Executes the tests"
      testClassesDir = file("tests")
    scanForTestClasses = true
    ignoreFailures = true
    classpath = files { file("lib").listFiles() }.plus( files{ testClassesDir } )
    // Pass along project properties as System properties for the tests
    systemProperties = project.properties
    useJUnit()
}

Basically, this project is just a set of JUnit tests, and gradle is used as a convenient runner & reporter for them.

However, after executing I get this:

org.gradle.api.UncheckedIOException: Could not add entry ':test' to cache taskArtifacts.bin (C:/jenkins/workspace/bvt/.gradle.7/taskArtifacts/taskArtifacts.bin).
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.put(BTreePersistentIndexedCache.java:152)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache$2.run(MultiProcessSafePersistentIndexedCache.java:53)
 at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:199)
 at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:188)
 at org.gradle.cache.internal.DefaultCacheAccess$UnitOfWorkFileAccess.writeFile(DefaultCacheAccess.java:365)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache.put(MultiProcessSafePersistentIndexedCache.java:51)
 at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at org.gradle.listener.LazyCreationProxy$LazyInvocationHandler.invoke(LazyCreationProxy.java:49)
 at com.sun.proxy.$Proxy20.put(Unknown Source)
 at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1$1.run(CacheBackedTaskHistoryRepository.java:79)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:143)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:131)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
 at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:74)
 at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$1.update(CacheBackedTaskHistoryRepository.java:62)
 at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.afterTask(DefaultTaskArtifactStateRepository.java:118)
 at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
 at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
 at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
 at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
 at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
 at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
 at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:286)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:80)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTaskWithCacheLock(AbstractTaskPlanExecutor.java:58)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:47)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:214)
 at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:276)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
 at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:78)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
 at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89)
 at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.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:166)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
 at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
 at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
 at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
 at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
 at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
 at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
 at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
 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.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:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 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)
Caused by: java.io.NotSerializableException: org.gradle.api.internal.project.DefaultProject_Decorated

I’m not sure what would be causing the issue in this case. This is under Gradle 1.7.


(Matthew Rusinak) #6

Since there’s been no activity, just updating with my final workaround: I changed the systemProperties to grab only String-type values from the project:

systemProperties = project.properties.findAll{ it.value instanceof String }

You could subsitite ‘Serializable’ to grab as much as you could, or add a convention for key names, etc. Not sure what the actual property causing the problem was but this works to grab all properties passed in over the command line.