You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@twill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/04/10 02:09:12 UTC

[jira] [Commented] (TWILL-120) Java 8 applications causing exceptions

    [ https://issues.apache.org/jira/browse/TWILL-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488581#comment-14488581 ] 

ASF GitHub Bot commented on TWILL-120:
--------------------------------------

GitHub user chtyim opened a pull request:

    https://github.com/apache/incubator-twill/pull/30

    (TWILL-120) Make Twill Java8 compatible

    - Make Dependencies to use ASM5 visitor to find class dependencies
    - Update MethodVisitor to use the right visitMethodInsn instead of the deprecated one
      - The deprecated one will miss static initializer <clinit>, hence causing missing runtime dependencies
    - Also fixed the tracing to includes all Annotation classes that are visible at runtime
    - Added an unit-test in a separate java8-test to test Java8 compatibility

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/chtyim/incubator-twill feature/twill-120

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-twill/pull/30.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #30
    
----
commit 04a0965eeec15bdc73e99239e3652caf5162b423
Author: Terence Yim <ch...@apache.org>
Date:   2015-04-10T00:03:18Z

    (TWILL-120) Make Twill Java8 compatible
    
    - Make Dependencies to use ASM5 visitor to find class dependencies
    - Update MethodVisitor to use the right visitMethodInsn instead of the deprecated one
      - The deprecated one will miss static initializer <clinit>, hence causing missing runtime dependencies
    - Also fixed the tracing to includes all Annotation classes that are visible at runtime
    - Added an unit-test in a separate java8-test to test Java8 compatibility

----


> Java 8 applications causing exceptions
> --------------------------------------
>
>                 Key: TWILL-120
>                 URL: https://issues.apache.org/jira/browse/TWILL-120
>             Project: Apache Twill
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.4.0-incubating, 0.5.0-incubating, 0.4.1-incubating, 0.6.0-incubating
>         Environment: Hadoop 2.3 (Cloudera) 
> JDK: Oracle 1.8.0_31
>            Reporter: Oliver Rolle
>            Priority: Minor
>              Labels: patch
>             Fix For: 0.6.0-incubating
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> Original discussion: http://twill-dev.markmail.org/search/?q=#query:+page:1+mid:cs663ihnlzssum2t+state:results
> I try to execute a java 8 application with twill v0.4.0, v0.4.1, v0.5.0 & v0.6.0 but I get the following exception:
> Exception in thread " STARTING" java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5 at org.objectweb.asm.MethodVisitor.visitMethodInsn(Unknown Source) at org.objectweb.asm.ClassReader.a(Unknown Source) at org.objectweb.asm.ClassReader.b(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.apache.twill.internal.utils.Dependencies.findClassDependencies(Dependencies.java:102) at org.apache.twill.internal.ApplicationBundler.findDependencies(ApplicationBundler.java:179) at org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:136) at org.apache.twill.yarn.YarnTwillPreparer.createContainerJar(YarnTwillPreparer.java:390) at org.apache.twill.yarn.YarnTwillPreparer.access$300(YarnTwillPreparer.java:106) at org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:264) at org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:253) at org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:97) at org.apache.twill.internal.AbstractZKServiceController.startUp(AbstractZKServiceController.java:75) at org.apache.twill.internal.AbstractExecutionServiceController$ServiceDelegate.startUp(AbstractExecutionServiceController.java:109) at com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43) at java.lang.Thread.run(Thread.java:745)
> I added a fix to org.apache.twill.internal.utils.Dependencies-class which replaces ASM4 with ASM5, but the application fails to start. This error is related to ASM5, because java 7 applications fail here too. If I revert to ASM4 and start a java 7 application, everything works fine.
> ... [lots of output before here] 06:05:40.825 [ STARTING] DEBUG o.a.hadoop.ipc.ProtobufRpcEngine - Call: getApplicationReport took 5ms 06:05:40.825 [ STARTING] DEBUG o.a.twill.yarn.YarnTwillController - Yarn application status for Vertx application_1424646112016_0006: ACCEPTED 06:05:41.826 [IPC Parameter Sending Thread #0] DEBUG org.apache.hadoop.ipc.Client - IPC Client (307720848) connection to / 0.0.0.0:8032 from cloudera sending #9 06:05:41.829 [IPC Client (307720848) connection to /0.0.0.0:8032 from cloudera] DEBUG org.apache.hadoop.ipc.Client - IPC Client (307720848) connection to /0.0.0.0:8032 from cloudera got value #9 06:05:41.829 [ STARTING] DEBUG o.a.hadoop.ipc.ProtobufRpcEngine - Call: getApplicationReport took 3ms 06:05:41.829 [ STARTING] DEBUG o.a.twill.yarn.YarnTwillController - Yarn application status for Vertx application_1424646112016_0006: ACCEPTED 06:05:42.033 [Kafka-Consumer-log-0] DEBUG o.a.t.i.k.client.SimpleKafkaConsumer - No leader for topic partition TopicPartition{topic=log, partition=0}. 06:05:42.037 [Kafka-Consumer-log-0] DEBUG o.a.t.i.k.client.SimpleKafkaConsumer - No leader for topic partition TopicPartition{topic=log, partition=0}. 06:05:42.829 [IPC Parameter Sending Thread #0] DEBUG org.apache.hadoop.ipc.Client - IPC Client (307720848) connection to / 0.0.0.0:8032 from cloudera sending #10 06:05:42.831 [IPC Client (307720848) connection to /0.0.0.0:8032 from cloudera] DEBUG org.apache.hadoop.ipc.Client - IPC Client (307720848) connection to /0.0.0.0:8032 from cloudera got value #10 06:05:42.833 [ STARTING] DEBUG o.a.hadoop.ipc.ProtobufRpcEngine - Call: getApplicationReport took 4ms *06:05:42.833 [ STARTING] DEBUG o.a.twill.yarn.YarnTwillController - Yarn application status for Vertx application_1424646112016_0006: FAILED* 06:05:43.834 [ STARTING] INFO o.a.twill.yarn.YarnTwillController - Yarn application Vertx application_1424646112016_0006 is in state FAILED 06:05:43.834 [ STARTING] INFO o.a.twill.yarn.YarnTwillController - Yarn application Vertx application_1424646112016_0006 is not in running state. Shutting down controller. 06:05:43.846 [YarnTwillRunnerService STARTING-SendThread(quickstart.cloudera:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x14bb38598e10020, packet:: clientPath:/Vertx/instances/2f141ba6-5ea9-4db3-a92c-7e0413e973ad serverPath:/Vertx/instances/2f141ba6-5ea9-4db3-a92c-7e0413e973ad finished:false header:: 12,3 replyHeader:: 12,9238,-101 request:: '/Vertx/instances/2f141ba6-5ea9-4db3-a92c-7e0413e973ad,T response:: 06:05:43.863 [IPC Parameter Sending Thread #0] DEBUG org.apache.hadoop.ipc.Client - IPC Client (307720848) connection to / 0.0.0.0:8032 from cloudera sending #11 06:05:43.867 [IPC Client (307720848) connection to /0.0.0.0:8032 from cloudera] DEBUG org.apache.hadoop.ipc.Client - IPC Client (307720848) connection to /0.0.0.0:8032 from cloudera got value #11 06:05:43.869 [ STOPPING] DEBUG o.a.hadoop.ipc.ProtobufRpcEngine - Call: getApplicationReport took 10ms 06:05:43.877 [ STOPPING] DEBUG o.a.twill.yarn.YarnTwillController - Yarn application Vertx application_1424646112016_0006 completed with status FAILED 06:05:43.884 [ STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Requesting stop of all consumer threads. 06:05:43.884 [ STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Terminate requested Kafka-Consumer-log-0 06:05:43.891 [ STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Wait for all consumer threads to stop. 06:05:43.899 [ STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - All consumer threads stopped. 06:05:43.906 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.c.ZKKafkaClientService - Stopping KafkaClientService 06:05:43.911 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Stopping Kafka consumer 06:05:43.917 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Requesting stop of all consumer threads. 06:05:43.917 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Terminate requested Kafka-Consumer-log-0 06:05:43.917 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Wait for all consumer threads to stop. 06:05:43.920 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - All consumer threads stopped. 06:05:43.920 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.client.SimpleKafkaConsumer - Kafka Consumer stopped 06:05:43.929 [ZKKafkaClientService STOPPING] INFO o.a.t.i.k.c.ZKKafkaClientService - KafkaClientService stopped 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)