Duplicate javax.annotation packages and Java 9

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicate javax.annotation packages and Java 9

John Ament

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
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Romain Manni-Bucau
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 Blog | Github | LinkedIn

2017-10-21 16:22 GMT+02:00 John Ament <[hidden email]>:

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
[hidden email]
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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Matej Novotny
Hi

Haven't come across that one yet, but what Romain says is right.
You cannot have the same package coming from multiple modules.
So the only way is to make sure they come from one module - so either unnamed module,
or not using their internal module (which I am not sure is possible here).

I don't really know how they imagine people will deal with this...
Every other project out there will have similar problems.

Matej

----- Original Message -----

> From: "Romain Manni-Bucau" <[hidden email]>
> To: "John Ament" <[hidden email]>
> Cc: "cdi-dev" <[hidden email]>
> Sent: Saturday, October 21, 2017 6:17:52 PM
> Subject: Re: [cdi-dev] Duplicate javax.annotation packages and Java 9
>
> 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 Blog | Github | LinkedIn
>
> 2017-10-21 16:22 GMT+02:00 John Ament < [hidden email] > :
>
>
>
>
>
> 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
> [hidden email]
> 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.
>
>
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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.

_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Martin Kouba
In reply to this post by John Ament
For the record, the CDI API itself does not define a dependency on
javax.annotation at all.

In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
reasons are similar to why javax.annotation.Priority only has
@Target({TYPE,PARAMETER}) (even if we tried to push other element types :-(.

M

Dne 21.10.2017 v 16:22 John Ament napsal(a):

> 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
> <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.  
> 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
> [hidden email]
> 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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Antoine Sabot-Durand-2
I encountered the same type of collision with java.transaction.InvalidTransactionException which is in the JDK and in JTA. I remember sending this problem to jigsaw ML [1], but obviously they didn't have time to do something or expect having Java EE spec do the required stuff :-(.
Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will be) to support jigsaw, we'll probably have to change packages names :-(.


Antoine



On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]> wrote:
For the record, the CDI API itself does not define a dependency on
javax.annotation at all.

In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
reasons are similar to why javax.annotation.Priority only has
@Target({TYPE,PARAMETER}) (even if we tried to push other element types :-(.

M

Dne 21.10.2017 v 16:22 John Ament napsal(a):
> 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
> <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
> 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
> [hidden email]
> 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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
[hidden email]
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.

_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Martin Kouba
Dne 23.10.2017 v 10:17 Antoine Sabot-Durand napsal(a):
> I encountered the same type of collision with
> java.transaction.InvalidTransactionException which is in the JDK and in
> JTA. I remember sending this problem to jigsaw ML [1], but obviously
> they didn't have time to do something or expect having Java EE spec do
> the required stuff :-(.
> Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
> be) to support jigsaw, we'll probably have to change packages names :-(.

What packages do you have in mind? We don't "own" javax.annotation and
we cannot introduce our own priority annotation...

>
>
> Antoine
>
> [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008779.html
>
>
> On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     For the record, the CDI API itself does not define a dependency on
>     javax.annotation at all.
>
>     In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
>     reasons are similar to why javax.annotation.Priority only has
>     @Target({TYPE,PARAMETER}) (even if we tried to push other element
>     types :-(.
>
>     M
>
>     Dne 21.10.2017 v 16:22 John Ament napsal(a):
>      > 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
>      >
>     <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
>      > 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
>      > [hidden email] <mailto:[hidden email]>
>      > 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.
>      >
>
>     --
>     Martin Kouba
>     Senior Software Engineer
>     Red Hat, Czech Republic
>     _______________________________________________
>     cdi-dev mailing list
>     [hidden email] <mailto:[hidden email]>
>     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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Antoine Sabot-Durand-2
I was not talking about CDI specifically: the spec doesn't have package collision with JDK 9. I'm talking about the EE4J platform since there are collision with javax.annotation and probably a few other collision between jdk9 module and packages in EE4J specs.

On Mon, Oct 23, 2017 at 10:20 AM Martin Kouba <[hidden email]> wrote:
Dne 23.10.2017 v 10:17 Antoine Sabot-Durand napsal(a):
> I encountered the same type of collision with
> java.transaction.InvalidTransactionException which is in the JDK and in
> JTA. I remember sending this problem to jigsaw ML [1], but obviously
> they didn't have time to do something or expect having Java EE spec do
> the required stuff :-(.
> Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
> be) to support jigsaw, we'll probably have to change packages names :-(.

What packages do you have in mind? We don't "own" javax.annotation and
we cannot introduce our own priority annotation...

>
>
> Antoine
>
> [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008779.html
>
>
> On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     For the record, the CDI API itself does not define a dependency on
>     javax.annotation at all.
>
>     In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
>     reasons are similar to why javax.annotation.Priority only has
>     @Target({TYPE,PARAMETER}) (even if we tried to push other element
>     types :-(.
>
>     M
>
>     Dne 21.10.2017 v 16:22 John Ament napsal(a):
>      > 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
>      >
>     <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
>      > 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
>      > [hidden email] <mailto:[hidden email]>
>      > 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.
>      >
>
>     --
>     Martin Kouba
>     Senior Software Engineer
>     Red Hat, Czech Republic
>     _______________________________________________
>     cdi-dev mailing list
>     [hidden email] <mailto:[hidden email]>
>     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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic

_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Romain Manni-Bucau
Technically we can rewrite the loaded bytecode etc but this is ugly and unfair for end users, maybe we can request oracle to support "fragments" for packages (like in OSGi) to merge multiple jars in a single module?


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

2017-10-23 10:30 GMT+02:00 Antoine Sabot-Durand <[hidden email]>:
I was not talking about CDI specifically: the spec doesn't have package collision with JDK 9. I'm talking about the EE4J platform since there are collision with javax.annotation and probably a few other collision between jdk9 module and packages in EE4J specs.

On Mon, Oct 23, 2017 at 10:20 AM Martin Kouba <[hidden email]> wrote:
Dne 23.10.2017 v 10:17 Antoine Sabot-Durand napsal(a):
> I encountered the same type of collision with
> java.transaction.InvalidTransactionException which is in the JDK and in
> JTA. I remember sending this problem to jigsaw ML [1], but obviously
> they didn't have time to do something or expect having Java EE spec do
> the required stuff :-(.
> Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
> be) to support jigsaw, we'll probably have to change packages names :-(.

What packages do you have in mind? We don't "own" javax.annotation and
we cannot introduce our own priority annotation...

>
>
> Antoine
>
> [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008779.html
>
>
> On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     For the record, the CDI API itself does not define a dependency on
>     javax.annotation at all.
>
>     In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
>     reasons are similar to why javax.annotation.Priority only has
>     @Target({TYPE,PARAMETER}) (even if we tried to push other element
>     types :-(.
>
>     M
>
>     Dne 21.10.2017 v 16:22 John Ament napsal(a):
>      > 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
>      >
>     <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
>      > 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
>      > [hidden email] <mailto:[hidden email]>
>      > 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.
>      >
>
>     --
>     Martin Kouba
>     Senior Software Engineer
>     Red Hat, Czech Republic
>     _______________________________________________
>     cdi-dev mailing list
>     [hidden email] <mailto:[hidden email]>
>     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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic

_______________________________________________
cdi-dev mailing list
[hidden email]
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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Mark Struberg
In reply to this post by Antoine Sabot-Durand-2
JAX-B has the same issue. I guess also a lot more 'EE' specs which got merged into SE but didn't get updated in time by the SE team.

LieGrue,
strub


On Monday, 23 October 2017, 10:27:04 GMT+2, Antoine Sabot-Durand <[hidden email]> wrote:


I encountered the same type of collision with java.transaction.InvalidTransactionException which is in the JDK and in JTA. I remember sending this problem to jigsaw ML [1], but obviously they didn't have time to do something or expect having Java EE spec do the required stuff :-(.
Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will be) to support jigsaw, we'll probably have to change packages names :-(.


Antoine



On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]> wrote:
For the record, the CDI API itself does not define a dependency on
javax.annotation at all.

In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
reasons are similar to why javax.annotation.Priority only has
@Target({TYPE,PARAMETER}) (even if we tried to push other element types :-(.

M

Dne 21.10.2017 v 16:22 John Ament napsal(a):
> 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
> <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
> 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
> [hidden email]
> 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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
[hidden email]
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.
_______________________________________________
cdi-dev mailing list
[hidden email]
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.

_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Mark Struberg
In reply to this post by Martin Kouba
>> Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
>> be) to support jigsaw, we'll probably have to change packages names :-(.
>
> What packages do you have in mind? We don't "own" javax.annotation and
> we cannot introduce our own priority annotation...

Indeed we (CDI) do not own common-annotations.
That was the reason why the JSR-250 working group release a MR for it which did contain the changes we needed in CDI. So from our side (EE) all was fine imo.
It's just that the SE team didn't update the JDK to this official MR it seems.

LieGrue,
strub


On Monday, 23 October 2017, 10:31:22 GMT+2, Martin Kouba <[hidden email]> wrote:

Dne 23.10.2017 v 10:17 Antoine Sabot-Durand napsal(a):
> I encountered the same type of collision with
> java.transaction.InvalidTransactionException which is in the JDK and in
> JTA. I remember sending this problem to jigsaw ML [1], but obviously
> they didn't have time to do something or expect having Java EE spec do
> the required stuff :-(.
> Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
> be) to support jigsaw, we'll probably have to change packages names :-(.

What packages do you have in mind? We don't "own" javax.annotation and
we cannot introduce our own priority annotation...

>
>
> Antoine
>
> [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008779.html
>
>
> On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>    For the record, the CDI API itself does not define a dependency on
>    javax.annotation at all.
>
>    In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
>    reasons are similar to why javax.annotation.Priority only has
>    @Target({TYPE,PARAMETER}) (even if we tried to push other element
>    types :-(.
>
>    M
>
>    Dne 21.10.2017 v 16:22 John Ament napsal(a):
>      > 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
>      >
>    <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
>      > 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
>      > [hidden email] <mailto:[hidden email]>
>      > 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.
>      >
>
>    --
>    Martin Kouba
>    Senior Software Engineer
>    Red Hat, Czech Republic
>    _______________________________________________
>    cdi-dev mailing list
>    [hidden email] <mailto:[hidden email]>

>    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.
>

--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
_______________________________________________
cdi-dev mailing list
[hidden email]
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.

_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate javax.annotation packages and Java 9

Mark Struberg
Pulling this up again.

It seems that the JDK team finally realised that they trashed tons of working projects with Jigsaw.
Of course, that's kind of natural with such a big change - but they have to clean it up now.

They are currently looking into removing all sorts of libraries from the JDK.
E.g. the whole JAX-WS and JAX-B parts.

Antoine, do you want to also contact them in regards of common-annotations?
Has anyone more information what is on the plate about what else is about to be removed from the JDK?

txs and LieGrue,
strub

> Am 23.10.2017 um 17:10 schrieb Mark Struberg <[hidden email]>:
>
> >> Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
> >> be) to support jigsaw, we'll probably have to change packages names :-(.
> >
> > What packages do you have in mind? We don't "own" javax.annotation and
> > we cannot introduce our own priority annotation...
>
> Indeed we (CDI) do not own common-annotations.
> That was the reason why the JSR-250 working group release a MR for it which did contain the changes we needed in CDI. So from our side (EE) all was fine imo.
> It's just that the SE team didn't update the JDK to this official MR it seems.
>
> LieGrue,
> strub
>
>
> On Monday, 23 October 2017, 10:31:22 GMT+2, Martin Kouba <[hidden email]> wrote:
>
> Dne 23.10.2017 v 10:17 Antoine Sabot-Durand napsal(a):
> > I encountered the same type of collision with
> > java.transaction.InvalidTransactionException which is in the JDK and in
> > JTA. I remember sending this problem to jigsaw ML [1], but obviously
> > they didn't have time to do something or expect having Java EE spec do
> > the required stuff :-(.
> > Now that JDK9 is out, if we want EE4J 9 (or whatever it's version will
> > be) to support jigsaw, we'll probably have to change packages names :-(.
>
> What packages do you have in mind? We don't "own" javax.annotation and
> we cannot introduce our own priority annotation...
>
> >
> >
> > Antoine
> >
> > [1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-July/008779.html
> >
> >
> > On Mon, Oct 23, 2017 at 9:51 AM Martin Kouba <[hidden email]
> > <mailto:[hidden email]>> wrote:
> >
> >    For the record, the CDI API itself does not define a dependency on
> >    javax.annotation at all.
> >
> >    In fact, I'm wondering why @Priority is not part of JDK?? I suppose the
> >    reasons are similar to why javax.annotation.Priority only has
> >    @Target({TYPE,PARAMETER}) (even if we tried to push other element
> >    types :-(.
> >
> >    M
> >
> >    Dne 21.10.2017 v 16:22 John Ament napsal(a):
> >      > 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
> >      >
> >    <https://docs.oracle.com/javase/9/docs/api/javax/annotation/package-summary.html>.
> >      > 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
> >      > [hidden email] <mailto:[hidden email]>
> >      > 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.
> >      >
> >
> >    --
> >    Martin Kouba
> >    Senior Software Engineer
> >    Red Hat, Czech Republic
> >    _______________________________________________
> >    cdi-dev mailing list
> >    [hidden email] <mailto:[hidden email]>
>
> >    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.
> >
>
> --
> Martin Kouba
> Senior Software Engineer
> Red Hat, Czech Republic
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.