Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.InvalidObjectException: null array #239

Open
LelouBil opened this issue Aug 27, 2024 · 2 comments
Open

java.io.InvalidObjectException: null array #239

LelouBil opened this issue Aug 27, 2024 · 2 comments

Comments

@LelouBil
Copy link

LelouBil commented Aug 27, 2024

Hello, When using NeoGradle userdev with the gradle kotlin DSL I am encoutering this error when running the "runClient" task

Could not load the value of field `provider` of `org.gradle.configurationcache.serialization.codecs.ProviderBackedFileCollectionSpec` bean found in field `classpath` of `org.gradle.process.internal.DefaultJavaExecSpec` bean found in field `javaExecSpec` of task `:runClient` of type `org.gradle.api.tasks.JavaExec`. 
> null array
Stacktrace
FAILURE: Build failed with an exception.

* What went wrong:
Could not load the value of field `provider` of `org.gradle.configurationcache.serialization.codecs.ProviderBackedFileCollectionSpec` bean found in field `classpath` of `org.gradle.process.internal.DefaultJavaExecSpec` bean found in field `javaExecSpec` of task `:runClient` of type `org.gradle.api.tasks.JavaExec`.
> null array

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

* Exception is:
org.gradle.api.GradleException: Could not load the value of field `provider` of `org.gradle.configurationcache.serialization.codecs.ProviderBackedFileCollectionSpec` bean found in field `classpath` of `org.gradle.process.internal.DefaultJavaExecSpec` bean found in field `javaExecSpec` of task `:runClient` of type `org.gradle.api.tasks.JavaExec`.
	at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:114)
	at org.gradle.configurationcache.serialization.beans.BeanPropertyReader.readStateOf(BeanPropertyReader.kt:69)
	at org.gradle.configurationcache.serialization.codecs.BeanCodec.readBeanOf(BeanCodec.kt:72)
	at org.gradle.configurationcache.serialization.codecs.BeanCodec.decode(BeanCodec.kt:47)
	at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1$decodeLoop$1.invokeSuspend(Combinators.kt:166)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
	at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1.decodeLoop(Combinators.kt:167)
	at org.gradle.configurationcache.serialization.CombinatorsKt$reentrant$1.decode(Combinators.kt:131)
	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:69)
	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:366)
	at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:107)
	at org.gradle.configurationcache.serialization.beans.BeanPropertyReader.readStateOf(BeanPropertyReader.kt:69)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec$readTask$2.invokeSuspend(TaskNodeCodec.kt:134)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec$readTask$2.invoke(TaskNodeCodec.kt)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec$readTask$2.invoke(TaskNodeCodec.kt)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodecKt.withTaskOf(TaskNodeCodec.kt:236)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodecKt.access$withTaskOf(TaskNodeCodec.kt:1)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.readTask(TaskNodeCodec.kt:128)
	at org.gradle.configurationcache.serialization.codecs.TaskNodeCodec.decode(TaskNodeCodec.kt:77)
	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:69)
	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:366)
	at org.gradle.configurationcache.serialization.CodecKt.readNonNull(Codec.kt:96)
	at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readNode(WorkNodeCodec.kt:126)
	at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.doRead(WorkNodeCodec.kt:104)
	at org.gradle.configurationcache.serialization.codecs.WorkNodeCodec.readWork(WorkNodeCodec.kt:62)
	at org.gradle.configurationcache.ConfigurationCacheState.readWorkGraph(ConfigurationCacheState.kt:496)
	at org.gradle.configurationcache.ConfigurationCacheState.readBuildContent$configuration_cache(ConfigurationCacheState.kt:477)
	at org.gradle.configurationcache.ConfigurationCacheState.readBuildState(ConfigurationCacheState.kt:329)
	at org.gradle.configurationcache.ConfigurationCacheState.readBuildsInTree(ConfigurationCacheState.kt:291)
	at org.gradle.configurationcache.ConfigurationCacheState.readRootBuild(ConfigurationCacheState.kt:264)
	at org.gradle.configurationcache.ConfigurationCacheState.readRootBuildState(ConfigurationCacheState.kt:165)
	at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invokeSuspend(ConfigurationCacheIO.kt:167)
	at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invoke(ConfigurationCacheIO.kt)
	at org.gradle.configurationcache.ConfigurationCacheIO$readRootBuildStateFrom$1.invoke(ConfigurationCacheIO.kt)
	at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$2.invokeSuspend(ConfigurationCacheIO.kt:196)
	at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$2.invoke(ConfigurationCacheIO.kt)
	at org.gradle.configurationcache.ConfigurationCacheIO$readConfigurationCacheState$2.invoke(ConfigurationCacheIO.kt)
	at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$1$1$1$1.invokeSuspend(ConfigurationCacheIO.kt:278)
	at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$1$1$1$1.invoke(ConfigurationCacheIO.kt)
	at org.gradle.configurationcache.ConfigurationCacheIO$withReadContextFor$1$1$1$1.invoke(ConfigurationCacheIO.kt)
	at org.gradle.configurationcache.serialization.RunningKt$runReadOperation$2.invokeSuspend(Running.kt:34)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
	at org.gradle.configurationcache.serialization.RunningKt.runToCompletion(Running.kt:56)
	at org.gradle.configurationcache.serialization.RunningKt.runReadOperation(Running.kt:33)
	at org.gradle.configurationcache.ConfigurationCacheIO.withReadContextFor$configuration_cache(ConfigurationCacheIO.kt:277)
	at org.gradle.configurationcache.ConfigurationCacheIO.readConfigurationCacheState(ConfigurationCacheIO.kt:194)
	at org.gradle.configurationcache.ConfigurationCacheIO.readRootBuildStateFrom$configuration_cache(ConfigurationCacheIO.kt:165)
	at org.gradle.configurationcache.DefaultConfigurationCache$loadWorkGraph$1.invoke(DefaultConfigurationCache.kt:414)
	at org.gradle.configurationcache.DefaultConfigurationCache$loadWorkGraph$1.invoke(DefaultConfigurationCache.kt:413)
	at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$1.invoke(ConfigurationCacheRepository.kt:173)
	at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$1.invoke(ConfigurationCacheRepository.kt:173)
	at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$2.invoke(ConfigurationCacheRepository.kt:178)
	at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl$useForStateLoad$2.invoke(ConfigurationCacheRepository.kt:177)
	at org.gradle.configurationcache.ConfigurationCacheRepository$withExclusiveAccessToCache$1.create(ConfigurationCacheRepository.kt:255)
	at org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess.withFileLock(LockOnDemandCrossProcessCacheAccess.java:90)
	at org.gradle.cache.internal.DefaultCacheCoordinator.withFileLock(DefaultCacheCoordinator.java:219)
	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.withFileLock(DefaultPersistentDirectoryStore.java:165)
	at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.withFileLock(DefaultCacheFactory.java:207)
	at org.gradle.configurationcache.ConfigurationCacheRepository.withExclusiveAccessToCache(ConfigurationCacheRepository.kt:253)
	at org.gradle.configurationcache.ConfigurationCacheRepository.access$withExclusiveAccessToCache(ConfigurationCacheRepository.kt:49)
	at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl.useForStateLoad(ConfigurationCacheRepository.kt:177)
	at org.gradle.configurationcache.ConfigurationCacheRepository$StoreImpl.useForStateLoad(ConfigurationCacheRepository.kt:173)
	at org.gradle.configurationcache.DefaultConfigurationCache$loadFromCache$result$1.invoke(DefaultConfigurationCache.kt:428)
	at org.gradle.configurationcache.DefaultConfigurationCache$loadFromCache$result$1.invoke(DefaultConfigurationCache.kt:427)
	at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt$withLoadOperation$1.call(ConfigurationCacheBuildOperations.kt:38)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.configurationcache.ConfigurationCacheBuildOperationsKt.withLoadOperation(ConfigurationCacheBuildOperations.kt:31)
	at org.gradle.configurationcache.DefaultConfigurationCache.loadFromCache(DefaultConfigurationCache.kt:427)
	at org.gradle.configurationcache.DefaultConfigurationCache.loadWorkGraph(DefaultConfigurationCache.kt:413)
	at org.gradle.configurationcache.DefaultConfigurationCache.loadRequestedTasks(DefaultConfigurationCache.kt:165)
	at org.gradle.configurationcache.ConfigurationCacheAwareBuildTreeWorkController$scheduleAndRunRequestedTasks$3.apply(ConfigurationCacheAwareBuildTreeWorkController.kt:69)
	at org.gradle.configurationcache.ConfigurationCacheAwareBuildTreeWorkController$scheduleAndRunRequestedTasks$3.apply(ConfigurationCacheAwareBuildTreeWorkController.kt:68)
	at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewWorkGraph(DefaultIncludedBuildTaskGraph.java:112)
	at org.gradle.configurationcache.ConfigurationCacheAwareBuildTreeWorkController.scheduleAndRunRequestedTasks(ConfigurationCacheAwareBuildTreeWorkController.kt:68)
	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$scheduleAndRunTasks$1(DefaultBuildTreeLifecycleController.java:77)
	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:120)
	at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:169)
	at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
	at org.gradle.internal.model.StateTransitionController.lambda$transition$7(StateTransitionController.java:169)
	at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
	at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:169)
	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:117)
	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:77)
	at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.scheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:72)
	at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:53)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
	at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
	at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:140)
	at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
	at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:123)
	at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
	at org.gradle.internal.buildtree.InitDeprecationLoggingActionExecutor.execute(InitDeprecationLoggingActionExecutor.java:66)
	at org.gradle.internal.buildtree.InitProblems.execute(InitProblems.java:36)
	at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
	at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:71)
	at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:60)
	at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:71)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
	at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:264)
	at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:128)
	at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
	at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
	at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:92)
	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:80)
	at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:71)
	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
	at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:51)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:39)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.lambda$execute$0(ForwardClientInput.java:39)
	at org.gradle.launcher.daemon.server.clientinput.ClientInputForwarder.forwardInput(ClientInputForwarder.java:88)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:36)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:64)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
	at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: java.io.InvalidObjectException: null array
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at org.gradle.configurationcache.serialization.codecs.jos.JavaObjectSerializationCodec.readResolve(JavaObjectSerializationCodec.kt:195)
	at org.gradle.configurationcache.serialization.codecs.jos.JavaObjectSerializationCodec.decode(JavaObjectSerializationCodec.kt:110)
	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:69)
	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:366)
	at org.gradle.configurationcache.serialization.codecs.FixedValueReplacingProviderCodec.decodeValue(ProviderCodecs.kt:136)
	at org.gradle.configurationcache.serialization.codecs.FixedValueReplacingProviderCodec.decodeProvider(ProviderCodecs.kt:130)
	at org.gradle.configurationcache.serialization.codecs.ProviderCodec.decode(ProviderCodecs.kt:225)
	at org.gradle.configurationcache.serialization.codecs.BindingsBackedCodec.decode(BindingsBackedCodec.kt:69)
	at org.gradle.configurationcache.serialization.DefaultReadContext.read(Contexts.kt:366)
	at org.gradle.configurationcache.serialization.beans.BeanPropertyReaderKt.readPropertyValue(BeanPropertyReader.kt:107)
	... 159 more


