You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2020/09/08 10:38:47 UTC

[GitHub] [thrift] coheigea opened a new pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

coheigea opened a new pull request #2231:
URL: https://github.com/apache/thrift/pull/2231


   
   Thrift 0.13.0 does not work with JDK8, as it is compiled with JDK11. Even though the source version is JDK8, incorrect byte code is generated for various ByteBuffer methods, e.g.:
   
   Exception in thread "TAsyncClientManager#SelectorThread 22" java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
   
   The fix is to manually cast ByteBuffer to Buffer (or else switch to using the xenial docker image to create the release artifacts). See this task for more context: https://github.com/eclipse/jetty.project/issues/3244
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] zeshuai007 commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
zeshuai007 commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690918165






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] coheigea commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
coheigea commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690953968






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] stale[bot] commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-744297671


   This issue is no longer stale. Thank you for your contributions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] zeshuai007 commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
zeshuai007 commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690918165






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] zeshuai007 commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
zeshuai007 commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690918165


   Hi @he ,
   
   I have been using jdk-8 for thrift communication and compilation, but I have not found java.lang.NoSuchMethodError. Can you provide test cases?
   In addition, do the same problems exist for'remaining(),'hasRemaining()', and'capacity()'?
   
   Cheers,
   Zezeng Wang


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] zeshuai007 commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
zeshuai007 commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690918165


   Hi @he ,
   
   I have been using jdk-8 for thrift communication and compilation, but I have not found java.lang.NoSuchMethodError. Can you provide test cases?
   In addition, do the same problems exist for'remaining(),'hasRemaining()', and'capacity()'?
   
   Cheers,
   Zezeng Wang


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] coheigea commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
coheigea commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690953968


   Hi @zeshuai007 ,
   
   Yes you can reproduce as follows:
   
   1. git clone https://github.com/apache/camel
   2. Edit parent/pom.xml and change libthrift-version from 0.12.0 to 0.13.0
   3. mvn clean install -f parent/pom.xml
   4. mvn clean install -f components/camel-thrift/pom.xml
   
   If you run the last command with JDK11 it works perfectly, otherwise you start seeing the errors as above, e.g.:
   Exception in thread "TAsyncClientManager#SelectorThread 27" java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
   	at org.apache.thrift.async.TAsyncMethodCall.doWritingRequestBody(TAsyncMethodCall.java:263)
   	at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:195)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] stale[bot] commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-743934750


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] ctubbsii commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-754077704


   A much simpler fix would be to add `-release 8` to the `javac` command line when compiling with JDK9 and later.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] coheigea closed pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
coheigea closed pull request #2231:
URL: https://github.com/apache/thrift/pull/2231


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] coheigea commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
coheigea commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-744297648


   @zeshuai007 Will this PR be considered for 0.14.0? Or can you at least make sure that released artifacts are built with Java 8 to avoid this problem?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] coheigea commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
coheigea commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690953968






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [thrift] coheigea commented on pull request #2231: THRIFT-5274 - Thrift 0.13.0 does not work with JDK8

Posted by GitBox <gi...@apache.org>.
coheigea commented on pull request #2231:
URL: https://github.com/apache/thrift/pull/2231#issuecomment-690953968


   Hi @zeshuai007 ,
   
   Yes you can reproduce as follows:
   
   1. git clone https://github.com/apache/camel
   2. Edit parent/pom.xml and change libthrift-version from 0.12.0 to 0.13.0
   3. mvn clean install -f parent/pom.xml
   4. mvn clean install -f components/camel-thrift/pom.xml
   
   If you run the last command with JDK11 it works perfectly, otherwise you start seeing the errors as above, e.g.:
   Exception in thread "TAsyncClientManager#SelectorThread 27" java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
   	at org.apache.thrift.async.TAsyncMethodCall.doWritingRequestBody(TAsyncMethodCall.java:263)
   	at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:195)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org