hello I have asked this question on stackoverflow as i thought i might just need to add some other dependency. however some user mentioned to also ask the groovy developers if this could be a potential bug.
https://stackoverflow.com/questions/50540710/groovy-2-5-java-10-and-sparkjava I try to run this groovy script (which runs fine on java 8) on a server which ahs java 10 installed an always get a dependency missing error reported. Thx Christian @Grapes([ @Grab(group='org.slf4j', module='slf4j-api', version='1.7.25'), @Grab(group='ch.qos.logback', module='logback-classic', version='1.2.3'), @Grab(group='org.apache.commons', module='commons-lang3', version='3.7'), @Grab(group='com.sparkjava', module='spark-core', version='2.7.2'), @Grab(group='javax.xml.bind', module='jaxb-api', version='2.3.0'), @Grab(group='com.sun.xml.bind', module='jaxb-core', version='2.3.0'), @Grab(group='com.sun.xml.bind', module='jaxb-impl', version='2.3.0')])import groovy.json.JsonOutputimport groovy.json.JsonSlurperimport groovy.util.logging.Slf4jimport org.apache.commons.lang3.exception.ExceptionUtilsimport spark.Routeimport static spark.Spark.* @Slf4jclass Server { public static void main(String[] args) { int serverPort = args.length > 0 ? args[0].toInteger() : 1001 log.info("start server at $serverPort ... ") port(serverPort) get("/hello", { req, rep -> "world" }) }} WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/opt/groovy-2.5.0-rc-3/lib/groovy-2.5.0-rc-3.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int) WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future releaseCaught: java.lang.NoClassDefFoundError: Unable to load class groovy.xml.jaxb.JaxbGroovyMethods due to missing dependency javax/xml/bind/JAXBContext java.lang.NoClassDefFoundError: Unable to load class groovy.xml.jaxb.JaxbGroovyMethods due to missing dependency javax/xml/bind/JAXBContext 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)