You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Denis Magda (JIRA)" <ji...@apache.org> on 2017/05/16 18:48:04 UTC

[jira] [Created] (IGNITE-5238) Ignite Spark can't be used with Ignite REST

Denis Magda created IGNITE-5238:
-----------------------------------

             Summary: Ignite Spark can't be used with Ignite REST
                 Key: IGNITE-5238
                 URL: https://issues.apache.org/jira/browse/IGNITE-5238
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Denis Magda
            Priority: Blocker
             Fix For: 2.1


{{ignite-rest-http}} can't be used together with {{ignite-spark}} because the former imports some legacy version of Jackson library and the following exception is thrown from an IDEA in attempt to use Ignite+Spark application:

{code}
Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.apache.spark.SparkContext.withScope(SparkContext.scala:701)
	at org.apache.spark.SparkContext.parallelize(SparkContext.scala:715)
	at org.apache.spark.api.java.JavaSparkContext.parallelizePairs(JavaSparkContext.scala:153)
	at org.apache.spark.api.java.JavaSparkContext.parallelizePairs(JavaSparkContext.scala:158)
	at org.apache.ignite.iot.SparkStreamerStartup.preloadSensorsData(SparkStreamerStartup.java:123)
	at org.apache.ignite.iot.SparkStreamerStartup.main(SparkStreamerStartup.java:96)
	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:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.8.8
	at com.fasterxml.jackson.module.scala.JacksonModule$class.setupModule(JacksonModule.scala:64)
	at com.fasterxml.jackson.module.scala.DefaultScalaModule.setupModule(DefaultScalaModule.scala:19)
	at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:745)
	at org.apache.spark.rdd.RDDOperationScope$.<init>(RDDOperationScope.scala:82)
	at org.apache.spark.rdd.RDDOperationScope$.<clinit>(RDDOperationScope.scala)
	... 11 more
{code}

To reproduce:
- Download this project and open in IntellijIdea: https://github.com/dmagda/IgniteSparkIoT
- Go to pom.xml and uncomment {{ignite-rest-http}} module. It has to be imported.
- Start a cluster node with IgniteNodeStartup
- Start SparkStreamerStartup and you will get the error above.

Looks like the Ignite REST module has to be upgraded to the recent Jackson version.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)