Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4236

Flink Dashboard stops showing list of uploaded jars if main method cannot be looked up

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.2.0, 1.1.2
    • Component/s: Job-Submission
    • Labels:
      None

      Description

      The Flink Dashboard stops showing the list of uploaded jars on the job submission page if a jar is uploaded for which the main method cannot be looked up. The HTTP call returns with code 500. See the attached stacktrace:

      java.lang.RuntimeException: Failed to fetch jar list: Could not look up the main(String[]) method from the class de.zalando.[...]]: org/shaded/apache/flink/streaming/api/functions/source/SourceFunction
      at org.apache.flink.runtime.webmonitor.handlers.JarListHandler.handleRequest(JarListHandler.java:122)
      at org.apache.flink.runtime.webmonitor.RuntimeMonitorHandler.respondAsLeader(RuntimeMonitorHandler.java:135)
      at org.apache.flink.runtime.webmonitor.RuntimeMonitorHandler.channelRead0(RuntimeMonitorHandler.java:112)
      at org.apache.flink.runtime.webmonitor.RuntimeMonitorHandler.channelRead0(RuntimeMonitorHandler.java:60)
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      at io.netty.handler.codec.http.router.Handler.routed(Handler.java:62)
      at io.netty.handler.codec.http.router.DualAbstractHandler.channelRead0(DualAbstractHandler.java:57)
      at io.netty.handler.codec.http.router.DualAbstractHandler.channelRead0(DualAbstractHandler.java:20)
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      at org.apache.flink.runtime.webmonitor.HttpRequestHandler.channelRead0(HttpRequestHandler.java:104)
      at org.apache.flink.runtime.webmonitor.HttpRequestHandler.channelRead0(HttpRequestHandler.java:65)
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
      at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:147)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
      at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
      at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.RuntimeException: Could not look up the main(String[]) method from the class de.zalando.[...]]: org/shaded/apache/flink/streaming/api/functions/source/SourceFunction
      at org.apache.flink.client.program.PackagedProgram.hasMainMethod(PackagedProgram.java:479)
      at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:216)
      at org.apache.flink.client.program.PackagedProgram.<init>(PackagedProgram.java:147)
      at org.apache.flink.runtime.webmonitor.handlers.JarListHandler.handleRequest(JarListHandler.java:103)
      ... 30 more
      Caused by: java.lang.NoClassDefFoundError: org/shaded/apache/flink/streaming/api/functions/source/SourceFunction
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
      at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
      at java.lang.Class.getMethod0(Class.java:3018)
      at java.lang.Class.getMethod(Class.java:1784)
      at org.apache.flink.client.program.PackagedProgram.hasMainMethod(PackagedProgram.java:473)
      ... 33 more
      Caused by: java.lang.ClassNotFoundException: org.shaded.apache.flink.streaming.api.functions.source.SourceFunction
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 39 more
      

        Issue Links

          Activity

          Show
          gjy Gary Yao added a comment - See http://mail-archives.apache.org/mod_mbox/flink-user/201607.mbox/browser for workaround
          Show
          aljoscha Aljoscha Krettek added a comment - This is a direct link to the discussion thread archive: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-Dashboard-stopped-showing-list-of-uploaded-jars-td8053.html#none
          Hide
          StephanEwen Stephan Ewen added a comment -

          The handlers for those actions should catch that error, though, and display a proper message.
          Kind of a nuisance if the web UI stops working because of that...

          Show
          StephanEwen Stephan Ewen added a comment - The handlers for those actions should catch that error, though, and display a proper message. Kind of a nuisance if the web UI stops working because of that...
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user mxm opened a pull request:

          https://github.com/apache/flink/pull/2347

          FLINK-4236 fix error handling for jar files with no main method

          This change shows only entry classes with a valid main method. It
          ignores classes which contain no main method.

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

          $ git pull https://github.com/mxm/flink FLINK-4236

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

          https://github.com/apache/flink/pull/2347.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 #2347


          commit bf066d5c82820cdede614ca6c21e2c1c39e6388d
          Author: Maximilian Michels <mxm@apache.org>
          Date: 2016-08-10T10:08:23Z

          FLINK-4236 fix error handling for jar files with no main method

          This change shows only entry classes with a valid main method. It
          ignores classes which contain no main method.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user mxm opened a pull request: https://github.com/apache/flink/pull/2347 FLINK-4236 fix error handling for jar files with no main method This change shows only entry classes with a valid main method. It ignores classes which contain no main method. You can merge this pull request into a Git repository by running: $ git pull https://github.com/mxm/flink FLINK-4236 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2347.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 #2347 commit bf066d5c82820cdede614ca6c21e2c1c39e6388d Author: Maximilian Michels <mxm@apache.org> Date: 2016-08-10T10:08:23Z FLINK-4236 fix error handling for jar files with no main method This change shows only entry classes with a valid main method. It ignores classes which contain no main method.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zentol commented on the issue:

          https://github.com/apache/flink/pull/2347

          +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user zentol commented on the issue: https://github.com/apache/flink/pull/2347 +1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/2347

          Merging this...

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2347 Merging this...
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/2347

          Actually, not merging. This fails due to checkstyle violations.

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2347 Actually, not merging. This fails due to checkstyle violations.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mxm commented on the issue:

          https://github.com/apache/flink/pull/2347

          Merging this after a Checkstyle fix.

          Show
          githubbot ASF GitHub Bot added a comment - Github user mxm commented on the issue: https://github.com/apache/flink/pull/2347 Merging this after a Checkstyle fix.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/2347

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/2347
          Hide
          mxm Maximilian Michels added a comment -

          master: 726d7c7ff25a4af681bf43abedfac452bceac5d9
          release-1.1: f67cb89d4934d8ebb2d04d3a2c020c9702b99934

          Show
          mxm Maximilian Michels added a comment - master: 726d7c7ff25a4af681bf43abedfac452bceac5d9 release-1.1: f67cb89d4934d8ebb2d04d3a2c020c9702b99934

            People

            • Assignee:
              mxm Maximilian Michels
              Reporter:
              gjy Gary Yao
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development