java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

classic Classic list List threaded Threaded
12 messages Options
kadsank kadsank
Reply | Threaded
Open this post in threaded view
|

java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

This post has NOT been accepted by the mailing list yet.
Hi,
   I am using Flink 1.1.4 for real time data streaming. I want to sink the data from Flink cluster to Ignite 2.0.0 cache and for that I am using IgniteSink class. When I try to run the jar file of my application on Flink cluster I get the following error: (I have given the entire error log on the console.) (Also I have included all necessary libraries into my java project and my JRE is 1.8)

Cluster configuration: Standalone cluster with JobManager at /192.168.140.53:6123
Using address 192.168.140.53:6123 to connect to JobManager.
JobManager web interface address http://192.168.140.53:8081
Starting execution of program
[18:01:33]    __________  ________________
[18:01:33]   /  _/ ___/ |/ /  _/_  __/ __/
[18:01:33]  _/ // (7 7    // /  / / / _/
[18:01:33] /___/\___/_/|_/___/ /_/ /___/
[18:01:33]
[18:01:33] ver. 2.0.0-SNAPSHOT#20170110-sha1:ff0caf81
[18:01:33] 2016 Copyright(C) Apache Software Foundation
[18:01:33]
[18:01:33] Ignite documentation: http://ignite.apache.org
[18:01:33]
[18:01:33] Quiet mode.
[18:01:33]   ^-- Logging to file '/opt/apache-ignite-fabric-2.0.0-SNAPSHOT-bin/work/log/ignite-7fd61a37.0.log'
[18:01:33]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[18:01:33]
[18:01:33] OS: Linux 2.6.32-431.el6.x86_64 amd64
[18:01:33] VM information: Java(TM) SE Runtime Environment 1.8.0_71-b15 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.71-b15
[18:01:33] Configured plugins:
[18:01:33]   ^-- None
[18:01:33]
[18:01:34] Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.
[18:01:34] Security status [authentication=off, tls/ssl=off]
[18:01:36] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[18:01:36]
[18:01:36] Ignite node started OK (id=7fd61a37)
[18:01:36] Topology snapshot [ver=11, servers=3, clients=0, CPUs=48, heap=15.0GB]
Submitting job with JobID: 505517a801fb83b3b70e6c79189f1cbc. Waiting for job completion.
Connected to JobManager at Actor[akka.tcp://flink@192.168.140.53:6123/user/jobmanager#214042807]
02/17/2017 18:01:37     Job execution switched to status RUNNING.
02/17/2017 18:01:37     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to SCHEDULED
02/17/2017 18:01:37     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to DEPLOYING
02/17/2017 18:01:37     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to RUNNING
02/17/2017 18:01:37     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to FAILED
java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:184)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)

02/17/2017 18:01:37     Job execution switched to status FAILING.
java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:184)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)
02/17/2017 18:01:37     Job execution switched to status FAILED.

------------------------------------------------------------
 The program finished with the following exception:

org.apache.flink.client.program.ProgramInvocationException: The program execution failed: Job execution failed.
        at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:410)
        at org.apache.flink.client.program.StandaloneClusterClient.submitJob(StandaloneClusterClient.java:95)
        at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:383)
        at org.apache.flink.streaming.api.environment.StreamContextEnvironment.execute(StreamContextEnvironment.java:68)
        at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1429)
        at flink_ignite_sink.main(flink_ignite_sink.java:75)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:510)
        at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:404)
        at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:321)
        at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:777)
        at org.apache.flink.client.CliFrontend.run(CliFrontend.java:253)
        at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1005)
        at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1048)
Caused by: org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
        at org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$8.apply$mcV$sp(JobManager.scala:805)
        at org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$8.apply(JobManager.scala:751)
        at org.apache.flink.runtime.jobmanager.JobManager$$anonfun$handleMessage$1$$anonfun$applyOrElse$8.apply(JobManager.scala:751)
        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:41)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:401)
        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: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:184)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)
[18:01:37] Ignite node stopped OK [uptime=00:00:01:377]


dkarachentsev dkarachentsev
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

Hi,

Check that file in path igniteCfgFile that you pass to IgniteSink constructor is available. If class initialization failed NoClassDefFoundError will be thrown.

