Unexpected ClassnotFoundException on reflective Class#getMethod

Dawid Weiss dawid.weiss at gmail.com
Thu Apr 7 09:40:33 UTC 2016


> thank you for the detailed response! I am reassured that there is a
> reasonable technical solution, yet this seems like quite a burden for
> end users of JavaSE embedding any of these popular libraries.

I just hit the same issue with JBoss RestEasy. We have an embedded
server (not EE class, a simple servlet with some web services
exposed), but RestEasy relies on annotations in jaxrs
(javax.annotation.*, javax.ws.rs.*). I tried to somehow make it work,
but failed so far. Please correct me if I'm wrong, but from my
investigation of this list archives it seems that it's impossible to
simply "add" the JAR with the missing annotations to classpath? I need
to compile those annotations to a module and then add the module,
right?

If so then it makes it extra difficult to have an interoperable build
script (and tests) for Java 8 and 9.

Dawid


On Tue, Apr 5, 2016 at 1:24 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 05/04/2016 12:09, Sanne Grinovero wrote:
>>
>> Hi Alan,
>> thank you for the detailed response! I am reassured that there is a
>> reasonable technical solution, yet this seems like quite a burden for
>> end users of JavaSE embedding any of these popular libraries.
>>
>> I'll be looking forward to hear more about this, in the meantime I'll
>> post my doubts to the Java Platform Module System EG.
>
> I don't know if you saw the recent change to JEP 261 [1] but I think this
> should make things easier.
>
> -Alan
>
> [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-April/007209.html


More information about the jigsaw-dev mailing list