Here is my build.gradle.kts file :

build.gradle.kts ```kotlin

plugins {
java-library
eclipse
idea
maven-publish
id("net.neoforged.gradle.userdev") version "7.0.161"
id("org.jetbrains.kotlin.jvm") version "2.0.0"
}

version = project.property("mod_version") as String
group = project.property("mod_group_id") as String

repositories {
mavenLocal()
maven {
name = "Kotlin for Forge"
url = uri("https://thedarkcolour.github.io/KotlinForForge/")
content {
includeGroup("thedarkcolour")
}
}
mavenCentral()
}

base {
archivesName.set(project.property("mod_id") as String)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

kotlin {
jvmToolchain(21)
}

subsystems {
parchment {
mappingsVersion.set(project.property("parchment_mappings_version") as String)
minecraftVersion.set(project.property("parchment_minecraft_version") as String)
}
}

runs {
create("client") {
systemProperty("neoforge.enabledGameTestNamespaces", project.property("mod_id") as String)
}

create("server") {
    programArgument("--nogui")
    systemProperty("neoforge.enabledGameTestNamespaces", project.property("mod_id") as String)
}

create("gameTestServer") {
    systemProperty("neoforge.enabledGameTestNamespaces", project.property("mod_id") as String)
}

create("data") {
    programArguments.addAll(
        "--mod", project.property("mod_id") as String,
        "--all",
        "--output", file("src/generated/resources/").absolutePath,
        "--existing", file("src/main/resources/").absolutePath
    )
}

configureEach {
    systemProperty("forge.logging.markers", "REGISTRIES")

// logLevel = org.slf4j.event.Level.DEBUG

}

}

sourceSets {
main {
resources {
srcDir("src/generated/resources")
}
}
}

dependencies {
implementation("thedarkcolour:kotlinforforge-neoforge:5.3.0")
implementation("org.reflections:reflections:0.10.2")
implementation("net.neoforged:neoforge:${project.property("neo_version")}")
}

tasks.withType {
val replaceProperties = mapOf(
"minecraft_version" to project.property("minecraft_version"),
"minecraft_version_range" to project.property("minecraft_version_range"),
"neo_version" to project.property("neo_version"),
"neo_version_range" to project.property("neo_version_range"),
"loader_version_range" to project.property("loader_version_range"),
"mod_id" to project.property("mod_id"),
"mod_name" to project.property("mod_name"),
"mod_license" to project.property("mod_license"),
"mod_version" to project.property("mod_version"),
"mod_authors" to project.property("mod_authors"),
"mod_description" to project.property("mod_description")
)
inputs.properties(replaceProperties)

filesMatching("META-INF/neoforge.mods.toml") {
    expand(replaceProperties)
}

}

publishing {
publications {
create("mavenJava") {
from(components["java"])
}
}
repositories {
maven {
url = uri("file://${project.projectDir}/repo")
}
}
}

idea {
module {
isDownloadSources = true
isDownloadJavadoc = true
}
}

</details>
@LelouBil LelouBil changed the title Error using kotlin DSL java.io.InvalidObjectException: null array Aug 27, 2024
@LelouBil
Copy link
Author

This error was caused by the configuration cache, disabling it with org.gradle.configuration-cache=false fixed the issue.
It happens because the configuration cache doesn't work with some lists used by Gradle, as it is still a work in progress.

@LelouBil
Copy link
Author

Reopening in case it is caused by NeoGradle, someone needs to check.

@LelouBil LelouBil reopened this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant