You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Paolo Di Tommaso <pa...@gmail.com> on 2017/10/11 21:08:51 UTC

Java 9

Hi,

Which the minimal Ignite version that can run on Java 9 ?

I'm trying Ignite 1.9 and I'm getting


Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or
above. Current Java version is not supported: 9
at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:185)




Thanks,
Paolo

Re: [Ignite 2.3 release]: Java 9 in compatibility mode

Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Tue, Oct 17, 2017 at 9:11 AM, Denis Magda <dm...@apache.org> wrote:

> Considering the scope of the work to be done it sounds reasonable to move
> this task to the next release. Anyway, Java 9 was released just a couple of
> weeks ago and it’s normal to spend some time for the code adaptation
> avoiding any rush. We can release the next version by the end of the year
> which is ~2 months away.
>
>
I agree, let's push it to 2.4. However, I hope the community gets behind
the Java 1.9 support and our users will not have to wait for too long. End
of the year looks like a good target.

Re: [Ignite 2.3 release]: Java 9 in compatibility mode

Posted by Denis Magda <dm...@apache.org>.
Considering the scope of the work to be done it sounds reasonable to move this task to the next release. Anyway, Java 9 was released just a couple of weeks ago and it’s normal to spend some time for the code adaptation avoiding any rush. We can release the next version by the end of the year which is ~2 months away.

—
Denis
 
> On Oct 17, 2017, at 5:50 AM, Vladimir Ozerov <vo...@gridgain.com> wrote:
> 
> Guys,
> 
> I analyzed what was done by Evgeniy Zhuravlev to make Ignite work on Java 9
> (it was done long ago for Ignite 1.x):
> 1) We need to create two additional modules - one for Java 9 code, other
> for Java 7/8. Each module will contain version-specific stuff. Also we will
> need some additional logic to load either one or another module based Java
> version. May be some Maven magic will be required as well.
> 2) We need to fix a number of places:
> 2.1) IgnitionEx, GridDiscoveryManager - version resolution logic, minor
> thing
> 2.2) IgniteUtils.close - rely on deleted SharedSecrets.getJavaNetAccess().
> getURLClassPath()
> 2.3) ATOMIC cache - rely on deleted Unsafe.monitorEnter()/monitorExit()
> 2.4) GridRestProtocolAdapter - rely on deleted BASE64Encoder
> 2.5) DirectByteBufferStreamImpl - rely on no longer accessible DirectBuffer.
> address()
> 2.6) GridNioServer, PlatformMemoryPool - rely on refactored Cleaner.
> 3) We need to execute full set of tests on TC before release. This will
> require additional efforts on TC configuration.
> 
> I propose to move this task to AI 2.4 as it might take weeks.
> 
> Vladimir.
> 
> On Fri, Oct 13, 2017 at 2:33 AM, Denis Magda <dm...@apache.org> wrote:
> 
>> Igniters,
>> 
>> If to put aside the compilation task [1] on Java 9, nobody can start
>> Ignite even in the compatibility mode on that version of JDK. That’s the
>> reason [2].
>> 
>> Let’s fix this for 2.3 by expanding the “if” close to -
>> !U.jdkVersion().contains("1.9"))
>> 
>> Any objections?
>> 
>> [1] https://issues.apache.org/jira/browse/IGNITE-4615 <
>> https://issues.apache.org/jira/browse/IGNITE-4615>
>> [2] https://github.com/apache/ignite/blob/master/modules/
>> core/src/main/java/org/apache/ignite/internal/IgnitionEx.java#L186 <
>> https://github.com/apache/ignite/blob/master/modules/
>> core/src/main/java/org/apache/ignite/internal/IgnitionEx.java#L186>
>> 
>> —
>> Denis
>> 
>> 
>>> Begin forwarded message:
>>> 
>>> From: Paolo Di Tommaso <pa...@gmail.com>
>>> Subject: Re: Java 9
>>> Date: October 11, 2017 at 11:41:24 PM PDT
>>> To: user@ignite.apache.org
>>> Reply-To: user@ignite.apache.org
>>> 
>>> Hi Denis,
>>> 
>>> Neither in compatibility mode? I mean adding some --add-opens options <
>> https://docs.oracle.com/javase/9/migrate/toc.htm#
>> JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66> to access
>> deprecated/internal apis?
>>> 
>>> Almost any any existing Java app works in this way. I've tried that but
>> it seems Ignite is throwing an exception because the Java version number
>> does not match the expected pattern.
>>> 
>>> Any workaround ?
>>> 
>>> Cheers,
>>> Paolo
>>> 
>>> 
>>> On Thu, Oct 12, 2017 at 1:25 AM, Denis Magda <dmagda@apache.org <mailto:
>> dmagda@apache.org>> wrote:
>>> Hi Paolo,
>>> 
>>> There is some work to do to make Ignite running on Java 9:
>>> https://issues.apache.org/jira/browse/IGNITE-4615 <
>> https://issues.apache.org/jira/browse/IGNITE-4615>
>>> 
>>> Guess the version will be supported by the end of the year.
>>> 
>>> —
>>> Denis
>>> 
>>>> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <
>> paolo.ditommaso@gmail.com <ma...@gmail.com>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Which the minimal Ignite version that can run on Java 9 ?
>>>> 
>>>> I'm trying Ignite 1.9 and I'm getting
>>>> 
>>>> 
>>>> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or
>> above. Current Java version is not supported: 9
>>>>     at org.apache.ignite.internal.IgnitionEx.<clinit>(
>> IgnitionEx.java:185)
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Thanks,
>>>> Paolo
>>>> 
>>> 
>>> 
>> 
>> 