Also verify if IgniteSink$SinkContext$Holder.class is present in ignite-flink-2.0.jar.

-Dmitry.
kadsank kadsank
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

This post has NOT been accepted by the mailing list yet.
Hi Dmitry,
   I have checked, the igniteCfgFile is available on the path, the class is also present in the jar. Thanks.
kadsank kadsank
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

This post has NOT been accepted by the mailing list yet.
Here is my configuration file:igniteCfg.xml
dkarachentsev dkarachentsev
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

Is it possible to provide reproducible example?

-Dmitry.
kadsank kadsank
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

This post has NOT been accepted by the mailing list yet.
I have provided the code and the outline of my application is as follows: I read the messages from Kafka cluster and process the messages, extract some data from it like some integers ,strings. Then I am using IgniteSink to sink the data into Ignite cache.

Java Code file: ignite_forum.java

List of jar library I am including: ignite_flink_lib.JPG
dkarachentsev dkarachentsev
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

Hi,

I tried your sample and it works fine to me. In case of initialization error, exception would be thrown on IgniteSink constructor invocation step, but it looks like Holder was successfully intialized, but failed later. Could you please attach logs for provided example?

-Dmitry.
kadsank kadsank
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

This post has NOT been accepted by the mailing list yet.
Please try to run the programe on flink cluster because I think the Static initialization and serialization of object are causing the problem.


Error log:

Cluster configuration: Standalone cluster with JobManager at /192.168.140.53:6123
Using address 192.168.140.53:6123 to connect to JobManager.
JobManager web interface address http://192.168.140.53:8081
Starting execution of program
[10:08:25]    __________  ________________
[10:08:25]   /  _/ ___/ |/ /  _/_  __/ __/
[10:08:25]  _/ // (7 7    // /  / / / _/
[10:08:25] /___/\___/_/|_/___/ /_/ /___/
[10:08:25]
[10:08:25] ver. 2.0.0-SNAPSHOT#20170110-sha1:ff0caf81
[10:08:25] 2016 Copyright(C) Apache Software Foundation
[10:08:25]
[10:08:25] Ignite documentation: http://ignite.apache.org
[10:08:25]
[10:08:25] Quiet mode.
[10:08:25]   ^-- Logging to file '/opt/apache-ignite-fabric-2.0.0-SNAPSHOT-bin/work/log/ignite-5468b9c1.0.log'
[10:08:25]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[10:08:25]
[10:08:25] OS: Linux 2.6.32-431.el6.x86_64 amd64
[10:08:25] VM information: Java(TM) SE Runtime Environment 1.8.0_71-b15 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.71-b15
[10:08:25] Configured plugins:
[10:08:25]   ^-- None
[10:08:25]
[10:08:25] Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.
[10:08:25] Security status [authentication=off, tls/ssl=off]
[10:08:27] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[10:08:27]
[10:08:27] Ignite node started OK (id=5468b9c1)
[10:08:27] Topology snapshot [ver=201, servers=2, clients=0, CPUs=48, heap=28.0GB]
Submitting job with JobID: 2bd79002612254209186cd6aeec8e043. Waiting for job completion.
Connected to JobManager at Actor[akka.tcp://flink@192.168.140.53:6123/user/jobmanager#1956747552]
02/23/2017 10:08:28     Job execution switched to status RUNNING.
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to SCHEDULED
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to DEPLOYING
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to RUNNING
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to FAILED
java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:189)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)

02/23/2017 10:08:28     Job execution switched to status FAILING.
java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:189)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)
02/23/2017 10:08:28     Job execution switched to status FAILED.
[10:08:29] Ignite node stopped OK [uptime=00:00:01:343]

------------------------------------------------------------
 The program finished with the following exception:

java.lang.NullPointerException
        at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:784)
        at org.apache.flink.client.CliFrontend.run(CliFrontend.java:253)
        at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1005)
        at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1048)
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

Hi,

Please properly subscribe to the mailing list so that the community can receive email notifications for your messages. To subscribe, send empty email to user-subscribe@ignite.apache.org and follow simple instructions in the reply.

