maven build is failing

434 views
Skip to first unread message

leor amikam

unread,
Oct 20, 2023, 11:44:29 AM10/20/23
to XStream User
building a war file went from vesion 1.8 to JDK21 and now getting this error:

at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

Caused by: java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties

    at com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit> (PropertiesConverter.java:46)

    at com.thoughtworks.xstream.XStream.setupConverters (XStream.java:647)

    at com.thoughtworks.xstream.XStream.<init> (XStream.java:445)

    at com.thoughtworks.xstream.XStream.<init> (XStream.java:385)

    at com.thoughtworks.xstream.XStream.<init> (XStream.java:342)

    at org.apache.maven.plugin.war.util.WebappStructureSerializer.<clinit> (WebappStructureSerializer.java:47)

    at org.apache.maven.plugin.war.AbstractWarMojo.<init> (AbstractWarMojo.java:316)

    at org.apache.maven.plugin.war.WarMojo.<init> (WarMojo.java:48)

    at o

 

Jörg Schaible

unread,
Oct 24, 2023, 1:20:19 PM10/24/23
to XStream User
On Friday, 20. October 2023, 17:44:29 CEST leor amikam wrote:
> building a war file went from vesion 1.8 to JDK21 and now getting this
> error:
>
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:348)
>
> *Caused by: java.lang.ExceptionInInitializerError: Cannot access defaults
> field of Properties*
>
> at
> com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>
> (PropertiesConverter.java:46)

[snip]

You will have to run Maven with the JVM option "--add-opens=java.base/
java.util=ALL-UNNAMED".

Regards,
Jörg


Reply all
Reply to author
Forward
0 new messages