Hi Alan/Rory, On 05/01/15 12:16, Alan Bateman wrote: >> . . . > If it's the JDK image then this should work as it's the equivalent of > pre jdk9-b41 with tools.jar on the class path. So I think you will have > to dig into, my only guess at this point is that TestNG is somehow > delegating to the extension class loader rather than the > system/application class loader.
I have debugged this and the problem is indeed to do with faulty delegation - on the part of maven [naturlich :-]. Details are provided below. In summary, the problem can be fixed by configuring maven to stop dorking around with class loading. I'll be posting a new Byteman micro-release in the next week which can build and run correctly with all of JDK6/7/8/9. I'll announce details on this list when it is ready. regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Matt Parson (USA), Charlie Peters (USA), Michael O'Neill (Ireland) ----- 8< -------- 8< -------- 8< -------- 8< -------- 8< -------- 8< --- The maven surefire plugin provides a boolean configuration property (childDelegation=true/false) which controls the behaviour of its loader implementation, class IsolatedClassLoader. The property configures loading to proceed either by normal parent delegation (childDelegation=true [sic]) or by means of a URL loader which first tries to use the bootstrap loader and then does a file lookup over each path element of the classpath (childDelegation=false). [Yes, I know the property name is bizarrely counter-intuitive but then this is maven %-]. Of course, being maven, it also defaults this configuration switch to false . . . which means that parent delegation as expected by the JDK9 module setup is bypassed. This rather dirty maven trick works ok for Byteman using JDK 6, 7 and 8 because with those versions the pom finagles tools.jar into the classpath as a runtime dependency. Of course, with 9 I had to disable that dependency so parent delegation is the only way to get the missing classes. If the pom configures tests to be run with childDelegation=true then things still work ok.