title: Failed to Create Ignite Component when running Apache Ignite on command Line
body: <p>When starting to learn ignite, I ended up using IntelliJ as an IDE and it has been working fine. 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:</p>
  
  <pre><code>/usr/java/jdk1.8.0_91/bin/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
  </code></pre>
  
  <p>However it is failing to create an ignite component with the following error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Looking for other psimilar problems, I've seen that it is because of failure to include ignite-spring in the pom file.  However I have included that. Here is my pom file:</p>
  
  <pre><code>&lt;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"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt;
    &lt;artifactId&gt;my-app&lt;/artifactId&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;my-app&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
        &lt;version&gt;3.5.1&lt;/version&gt;
        &lt;configuration&gt;
         &lt;source&gt;1.8&lt;/source&gt;
         &lt;target&gt;1.8&lt;/target&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.ignite&lt;/groupId&gt;
        &lt;artifactId&gt;ignite-core&lt;/artifactId&gt;
        &lt;version&gt;1.6.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.ignite&lt;/groupId&gt;
        &lt;artifactId&gt;ignite-spring&lt;/artifactId&gt;
        &lt;version&gt;1.6.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.ignite&lt;/groupId&gt;
        &lt;artifactId&gt;ignite-indexing&lt;/artifactId&gt;
        &lt;version&gt;1.6.0&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Where am I going wrong? Has important into the IDE caused something to become inconsistent?  Is my command for running the code incomplete or erroneous?  Thanks for the help.  If needed here are the first lines of my code where the error is occurring: </p>
  
  <pre><code>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&lt;Integer, String[]&gt; cache = ignite.getOrCreateCache("myCacheName");
          ...
          }
       }
  }
  </code></pre>