If i run the same code on spark 2.1 i get the following error (same jars in
classpath)

Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.1.0
      /_/

Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java
1.8.0_151)
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.apache.ignite.spark.IgniteDataFrameSettings._
import org.apache.ignite.spark.IgniteDataFrameSettings._

scala>    import org.apache.ignite.spark._
import org.apache.ignite.spark._

scala>
     |    val df =
spark.read.format(FORMAT_IGNITE).option(OPTION_TABLE,"ComplianceSummaryCache.ComplianceSummary").option(OPTION_CONFIG_FILE,"stoxx-server.xml").load()
18/07/18 10:56:10 WARN GenericApplicationContext: Exception encountered
during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.ignite.configuration.IgniteConfiguration#0' defined in
URL [file:/C:/spark_2.1/conf/stoxx-server.xm
org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML
application context (make sure all classes used in Spring configuration are
present at CLASSPATH) [springUrl=file:/C:/spark_2.1/conf/stoxx-server.xml]
  at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:387)
  at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
  at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
  at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:744)
  at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:783)
  at
org.apache.ignite.internal.IgnitionEx.loadConfiguration(IgnitionEx.java:823)
  at
org.apache.ignite.spark.impl.IgniteRelationProvider$$anonfun$configProvider$1$1.apply(IgniteRelationProvider.scala:216)
  at
org.apache.ignite.spark.impl.IgniteRelationProvider$$anonfun$configProvider$1$1.apply(IgniteRelationProvider.scala:213)
  at org.apache.ignite.spark.Once.apply(IgniteContext.scala:222)
  at org.apache.ignite.spark.IgniteContext.ignite(IgniteContext.scala:144)
  at org.apache.ignite.spark.IgniteContext.<init>(IgniteContext.scala:63)
  at org.apache.ignite.spark.IgniteContext$.apply(IgniteContext.scala:192)
  at
org.apache.ignite.spark.impl.IgniteRelationProvider.igniteContext(IgniteRelationProvider.scala:236)
  at
org.apache.ignite.spark.impl.IgniteRelationProvider.createRelation(IgniteRelationProvider.scala:62)
  at
org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:330)
  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:152)
  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:125)
  ... 53 elided
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.ignite.configuration.IgniteConfiguration#0' defined in URL
[file:/C:/spark_2.1/conf/stoxx-server.xml]: Initialization of bean failed;
nested exception is java.lang.NoClassDefFoundError:
javax/cache/configuration/Factory
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
  at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
  at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
  at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
  at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
  at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
  at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
  at
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:381)
  ... 69 more
Caused by: java.lang.NoClassDefFoundError: javax/cache/configuration/Factory
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
  at java.lang.Class.privateGetPublicMethods(Class.java:2902)
  at java.lang.Class.getMethods(Class.java:1615)
  at
org.springframework.beans.ExtendedBeanInfoFactory.supports(ExtendedBeanInfoFactory.java:54)
  at
org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(ExtendedBeanInfoFactory.java:46)
  at
org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:270)
  at
org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:189)
  at
org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:173)
  at
org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler(BeanWrapperImpl.java:226)
  at
org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler(BeanWrapperImpl.java:63)
  at
org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler(AbstractNestablePropertyAccessor.java:739)
  at
org.springframework.beans.AbstractNestablePropertyAccessor.isWritableProperty(AbstractNestablePropertyAccessor.java:571)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1533)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
  ... 78 more



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to