Required 2 simple patches from David Mollitor:

https://github.com/apache/zookeeper/commit/1c5d135d74f16275876c024401dc2de92909b20a
https://github.com/apache/zookeeper/commit/591e1fdbb98a151e003066305e1cc1fd27dcfb66

…in order to get Jute’s pom.xml in sync with master.
I manually cherry-picked and pushed the commits into 3.6 and 3.5 branches 
instead of creating PRs. I’m also updating Jiras.

Please let me know if you have any concerns. 

Andor




> On 2020. Apr 29., at 19:18, Andor Molnar <an...@apache.org> wrote:
> 
> Got it.
> 
> zookeeper-jute uses and old version of Maven compiler plugin which doesn’t 
> support the jdk-release-flag profile.
> I’ll create a new patch soon.
> 
> Andor
> 
> 
> 
>> On 2020. Apr 29., at 11:48, Andor Molnar <an...@apache.org> wrote:
>> 
>> I keep looking today.
>> Chris, if you have some cycles, we could use your brain here.
>> 
>> There were a good deal of Maven improvements around recently. Why haven’t we 
>> backported them to 3.5? 
>> It’s an active release, no code changes, build improvements are always good, 
>> …
>> 
>> Andor
>> 
>> 
>> 
>>> On 2020. Apr 29., at 11:29, Andor Molnar <an...@apache.org> wrote:
>>> 
>>> You’re right. The patch doesn’t work on 3.5 for some reason.
>>> There might be some other Maven patch missing.
>>> 
>>> Andor
>>> 
>>> 
>>> 
>>>> On 2020. Apr 29., at 10:18, Andor Molnar <an...@apache.org> wrote:
>>>> 
>>>> Checking.
>>>> 
>>>> 
>>>>> On 2020. Apr 29., at 9:41, Szalay-Bekő Máté <szalay.beko.m...@gmail.com> 
>>>>> wrote:
>>>>> 
>>>>> I merged the change and tried to test this locally on branch-3.5 but
>>>>> haven't succeed so far.
>>>>> 
>>>>> Steps:
>>>>> - checkout branch-3.5 (I already merged the PR)
>>>>> - build ZK from source with openjdk 13.0.2 (I used maven 3.6.3 and "git
>>>>> clean -xdf && mvn clean install -DskipTests")
>>>>> - run server with JDK 8 (I don't have Oracle JDK, but tried 
>>>>> "8.0.252-zulu",
>>>>> "8.0.242-zulu" and "8.0.212-zulu" with sdkman.io, these should be OpenJDK
>>>>> builds)
>>>>> 
>>>>> I got "java.lang.NoSuchMethodError:
>>>>> java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;" exception in the server
>>>>> logs right when I started the server.
>>>>> 
>>>>> Could someone verify this behaviour on branch-3.5?
>>>>> 
>>>>> There might be some other differences between branch-3.5 and master. Or
>>>>> maybe OpenJDK 8 behaves differently than the Oracle JDK used by Andor for
>>>>> testing?
>>>>> I'll try to dig deeper later.
>>>>> 
>>>>> On Tue, Apr 28, 2020 at 3:26 PM Andor Molnar <an...@apache.org> wrote:
>>>>> 
>>>>>> https://github.com/apache/zookeeper/pull/1340
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> On 2020. Apr 28., at 15:04, Andor Molnar <an...@apache.org> wrote:
>>>>>>> 
>>>>>>> I verified the patch, it works perfectly.
>>>>>>> 
>>>>>>> Steps:
>>>>>>> - build ZK from source with openjdk 13.0.2
>>>>>>> - run server with Oracle 1.8.0_201
>>>>>>> - connect zkcli with both java versions
>>>>>>> - run some smoke tests
>>>>>>> 
>>>>>>> It worked perfectly with master and failed with 3.5.7 with the
>>>>>> “NoSuchMethodError” as mentioned in the ticket.
>>>>>>> 
>>>>>>> I’ll backport the patch to 3.6 and 3.5 and mark the ticket resolved.
>>>>>>> 
>>>>>>> Thanks again.
>>>>>>> 
>>>>>>> Andor
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On 2020. Apr 28., at 13:27, Andor Molnar <an...@apache.org> wrote:
>>>>>>>> 
>>>>>>>> Great. I’ll take care of that.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> On 2020. Apr 28., at 13:08, Enrico Olivelli <eolive...@gmail.com>
>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>> Il Mar 28 Apr 2020, 10:48 Andor Molnar <an...@apache.org> ha scritto:
>>>>>>>>> 
>>>>>>>>>> Really?
>>>>>>>>>> That patch is a general solution and actually looks really promising
>>>>>> to
>>>>>>>>>> me. I’ll check.
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> I forgot that in that patch option 2 is already implemented
>>>>>>>>> https://github.com/apache/zookeeper/pull/1269
>>>>>>>>> We could port it to 3.6 branch and to branch 3.5
>>>>>>>>> 
>>>>>>>>> Enrico
>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Thanks Chris.
>>>>>>>>>> 
>>>>>>>>>> Andor
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>>> On 2020. Apr 28., at 9:34, Enrico Olivelli <eolive...@gmail.com>
>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>> Il Mar 28 Apr 2020, 02:47 Christopher <ctubb...@apache.org> ha
>>>>>> scritto:
>>>>>>>>>>> 
>>>>>>>>>>>> Option 2 was implemented by me already as part of my pull request
>>>>>> for
>>>>>>>>>>>> https://issues.apache.org/jira/browse/ZOOKEEPER-3739
>>>>>>>>>>>> This change was applied to 3.6.1 and 3.7.0.
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> This is not the problem but the problem with ByteBuffer.
>>>>>>>>>>> 
>>>>>>>>>>> Enrico
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>>> If this didn't fix it, I'd have to look into it further. But, the
>>>>>>>>>>>> option 1 doesn't look too bad to me.
>>>>>>>>>>>> 
>>>>>>>>>>>> On Mon, Apr 27, 2020 at 1:16 PM Enrico Olivelli <
>>>>>> eolive...@gmail.com>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Optional 2 is the best.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I have fallen into this problem while preparing 3.6.1 rc. I was
>>>>>> using
>>>>>>>>>>>> jdk14
>>>>>>>>>>>>> and my binaries wouldn't run in jdk8
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Enrico
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Il Lun 27 Apr 2020, 18:58 Andor Molnar <an...@apache.org> ha
>>>>>> scritto:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Hi folks,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> https://issues.apache.org/jira/browse/ZOOKEEPER-3215
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> has come up recently again and I’m thinking of the right way to
>>>>>>>>>> resolve
>>>>>>>>>>>>>> this. Given that we have some Maven experts in the house my first
>>>>>>>>>>>> question
>>>>>>>>>>>>>> would be: can we just resolve this with some Maven magic?
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Option #1
>>>>>>>>>>>>>> Apply https://github.com/apache/zookeeper/pull/760 on master
>>>>>> branch
>>>>>>>>>> to
>>>>>>>>>>>>>> make explicit casts which will hint the compiler to use the right
>>>>>>>>>>>> method.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Option #2
>>>>>>>>>>>>>> Detect the Java compiler with Maven and add “—release 8” switch
>>>>>> to all
>>>>>>>>>>>>>> Java compilers with version 9+.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I really want to resolve this with some automated solution,
>>>>>> because
>>>>>>>>>>>>>> changing the source code seems to me ugly and fragile. Do we have
>>>>>> any
>>>>>>>>>>>> other
>>>>>>>>>>>>>> option?
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>>> Andor
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>> 
>> 
> 

Reply via email to