I am trying to submit spark streaming application through code

```
SparkConf sparkConf= new SparkConf();
JavaStreamingContext jssc = new JavaStreamingContext(master, appName, new Duration(60*1000), sparkHome, sparkJar);

```

Have given obsolute path dor SparkJar and sparkHome `master spark://xyz:7077`

I tried submitting batch processing in the same way and it worked but not working for streaming
i get this following error..

```
14/11/26 17:42:25 INFO spark.HttpFileServer: HTTP File server directory is /var/folders/3j/9hjkw0890sx_qg9yvzlvg64cf5626b/T/spark-cd7b30cd-cf95-4e52-8eb4-1c1dccc2d58f
14/11/26 17:42:25 INFO spark.HttpServer: Starting HTTP Server
14/11/26 17:42:25 INFO server.Server: jetty-8.1.14.v20131031
14/11/26 17:42:25 INFO server.AbstractConnector: Started SocketConnector@0.0.0.0:50016
14/11/26 17:42:25 INFO server.Server: jetty-8.1.14.v20131031
14/11/26 17:42:25 INFO server.AbstractConnector: Started SelectChannelConnector@0.0.0.0:4040
14/11/26 17:42:25 INFO ui.SparkUI: Started SparkUI at http://xxx.xx.xxx.xx:4040
14/11/26 17:42:30 INFO spark.SparkContext: Added JAR /Volumes/Official/workspace/ZBI/target/ZBI-0.0.1-SNAPSHOT-jar-with-dependencies.jar at http://xxx.xx.xxx.xx:50016/jars/ZBI-0.0.1-SNAPSHOT-jar-with-dependencies.jar with timestamp 1417003949988
Exception in thread "main" java.lang.NoClassDefFoundError: **org/apache/spark/ui/SparkUITab**
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    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)

```

I am using maven, the following is my pom.xml

```
<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>BetaTestTool</groupId>
    <artifactId>TestTool</artifactId>
    <packaging>jar</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <description></description>
    <build>
                <plugins>
                        <plugin>
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>3.1</version>
                                <configuration>
                                        <source>1.5</source>
                                        <target>1.5</target>
                                </configuration>
                        </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.1</version>
            </plugin>
              <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id> <!-- this is used for inheritance merges -->
            <phase>package</phase> <!-- bind to the packaging phase -->
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
        </plugins>
    </build>
    <dependencies>
        **<dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>**  
        <dependency> <!-- Spark dependency -->
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_2.10</artifactId>
      <version>1.0.2</version>
    </dependency>
    <dependency> <!-- Spark dependency -->
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-sql_2.10</artifactId>
      <version>1.0.2</version>
    </dependency>
   <!-- <dependency> Spark dependency
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-hive_2.10</artifactId>
      <version>1.0.2</version>
    </dependency> -->

  <dependency> <!-- Spark dependency -->
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-streaming-kafka_2.10</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.5</version>
    </dependency>

    </dependencies>
</project>

```

I got this exception following exception

```
14/11/27 10:43:13 INFO spark.HttpFileServer: HTTP File server directory is /var/folders/3j/9hjkw0890sx_qg9yvzlvg64cf5626b/T/spark-b162a8c1-0d77-48db-b559-2b242449db3e
14/11/27 10:43:13 INFO spark.HttpServer: Starting HTTP Server
14/11/27 10:43:13 INFO server.Server: jetty-8.1.14.v20131031
14/11/27 10:43:13 INFO server.AbstractConnector: Started SocketConnector@0.0.0.0:62675
Exception in thread "main" java.lang.SecurityException: class "javax.servlet.FilterRegistration"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:952)
    at java.lang.ClassLoader.preDefineClass(ClassLoader.java:666)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:794)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

```

Then I commented `javax.servlet` dependancy.. after that I got the first mentioned error.. Please also suggest how to exclude the depandancy.. I tried giving scope as compile and provided but didn't work..

Any Help is much appreciated

My Pom Tree is as follows

```
--- maven-dependency-plugin:2.8:tree (default-cli) @ ZBI ---
[INFO] BetaBI:ZBI:jar:0.0.1-SNAPSHOT
[INFO] \- org.apache.spark:spark-core_2.10:jar:1.0.2:compile
[INFO]    \- org.apache.hadoop:hadoop-client:jar:1.0.4:compile
[INFO]       \- org.apache.hadoop:hadoop-core:jar:1.0.4:compile
[INFO]          \- commons-configuration:commons-configuration:jar:1.6:compile
[INFO]             \- commons-collections:commons-collections:jar:3.2.1:compile

```

How to exclude javax.servlet in the hadoop dependance in core spark?