Re: [Ignite 2.3 release]: Java 9 in compatibility mode

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Guys,

I analyzed what was done by Evgeniy Zhuravlev to make Ignite work on Java 9
(it was done long ago for Ignite 1.x):
1) We need to create two additional modules - one for Java 9 code, other
for Java 7/8. Each module will contain version-specific stuff. Also we will
need some additional logic to load either one or another module based Java
version. May be some Maven magic will be required as well.
2) We need to fix a number of places:
2.1) IgnitionEx, GridDiscoveryManager - version resolution logic, minor
thing
2.2) IgniteUtils.close - rely on deleted SharedSecrets.getJavaNetAccess().
getURLClassPath()
2.3) ATOMIC cache - rely on deleted Unsafe.monitorEnter()/monitorExit()
2.4) GridRestProtocolAdapter - rely on deleted BASE64Encoder
2.5) DirectByteBufferStreamImpl - rely on no longer accessible DirectBuffer.
address()
2.6) GridNioServer, PlatformMemoryPool - rely on refactored Cleaner.
3) We need to execute full set of tests on TC before release. This will
require additional efforts on TC configuration.

I propose to move this task to AI 2.4 as it might take weeks.

Vladimir.

On Fri, Oct 13, 2017 at 2:33 AM, Denis Magda <dm...@apache.org> wrote:

> Igniters,
>
> If to put aside the compilation task [1] on Java 9, nobody can start
> Ignite even in the compatibility mode on that version of JDK. That’s the
> reason [2].
>
> Let’s fix this for 2.3 by expanding the “if” close to -
> !U.jdkVersion().contains("1.9"))
>
> Any objections?
>
> [1] https://issues.apache.org/jira/browse/IGNITE-4615 <
> https://issues.apache.org/jira/browse/IGNITE-4615>
> [2] https://github.com/apache/ignite/blob/master/modules/
> core/src/main/java/org/apache/ignite/internal/IgnitionEx.java#L186 <
> https://github.com/apache/ignite/blob/master/modules/
> core/src/main/java/org/apache/ignite/internal/IgnitionEx.java#L186>
>
> —
> Denis
>
>
> > Begin forwarded message:
> >
> > From: Paolo Di Tommaso <pa...@gmail.com>
> > Subject: Re: Java 9
> > Date: October 11, 2017 at 11:41:24 PM PDT
> > To: user@ignite.apache.org
> > Reply-To: user@ignite.apache.org
> >
> > Hi Denis,
> >
> > Neither in compatibility mode? I mean adding some --add-opens options <
> https://docs.oracle.com/javase/9/migrate/toc.htm#
> JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66> to access
> deprecated/internal apis?
> >
> > Almost any any existing Java app works in this way. I've tried that but
> it seems Ignite is throwing an exception because the Java version number
> does not match the expected pattern.
> >
> > Any workaround ?
> >
> > Cheers,
> > Paolo
> >
> >
> > On Thu, Oct 12, 2017 at 1:25 AM, Denis Magda <dmagda@apache.org <mailto:
> dmagda@apache.org>> wrote:
> > Hi Paolo,
> >
> > There is some work to do to make Ignite running on Java 9:
> > https://issues.apache.org/jira/browse/IGNITE-4615 <
> https://issues.apache.org/jira/browse/IGNITE-4615>
> >
> > Guess the version will be supported by the end of the year.
> >
> > —
> > Denis
> >
> >> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <
> paolo.ditommaso@gmail.com <ma...@gmail.com>> wrote:
> >>
> >> Hi,
> >>
> >> Which the minimal Ignite version that can run on Java 9 ?
> >>
> >> I'm trying Ignite 1.9 and I'm getting
> >>
> >>
> >> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or
> above. Current Java version is not supported: 9
> >>      at org.apache.ignite.internal.IgnitionEx.<clinit>(
> IgnitionEx.java:185)
> >>
> >>
> >>
> >>
> >> Thanks,
> >> Paolo
> >>
> >
> >
>
>

