Hi Chesnay,

Thank you for your reply. Sorry for coming up late.

I follow the maven quickstart. when I run the pom.xml in m2Maven clean way.
Then it gives me this output in console:

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in
[jar:file:/Users/abdullah/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in
[file:/Users/abdullah/eclipse/java-2020-12/Eclipse.app/Contents/Eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in
[jar:file:/Users/abdullah/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in
[file:/Users/abdullah/eclipse/java-2020-12/Eclipse.app/Contents/Eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.

SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]

[INFO] Scanning for projects...

[INFO]

[INFO] ---------------------< org.apache.flink:newinput
>----------------------

[INFO] Building newinput 0.0.1-SNAPSHOT

[INFO] --------------------------------[ jar
]---------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ newinput ---

[INFO] Deleting /Users/abdullah/Documents/newinput/target

[INFO]
------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO]
------------------------------------------------------------------------

[INFO] Total time:  0.281 s

[INFO] Finished at: 2021-03-04T08:10:00-06:00

[INFO]
------------------------------------------------------------------------

and now when I run the code, it shows this error:

Error: Could not find or load main class newinput.count

Caused by: java.lang.ClassNotFoundException: newinput.count

*Question:*
in quickstarts
<https://ci.apache.org/projects/flink/flink-docs-stable/dev/project-configuration.html#maven-quickstart>,
it said in build project section,

You will find a JAR file that contains your application, plus connectors
and libraries that you may have added as dependencies to the application:
target/<artifact-id>-<version>.jar.
If you use a different class than *StreamingJob* as the application’s main
class / entry point, we recommend you change the mainClass setting in the
pom.xml file accordingly.

 I do not Understand the above two lines.

The class name that I used is named "count": so different from a streaming
job.

*Is something I missed due to not understanding those two lines?*

*Thank you!*







On Wed, Mar 3, 2021 at 2:49 PM Chesnay Schepler <ches...@apache.org> wrote:

> The flink-clients dependency is correct.
>
> We will need additional information to debug the Job execution failures,
> because these can happen due to all kind of reasons.
> Things like the full stacktrace, or exceptions from the logging output.
>
> Additionally, I would recommend to base your project on the quickstarts
> <https://ci.apache.org/projects/flink/flink-docs-stable/dev/project-configuration.html#maven-quickstart>
> .
>
> On 3/3/2021 4:55 PM, Abdullah bin Omar wrote:
>
> Hi,
>
> I am running a code (Example Program) from [1], and followed the [2] for
> the dependencies. I used this in the pom.xml:
>
> <project xmlns=*"http://maven.apache.org/POM/4.0.0
> <http://maven.apache.org/POM/4.0.0>"* 
> xmlns:xsi=*"http://www.w3.org/2001/XMLSchema-instance
> <http://www.w3.org/2001/XMLSchema-instance>"* 
> xsi:schemaLocation=*"http://maven.apache.org/POM/4.0.0
> <http://maven.apache.org/POM/4.0.0>
> https://maven.apache.org/xsd/maven-4.0.0.xsd
> <https://maven.apache.org/xsd/maven-4.0.0.xsd>"*>
>
>   <modelVersion>4.0.0</modelVersion>
>
>   <groupId>org.apache.flink </groupId>
>
>   <artifactId>newinput</artifactId>
>
>   <version>0.0.1-SNAPSHOT</version>
>
>
>
>   <dependencies>
>
>   <dependency>
>
> <groupId>org.apache.flink</groupId>
>
>   <artifactId>flink-streaming-java_2.11</artifactId>
>
>   <version>1.12.0</version>
>
>   <scope>provided</scope>
>
> </dependency>
>
>
>
>
> <dependency>
>
>        <groupId>org.slf4j</groupId>
>
>        <artifactId>slf4j-api</artifactId>
>
>        <version>1.7.5</version>
>
>    </dependency>
>
>    <dependency>
>
>        <groupId>org.slf4j</groupId>
>
>        <artifactId>slf4j-log4j12</artifactId>
>
>        <version>1.7.5</version>
>
>    </dependency>
>
> </dependencies>
>
>
> </project>
>
>
>
> I got an error, No Executor Factory Found
>
> After that, I add flink-clients dependencies in the pom.xml
>
> <dependency>
>
> <groupId>org.apache.flink</groupId>
>
>   <artifactId>flink-clients_2.11</artifactId>
>
>           <type>jar</type>
>
>   <version>1.12.0</version>
>
>   <scope>provided</scope>
>
> </dependency>
>
>
> Then the previous error (No Executor Factory Found) was removed. However,
> a new bunch of error appeared (like Job execution failed)
>
> [1]
> https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/datastream/overview/
> [2]
> https://ci.apache.org/projects/flink/flink-docs-stable/dev/project-configuration.html#project-configuration
>
>
> *Questions:*
>
> (1) is the flink-clients dependencies correct?
>
> (2) I just opened a maven project in Eclipse IDE, and am using the
> flink-1.12 version.I used the java code similar to Example Program [1], and
> using the above dependencies in pom.xml
> I am wondering that are those steps correct? or something missing to
> install or add anything in the code/pom.xml?
>
> Thank you
>
> Best Regards,
> Abdullah
>
>
>
>
>

Reply via email to