Hi Dennis,

I most likely introduced this with my fix for CXF-7922 - in that fix, I
made some changes to internal JDK classes in ClientProxyImpl's
invokeDefaultMethod method.  The MP Rest Client (as well as the CXF proxy
client) should be able to invoke default methods, and there doesn't seem to
be a good way of doing that... Romain wrote a blog post on the subject
here:
https://rmannibucau.wordpress.com/2014/03/27/java-8-default-interface-methods-and-jdk-dynamic-proxies/
- this was the idea behind that change, but I would bet that it is not
allowed with JPMS enabled - and is most likely causing the failure.

It sounds like I need to find a better way to invoke default interface
methods without using JDK internals.  If anyone knows of a better way or
has any hints, please let me know.  In the meantime, I could add something
like "assume Java 8" to skip the test in Java 9+ environments.  What do you
think?

Thanks,

Andy

On Thu, Dec 20, 2018 at 2:33 PM Dennis Kieselhorst <[email protected]> wrote:

> Hi,
>
> only CxfTypeSafeClientBuilderTest is missing to have a stable build from
> JDK 9 - 11.
>
> java.lang.reflect.UndeclaredThrowableException
>         at
> org.apache.cxf.microprofile.client.CxfTypeSafeClientBuilderTest.testCanInvokeDefaultInterfaceMethods(CxfTypeSafeClientBuilderTest.java:173)
> Caused by: java.lang.IllegalAccessException: access to public member
> failed:
> org.apache.cxf.microprofile.client.mock.MyClient.myDefaultMethod[Ljava.lang.Object;@10cf09e8/invokeSpecial,
> from org.apache.cxf.microprofile.client.mock.MyClient/2 (unnamed module
> @14dd9eb7)
>         at
> org.apache.cxf.microprofile.client.CxfTypeSafeClientBuilderTest.testCanInvokeDefaultInterfaceMethods(CxfTypeSafeClientBuilderTest.java:173)
>
> Anyone seen something similar before?
>
> Cheers
> Dennis
>

Reply via email to