[Ignite 2.3 release]: Java 9 in compatibility mode

Posted by Denis Magda <dm...@apache.org>.
Igniters,

If to put aside the compilation task [1] on Java 9, nobody can start Ignite even in the compatibility mode on that version of JDK. That’s the reason [2].

Let’s fix this for 2.3 by expanding the “if” close to - !U.jdkVersion().contains("1.9"))

Any objections?

[1] https://issues.apache.org/jira/browse/IGNITE-4615 <https://issues.apache.org/jira/browse/IGNITE-4615>
[2] https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java#L186 <https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java#L186>

—
Denis


> Begin forwarded message:
> 
> From: Paolo Di Tommaso <pa...@gmail.com>
> Subject: Re: Java 9
> Date: October 11, 2017 at 11:41:24 PM PDT
> To: user@ignite.apache.org
> Reply-To: user@ignite.apache.org
> 
> Hi Denis, 
> 
> Neither in compatibility mode? I mean adding some --add-opens options <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66> to access deprecated/internal apis? 
> 
> Almost any any existing Java app works in this way. I've tried that but it seems Ignite is throwing an exception because the Java version number does not match the expected pattern. 
> 
> Any workaround ?
> 
> Cheers,
> Paolo
> 
> 
> On Thu, Oct 12, 2017 at 1:25 AM, Denis Magda <dmagda@apache.org <ma...@apache.org>> wrote:
> Hi Paolo,
> 
> There is some work to do to make Ignite running on Java 9:
> https://issues.apache.org/jira/browse/IGNITE-4615 <https://issues.apache.org/jira/browse/IGNITE-4615>
> 
> Guess the version will be supported by the end of the year.
> 
> —
> Denis
> 
>> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <paolo.ditommaso@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi, 
>> 
>> Which the minimal Ignite version that can run on Java 9 ? 
>> 
>> I'm trying Ignite 1.9 and I'm getting 
>> 
>> 
>> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 9
>> 	at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:185)
>> 
>> 
>>  
>> 
>> Thanks,
>> Paolo
>> 
> 
> 


Re: Java 9

Posted by Paolo Di Tommaso <pa...@gmail.com>.
I see. Thanks.

On Fri, Oct 13, 2017 at 10:23 AM, Evgenii Zhuravlev <
e.zhuravlev.wk@gmail.com> wrote:

> It was just an example. ignite-core module still needs some code changes
> to support Java 9.
>
> Evgenii
>
> 2017-10-13 10:44 GMT+03:00 Paolo Di Tommaso <pa...@gmail.com>:
>
>> Exactly, I was suggesting the same. Not everybody need the Hadoop module.
>> My guess is that with --add-opens ingnite-core should just work.
>>
>> I've tried up to version 1.9 but it fails when checking the version
>> number. It would be nice a quick patch to allows existing apps depending on
>> to support Java 9 in "legacy" mode.
>>
>>
>> Best,
>> Paolo
>>
>>

Re: Java 9

Posted by Evgenii Zhuravlev <e....@gmail.com>.
It was just an example. ignite-core module still needs some code changes to
support Java 9.

Evgenii

2017-10-13 10:44 GMT+03:00 Paolo Di Tommaso <pa...@gmail.com>:

