Monthly Archives: January 2016

Eclipse: could not load the Tomcat server configuration

Starting Tomcat7 from Eclipse produced an error:
Could not load the Tomcat server configuration at /usr/share/tomcat7/conf. The configuration may be corrupt or incomplete.

Solution:

Tomcat7 split into different folders by default. Eclipse expects Tomcat to be in one folder. To resolve, we create symbolic links in Tomcat home dir.

Now Eclipse should be able to start Tomcat.

Apache Spark error on start: java.lang.NoClassDefFoundError: org/apache/spark/SparkConf

Starting a simple Spark project in IntelliJ Idea and getting an exception:

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/spark/SparkConf
at …
Caused by: java.lang.ClassNotFoundException: org.apache.spark.SparkConf
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
… 2 more

Solution:

Change Spark dependencies scope from provided to compile in pom.xml