Apache Ignite

GridGain Developer Hub - Apache Ignitetm

Welcome to the Apache Ignite developer hub run by GridGain. Here you'll find comprehensive guides and documentation to help you start working with Apache Ignite as quickly as possible, as well as support if you get stuck.

 

GridGain also provides Community Edition which is a distribution of Apache Ignite made available by GridGain. It is the fastest and easiest way to get started with Apache Ignite. The Community Edition is generally more stable than the Apache Ignite release available from the Apache Ignite website and may contain extra bug fixes and features that have not made it yet into the release on the Apache website.

 

Let's jump right in!

 

Documentation     Ask a Question     Download

 

Javadoc     Scaladoc     Examples
Ask A Question

Questions

1

Problems Running Ignite from Command Line

Hey All, When starting to learn ignite, I ended up using IntelliJ as an IDE. However I need to move it over onto a supercomputer environment and need to be able to run it from the command line but am having trouble with my code being able to find the needed classes. I created my project using maven added the proper dependencies as mentioned in the getting started guide. Following that I had maven package the project and used the following command: ```java -cp "${IGNITE_HOME}/modules/core/target/ignite-core-1.6.0.jar:${IGNITE_HOME}/modules/core/target/libs/cache-api-1.0.0.jar:${IGNITE_HOME}/modules/spring/target/ignite-spring-1.6.0.jar:target/my-app-1.0-SNAPSHOT.jar" com.mycompany.app.App``` However it is failing to create an ignite component with the following error: ```Exception in thread "main" class org.apache.ignite.IgniteException: Failed to create Ignite component (consider adding ignite-spring module to classpath) [component=SPRING, cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl] at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:906) at org.apache.ignite.Ignition.start(Ignition.java:350) at com.mycompany.app.App.main(App.java:24) Caused by: class org.apache.ignite.IgniteCheckedException: Failed to create Ignite component (consider adding ignite-spring module to classpath) [component=SPRING, cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl] at org.apache.ignite.internal.IgniteComponentType.componentException(IgniteComponentType.java:313) at org.apache.ignite.internal.IgniteComponentType.create0(IgniteComponentType.java:289) at org.apache.ignite.internal.IgniteComponentType.create(IgniteComponentType.java:200) at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:637) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:840) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:749) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:619) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:589) at org.apache.ignite.Ignition.start(Ignition.java:347) ... 1 more Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.ignite.internal.IgniteComponentType.create0(IgniteComponentType.java:275) ... 8 more Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 11 more``` Looking up other similar problems this occurs from not including the ignite-spring dependency in the pom file which I have done. The following is that file: ```<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>my-app</name> <url>http://maven.apache.org</url> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.apache.ignite</groupId> <artifactId>ignite-core</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>org.apache.ignite</groupId> <artifactId>ignite-spring</artifactId> <version>1.6.0</version> </dependency> <dependency> <groupId>org.apache.ignite</groupId> <artifactId>ignite-indexing</artifactId> <version>1.6.0</version> </dependency> </dependencies> </project>``` Where am I going wrong in this instance. If needed, the following is the beginning of my code where the error is occuring: ```package com.mycompany.app; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; import java.util.StringTokenizer; public class App { public static void main( String[] args ) { printClasspath(); String data; try { data = readFile("tweet.txt"); Ignite ignite = Ignition.start("/ignite-1.6.0/examples/config/example-ignite.xml"); IgniteCache<Integer, String[]> cache = ignite.getOrCreateCache("myCacheName");'''

Posted by Jeremy London 6 months ago

3

Failed to load job class [class=org.apache.ignite.internal.processors.hadoop.v2.HadoopV2Job]

Hi all, I am trying to start a server using the `ignite.sh` script and am getting the above error (failed to load HadoopV2Job). "config/default-config.xml" is being passed to CommandLineStartup and hasn't been changed. Has anyone came across this issue or does anyone know how to fix it? My Ignite version is 1.4.0 and here is the full stack trace: class org.apache.ignite.IgniteException: Failed to start processor: HadoopProcessor [idCtr=0] at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:881) at org.apache.ignite.Ignition.start(Ignition.java:349) at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302) Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start processor: HadoopProcessor [idCtr=0] at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1504) at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:888) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1617) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1484) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:965) at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:892) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:784) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:705) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:576) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:546) at org.apache.ignite.Ignition.start(Ignition.java:346) ... 1 more Caused by: class org.apache.ignite.IgniteCheckedException: Failed to load job class [class=org.apache.ignite.internal.processors.hadoop.v2.HadoopV2Job] at org.apache.ignite.internal.processors.hadoop.jobtracker.HadoopJobTracker.start(HadoopJobTracker.java:167) at org.apache.ignite.internal.processors.hadoop.HadoopProcessor.start(HadoopProcessor.java:103) at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1501) ... 11 more Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.apache.ignite.internal.processors.hadoop.HadoopClassLoader.hasExternalDependencies(HadoopClassLoader.java:288) at org.apache.ignite.internal.processors.hadoop.HadoopClassLoader.loadClass(HadoopClassLoader.java:162) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.apache.ignite.internal.processors.hadoop.jobtracker.HadoopJobTracker.start(HadoopJobTracker.java:163) ... 13 more

Posted by Shane Kinsella about a year ago