kadsank wrote
Please try to run the programe on flink cluster because I think the Static initialization and serialization of object are causing the problem.


Error log:

Cluster configuration: Standalone cluster with JobManager at /192.168.140.53:6123
Using address 192.168.140.53:6123 to connect to JobManager.
JobManager web interface address http://192.168.140.53:8081
Starting execution of program
[10:08:25]    __________  ________________
[10:08:25]   /  _/ ___/ |/ /  _/_  __/ __/
[10:08:25]  _/ // (7 7    // /  / / / _/
[10:08:25] /___/\___/_/|_/___/ /_/ /___/
[10:08:25]
[10:08:25] ver. 2.0.0-SNAPSHOT#20170110-sha1:ff0caf81
[10:08:25] 2016 Copyright(C) Apache Software Foundation
[10:08:25]
[10:08:25] Ignite documentation: http://ignite.apache.org
[10:08:25]
[10:08:25] Quiet mode.
[10:08:25]   ^-- Logging to file '/opt/apache-ignite-fabric-2.0.0-SNAPSHOT-bin/work/log/ignite-5468b9c1.0.log'
[10:08:25]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[10:08:25]
[10:08:25] OS: Linux 2.6.32-431.el6.x86_64 amd64
[10:08:25] VM information: Java(TM) SE Runtime Environment 1.8.0_71-b15 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.71-b15
[10:08:25] Configured plugins:
[10:08:25]   ^-- None
[10:08:25]
[10:08:25] Message queue limit is set to 0 which may lead to potential OOMEs when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to message queues growth on sender and receiver sides.
[10:08:25] Security status [authentication=off, tls/ssl=off]
[10:08:27] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[10:08:27]
[10:08:27] Ignite node started OK (id=5468b9c1)
[10:08:27] Topology snapshot [ver=201, servers=2, clients=0, CPUs=48, heap=28.0GB]
Submitting job with JobID: 2bd79002612254209186cd6aeec8e043. Waiting for job completion.
Connected to JobManager at Actor[akka.tcp://flink@192.168.140.53:6123/user/jobmanager#1956747552]
02/23/2017 10:08:28     Job execution switched to status RUNNING.
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to SCHEDULED
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to DEPLOYING
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to RUNNING
02/23/2017 10:08:28     Source: Custom Source -> Flat Map -> Sink: Unnamed(1/1) switched to FAILED
java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:189)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)

02/23/2017 10:08:28     Job execution switched to status FAILING.
java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.getStreamer(IgniteSink.java:201)
        at org.apache.ignite.sink.flink.IgniteSink$SinkContext.access$100(IgniteSink.java:175)
        at org.apache.ignite.sink.flink.IgniteSink.invoke(IgniteSink.java:165)
        at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:39)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:189)
        at flink_ignite_sink$Splitter.flatMap(flink_ignite_sink.java:1)
        at org.apache.flink.streaming.api.operators.StreamFlatMap.processElement(StreamFlatMap.java:48)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:391)
        at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:376)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:366)
        at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:349)
        at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collect(StreamSource.java:161)
        at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecord(AbstractFetcher.java:225)
        at org.apache.flink.streaming.connectors.kafka.internal.Kafka09Fetcher.run(Kafka09Fetcher.java:253)
        at java.lang.Thread.run(Thread.java:745)
02/23/2017 10:08:28     Job execution switched to status FAILED.
[10:08:29] Ignite node stopped OK [uptime=00:00:01:343]

------------------------------------------------------------
 The program finished with the following exception:

java.lang.NullPointerException
        at org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:784)
        at org.apache.flink.client.CliFrontend.run(CliFrontend.java:253)
        at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1005)
        at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1048)
It looks like you don't have all required Ignite libraries on the Flink cluster. Can this be the case?

-Val
kadsank kadsank
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

This post has NOT been accepted by the mailing list yet.
Thanks, But can you suggest the name of missing libraries.
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class org.apache.ignite.sink.flink.IgniteSink$SinkContext$Holder

In reply to this post by kadsank
kadsank wrote
Thanks, But can you suggest the name of missing libraries.
I assume you need ignite-flink module with all its dependencies.

-Val