> Exactly, I was suggesting the same. Not everybody need the Hadoop module.
> My guess is that with --add-opens ingnite-core should just work.
>
> I've tried up to version 1.9 but it fails when checking the version
> number. It would be nice a quick patch to allows existing apps depending on
> to support Java 9 in "legacy" mode.
>
>
> Best,
> Paolo
>
>
> On Fri, Oct 13, 2017 at 9:34 AM, Alexey Kuznetsov <ak...@apache.org>
> wrote:
>
>> Evgenii,
>>
>> Hadoop is an optional module.
>> How about ignite-core? Could it be started under Java 9?
>>
>> On Fri, Oct 13, 2017 at 2:21 PM, Evgenii Zhuravlev <
>> e.zhuravlev.wk@gmail.com> wrote:
>>
>>> Paolo,
>>>
>>> As most frameworks and platforms, Ignite contains low-level logic, which
>>> was changed in Java 9. For example, in Java 9 application classloader is
>>> not a UrlClassLoader anymore, while in ignite-hadoop we used methods from
>>> UrlClassLoader for implementing class loading logic.
>>>
>>> So, --add-opens and other flags will not help right now, the community
>>> should do some changes in code first.
>>>
>>> Evgenii
>>>
>>>
>> ----
>> Alexey Kuznetsov
>>
>
>

Re: Java 9

Posted by Paolo Di Tommaso <pa...@gmail.com>.
Exactly, I was suggesting the same. Not everybody need the Hadoop module.
My guess is that with --add-opens ingnite-core should just work.

I've tried up to version 1.9 but it fails when checking the version number.
It would be nice a quick patch to allows existing apps depending on to
support Java 9 in "legacy" mode.


Best,
Paolo


On Fri, Oct 13, 2017 at 9:34 AM, Alexey Kuznetsov <ak...@apache.org>
wrote:

> Evgenii,
>
> Hadoop is an optional module.
> How about ignite-core? Could it be started under Java 9?
>
> On Fri, Oct 13, 2017 at 2:21 PM, Evgenii Zhuravlev <
> e.zhuravlev.wk@gmail.com> wrote:
>
>> Paolo,
>>
>> As most frameworks and platforms, Ignite contains low-level logic, which
>> was changed in Java 9. For example, in Java 9 application classloader is
>> not a UrlClassLoader anymore, while in ignite-hadoop we used methods from
>> UrlClassLoader for implementing class loading logic.
>>
>> So, --add-opens and other flags will not help right now, the community
>> should do some changes in code first.
>>
>> Evgenii
>>
>>
> ----
> Alexey Kuznetsov
>

Re: Java 9

Posted by Alexey Kuznetsov <ak...@apache.org>.
Evgenii,

Hadoop is an optional module.
How about ignite-core? Could it be started under Java 9?

On Fri, Oct 13, 2017 at 2:21 PM, Evgenii Zhuravlev <e.zhuravlev.wk@gmail.com
> wrote:

> Paolo,
>
> As most frameworks and platforms, Ignite contains low-level logic, which
> was changed in Java 9. For example, in Java 9 application classloader is
> not a UrlClassLoader anymore, while in ignite-hadoop we used methods from
> UrlClassLoader for implementing class loading logic.
>
> So, --add-opens and other flags will not help right now, the community
> should do some changes in code first.
>
> Evgenii
>
>
----
Alexey Kuznetsov

Re: Java 9

Posted by Evgenii Zhuravlev <e....@gmail.com>.
Paolo,

As most frameworks and platforms, Ignite contains low-level logic, which
was changed in Java 9. For example, in Java 9 application classloader is
not a UrlClassLoader anymore, while in ignite-hadoop we used methods from
UrlClassLoader for implementing class loading logic.

So, --add-opens and other flags will not help right now, the community
should do some changes in code first.

Evgenii



2017-10-13 10:08 GMT+03:00 Paolo Di Tommaso <pa...@gmail.com>:

