Hi Tibor,

(If it helps) I guess detecting you run on java 9 you can add some
--add-opens on the CLI as a workaround. Otherwise a double compilation can
be needed or just provide a jar with these classes in the classloader which
will override the JVM ones - this is how it should work for the deprecated
jaxb typically for instance.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-05-06 9:24 GMT+02:00 Tibor Digana <tibordig...@apache.org>:

> Hi,
>
> @Robert I created branch [1] and added Java 9 method call
> *findClass(module,
> cls)* to our *ClassLoader*, see the diff [2] and there is my playground for
> my debugging purposes.
>
> After debugging this code does not load *javax.xml.ws.Holder*.
> This method is protected and if you call *setAccessible(true) *the JVM
> throws exception because this method cannot be called in *java.lang* or
> *java.base* module.
>
> I guess this class loader must be compiled in java 9 and the protected
> method extended and then maybe the module *"java.se.ee <http://java.se.ee
> >"*
> would be loaded.
>
> Do you have any idea to solve this problem and load *javax.xml.ws.Holder*
> properly?
>
> [1]
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.
> git;a=shortlog;h=refs/heads/SUREFIRE-1265_2
>
> [2]
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.
> git;a=commitdiff;h=bce51369e3563ed95c91346cd89c80bac7716c10
>
> Cheers
> Tibor
>

Reply via email to