gradle-xjc-plugin icon indicating copy to clipboard operation
gradle-xjc-plugin copied to clipboard

Exception on setting docLocale

Open tanvi-zwei opened this issue 3 years ago • 2 comments

Dear all, Could you please help. When I set the docLocale I get an exception on running xjcGenerate:

A failure occurred while executing org.unbrokendome.gradle.plugins.xjc.work.xjc23.XjcGeneratorWorkAction Could not serialize unit of work. > java.lang.NullPointerException (no error message)

It happens both when I set in sourceSets.main as xjc.docLocale = Locale.US Or when I set it in gradle.properties as xjc.docLocale=en ( as it is in example) Without this setting files are generated perfectly. Please suggest. Thank you

tanvi-zwei avatar May 22 '21 16:05 tanvi-zwei

Same here.

xjc {
 docLocale.set(Locale.ENGLISH)
}

causes

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':api:xjcGenerate'.
> A failure occurred while executing org.unbrokendome.gradle.plugins.xjc.work.xjc23.XjcGeneratorWorkAction
   > Could not serialize unit of work.
      > Cannot invoke "org.gradle.internal.hash.HashCode.toByteArray()" because the return value of "org.gradle.internal.snapshot.impl.IsolatedSerializedValueSnapshot.getImplementationHash()" is null

OS: macOS 12.2.1 (Apple Silicon) Gradle Version: 7.3.3 Java Version: 17.0.2 (Azul Systems, Inc. 17.0.2+8-LTS) (aarch64)

robertoschwald avatar Mar 14 '22 09:03 robertoschwald

All the matters reported here should be addressed in PR https://github.com/unbroken-dome/gradle-xjc-plugin/pull/47 with commit https://github.com/unbroken-dome/gradle-xjc-plugin/pull/47/commits/a43ca2285d060c38f777d76efd76dc45aba1b6a5

dlmiles avatar Mar 25 '23 00:03 dlmiles