I'm getting below exception while running basic groovy script from console after installation. For installation I have used the installer:
Java version: jdk-9.0.1 , jre-9.0.1
Exception thrown
java.lang.NoClassDefFoundError: Unable to load class groovy.xml.jaxb.JaxbGroovyMethods due to missing dependency javax/xml/bind/Marshaller
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Java 9 doesn't package the 'javax.xml' by default. Add --add-modules java.xml.bind to your command line argument when running.
See How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With