Custom page compile error

1
0
-1

I'm trying to update a custom page for the new BS version, but I have an issue during the compile with the plugin gmaven-plugin

here the log fragment,

[[1;34mINFO[m] [1m--- [0;32mgmaven-plugin:1.0:execute[m [1m(default)[m @ [36mbonita-log[0;1m ---[m

[[1;34mINFO[m] [1m------------------------------------------------------------------------[m

[[1;34mINFO[m] [1;31mBUILD FAILURE[m

[[1;34mINFO[m] [1m------------------------------------------------------------------------[m

[[1;34mINFO[m] Total time: 18.112 s

[[1;34mINFO[m] Finished at: 2023-02-24T01:54:05-06:00

[[1;34mINFO[m] [1m------------------------------------------------------------------------[m

[[1;31mERROR[m] Failed to execute goal [32morg.codehaus.groovy.maven:gmaven-plugin:1.0:execute[m [1m(default)[m on project [36mbonita-log[m: [1;31mjava.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(char[],int,int,java.lang.Void) accessible: module java.base does not "opens java.lang" to unnamed module @20e9c165[m -> [1m[Help 1][m

[[1;31mERROR[m]

[[1;31mERROR[m] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.

Can any one know how can i fix it?

1 answer

1
0
-1
This one is the BEST answer!

Hi,

Check that your buildchain is using Java 11 and not Java 17 as it seems to be.

adding those properties in the project pom should do the trick:

<properties>
     <maven.compiler.source>11</maven.compiler.source>
     <maven.compiler.target>11</maven.compiler.target>
      ...
</properties>

While it should work even using a Java 17 JDK, I recommend using a Java 11 JDK to avoid any bad surprises at runtime.

Also, check that you are using Groovy 3.0.x as a provided dependencies. You can inspire yourself from the generated pom when creating a rest api extension in groovy from a Studio or the maven archetype.

HTH
Romain

Notifications