Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 58DFA200BC9 for ; Fri, 21 Oct 2016 11:42:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 57B04160AE0; Fri, 21 Oct 2016 09:42:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7FFB6160AE8 for ; Fri, 21 Oct 2016 11:41:59 +0200 (CEST) Received: (qmail 25274 invoked by uid 500); 21 Oct 2016 09:41:58 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 25253 invoked by uid 99); 21 Oct 2016 09:41:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2016 09:41:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7DB692C0D53 for ; Fri, 21 Oct 2016 09:41:58 +0000 (UTC) Date: Fri, 21 Oct 2016 09:41:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-4824) CliFrontend shows misleading error message when main() method returns before env.execute() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 21 Oct 2016 09:42:00 -0000 [ https://issues.apache.org/jira/browse/FLINK-4824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15594650#comment-15594650 ] ASF GitHub Bot commented on FLINK-4824: --------------------------------------- Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/2662#discussion_r84448442 --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/ProgramParametrizationException.java --- @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.client.program; + +/** + * Exception used to indicate that there is an error in the parametrization of a Flink program. + */ +public class ProgramParametrizationException extends RuntimeException { + /** + * Serial version UID for serialization interoperability. + */ + private static final long serialVersionUID = 909054589029890262L; + + /** + * Creates a ProgramParametrizationException. + */ + public ProgramParametrizationException() { + super(); --- End diff -- I think we should not even allow to skip the message here. This will simplify the code further and display some message for the user. > CliFrontend shows misleading error message when main() method returns before env.execute() > ------------------------------------------------------------------------------------------ > > Key: FLINK-4824 > URL: https://issues.apache.org/jira/browse/FLINK-4824 > Project: Flink > Issue Type: Bug > Components: Client > Affects Versions: 1.2.0 > Reporter: Robert Metzger > Assignee: Greg Hogan > > While testing Flink by running the {{./examples/streaming/SocketWindowWordCount.jar}} example, I got the following error message: > {code} > ./bin/flink run ./examples/streaming/SocketWindowWordCount.jar > Cluster configuration: Standalone cluster with JobManager at /127.0.0.1:6123 > Using address 127.0.0.1:6123 to connect to JobManager. > JobManager web interface address http://127.0.0.1:8081 > Starting execution of program > No port specified. Please run 'SocketWindowWordCount --port ', where port is the address of the text server > To start a simple text server, run 'netcat -l ' and type the input text into the command line > ------------------------------------------------------------ > The program finished with the following exception: > org.apache.flink.client.program.ProgramInvocationException: The program didn't contain Flink jobs. Perhaps you forgot to call execute() on the execution environment. > at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:324) > at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:774) > at org.apache.flink.client.CliFrontend.run(CliFrontend.java:250) > at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:985) > at org.apache.flink.client.CliFrontend$2.run(CliFrontend.java:1032) > at org.apache.flink.client.CliFrontend$2.run(CliFrontend.java:1029) > at org.apache.flink.runtime.security.SecurityContext$1.run(SecurityContext.java:82) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) > at org.apache.flink.runtime.security.SecurityContext.runSecured(SecurityContext.java:79) > at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1029) > {code} > I think the error message is misleading, because I tried executing a valid Flink job. -- This message was sent by Atlassian JIRA (v6.3.4#6332)