Hi John,

the exact same issue happens with @Nullable which is used by a bunch of libraries (static code analyzis, @AutoValue of guava etc...)

Best i was able to do was to force all these javax annotation to be load in a classloader which is not the root JVM one but this is a huge regression of java 9 which has no solution and oracle claims it is intended since it is a bad practise to have packages over jars (even if jars are abstracted into a classloader so this is not something which means anything) :(.

A workaround is to not activate the JVM javax.annotation package and provide all javax.* in the unamed module but this will not last very long since all modules will slowly be named with time.

Hope it helps a bit even if it doesn't solve anything.



Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn

2017-10-21 16:22 GMT+02:00 John Ament <john.ament@spartasystems.com>:

Hey all


Not sure where else to turn 😊


I'm trying to start testing my apps on Java 9, I believe Java 9 kicks back the javax.annotation dependency that CDI declares due to a package collision with the built in JDK's javax.annotation package.  The errors I get are due to missing javax/annotation/Priority.  I'm wondering if anyone else has tried this, and if there's a clean work around?


John 


NOTICE: This e-mail message and any attachments may contain confidential, proprietary, and/or privileged information which should be treated accordingly. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this message, and destroy all physical and electronic copies. Thank you.

_______________________________________________
cdi-dev mailing list
cdi-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev

Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.