转发:回复: org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot load user class: FlinkStreaming

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

转发:回复: org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot load user class: FlinkStreaming

Lynch Lee
--------- 转发邮件信息 ---------
发件人: [hidden email]
发送日期: 2017年12月16日 17:25
发送至: [hidden email]
主题: 回复: org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot load user class: FlinkStreaming
eh...  seems like you should add some flink scala dependencies and then try it agin, best wish. 

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-scala_{some version}</artifactId>
<version>{some version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-scala_{some version}</artifactId>
<version>{some version}</version>
</dependency>

2017年12月16日 16:45[hidden email] 写道:
And this error happened 

Caused by: org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot load user class:XXX

On Sat, Dec 16, 2017 at 12:13 PM, Soheil Pourbafrani <[hidden email]> wrote:
Yes, it contains.

You know, creating maven executable jar file I can successfully run my code using terminal and flink run command. Now I want to run it from IntelliJ IDE so I create a jar package with all dependencies (not user class is included) and pass it as the ExecutionEnvirnment argument.

On Sat, Dec 16, 2017 at 12:03 PM, Lynch Lee <[hidden email]> wrote:
confirm that whether your runnable jar ball contains this class: org.apache.flink.streaming.runtime.tasks.StreamTaskException . Unzip it and check ?


> On 16 Dec 2017, at 16:19, Soheil Pourbafrani <[hidden email]> wrote:
>
> Hey, I have Flink code passing all its dependencies through ExecutionEnvirnment object. I run my code remotely on cluster and it errors:
>
> Exception in thread "main" org.apache.flink.client.program.ProgramInvocationException: The program execution failed: Job execution failed.
>       at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:478)
>       at org.apache.flink.client.program.StandaloneClusterClient.submitJob(StandaloneClusterClient.java:105)
>       at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:442)
>       at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:434)
>       at org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.executeRemotely(RemoteStreamEnvironment.java:212)
>       at org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.execute(RemoteStreamEnvironment.java:176)
>       at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1499)
>       at FlinkStreaming.main(FlinkStreaming.java:73)
> Caused by: org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
>       at org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$6.apply$mcV$sp(JobManager.scala:933)
>       at org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$6.apply(JobManager.scala:876)
>       at org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$6.apply(JobManager.scala:876)
>       at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
>       at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
>       at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
>       at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
>       at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
>       at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
>       at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
>       at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
> Caused by: org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot load user class: FlinkStreaming$1
> ClassLoader info: URL ClassLoader:
>     file: '/tmp/blobStore-43dad40b-50aa-4ed3-8b74-a2e18fe68d7e/cache/blob_6230eb33398237ad13486b13a67fdfb5a57a5692' (valid JAR)
> Class not resolvable through given classloader.
>       at org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperator(StreamConfig.java:229)
>       at org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:95)
>       at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:230)
>       at org.apache.flink.runtime.taskmanager.Task.run(Task.java:702)
>       at java.lang.Thread.run(Thread.java:748)
>
>
>
>
> The main problem is that it can't find my class FlinkStreaming!!!! I run my code using IDE. When I try running the code using a maven fat jar in terminal, it worked correctly but using the IDE this error happens!
>