> Hi,
>
> Any feedback would be appreciated. Thanks!
>
> On Thu, Oct 12, 2017 at 8:41 AM, Paolo Di Tommaso <
> paolo.ditommaso@gmail.com> wrote:
>
>> Hi Denis,
>>
>> Neither in compatibility mode? I mean adding some --add-opens options
>> <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66>
>> to access deprecated/internal apis?
>>
>> Almost any any existing Java app works in this way. I've tried that but
>> it seems Ignite is throwing an exception because the Java version number
>> does not match the expected pattern.
>>
>> Any workaround ?
>>
>> Cheers,
>> Paolo
>>
>>
>> On Thu, Oct 12, 2017 at 1:25 AM, Denis Magda <dm...@apache.org> wrote:
>>
>>> Hi Paolo,
>>>
>>> There is some work to do to make Ignite running on Java 9:
>>> https://issues.apache.org/jira/browse/IGNITE-4615
>>>
>>> Guess the version will be supported by the end of the year.
>>>
>>> —
>>> Denis
>>>
>>> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <pa...@gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>> Which the minimal Ignite version that can run on Java 9 ?
>>>
>>> I'm trying Ignite 1.9 and I'm getting
>>>
>>>
>>> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or
>>> above. Current Java version is not supported: 9
>>> at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:185)
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Paolo
>>>
>>>
>>>
>>
>

Re: Java 9

Posted by Paolo Di Tommaso <pa...@gmail.com>.
Hi,

Any feedback would be appreciated. Thanks!

On Thu, Oct 12, 2017 at 8:41 AM, Paolo Di Tommaso <paolo.ditommaso@gmail.com
> wrote:

> Hi Denis,
>
> Neither in compatibility mode? I mean adding some --add-opens options
> <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66>
> to access deprecated/internal apis?
>
> Almost any any existing Java app works in this way. I've tried that but it
> seems Ignite is throwing an exception because the Java version number does
> not match the expected pattern.
>
> Any workaround ?
>
> Cheers,
> Paolo
>
>
> On Thu, Oct 12, 2017 at 1:25 AM, Denis Magda <dm...@apache.org> wrote:
>
>> Hi Paolo,
>>
>> There is some work to do to make Ignite running on Java 9:
>> https://issues.apache.org/jira/browse/IGNITE-4615
>>
>> Guess the version will be supported by the end of the year.
>>
>> —
>> Denis
>>
>> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <pa...@gmail.com>
>> wrote:
>>
>> Hi,
>>
>> Which the minimal Ignite version that can run on Java 9 ?
>>
>> I'm trying Ignite 1.9 and I'm getting
>>
>>
>> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or
>> above. Current Java version is not supported: 9
>> at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:185)
>>
>>
>>
>>
>> Thanks,
>> Paolo
>>
>>
>>
>

Re: Java 9

Posted by Paolo Di Tommaso <pa...@gmail.com>.
Hi Denis,

Neither in compatibility mode? I mean adding some --add-opens options
<https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-2F61F3A9-0979-46A4-8B49-325BA0EE8B66>
to access deprecated/internal apis?

Almost any any existing Java app works in this way. I've tried that but it
seems Ignite is throwing an exception because the Java version number does
not match the expected pattern.

Any workaround ?

Cheers,
Paolo


On Thu, Oct 12, 2017 at 1:25 AM, Denis Magda <dm...@apache.org> wrote:

> Hi Paolo,
>
> There is some work to do to make Ignite running on Java 9:
> https://issues.apache.org/jira/browse/IGNITE-4615
>
> Guess the version will be supported by the end of the year.
>
> —
> Denis
>
> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <pa...@gmail.com>
> wrote:
>
> Hi,
>
> Which the minimal Ignite version that can run on Java 9 ?
>
> I'm trying Ignite 1.9 and I'm getting
>
>
> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or
> above. Current Java version is not supported: 9
> at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:185)
>
>
>
>
> Thanks,
> Paolo
>
>
>

Re: Java 9

Posted by Denis Magda <dm...@apache.org>.
Hi Paolo,

There is some work to do to make Ignite running on Java 9:
https://issues.apache.org/jira/browse/IGNITE-4615 <https://issues.apache.org/jira/browse/IGNITE-4615>

Guess the version will be supported by the end of the year.

—
Denis

> On Oct 11, 2017, at 2:08 PM, Paolo Di Tommaso <pa...@gmail.com> wrote:
> 
> Hi, 
> 
> Which the minimal Ignite version that can run on Java 9 ? 
> 
> I'm trying Ignite 1.9 and I'm getting 
> 
> 
> Caused by: java.lang.IllegalStateException: Ignite requires Java 7 or above. Current Java version is not supported: 9
> 	at org.apache.ignite.internal.IgnitionEx.<clinit>(IgnitionEx.java:185)
> 
> 
>  
> 
> Thanks,
> Paolo
>