Jsp Servlet Exception

I saw some kind of similar answer to this question, perhaps, but I feel that my situation is different. I am developing a spring MVC application that has been working fine so far, that is, I included hadoop api in my project when I included hadoop, this exception started when I try to open the dashboard start page that worked earlier:

java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ 
ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
 org.apache.jsp.ServerInfo_jsp._jspInit(ServerInfo_jsp.java:63)
 org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
 org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:158)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:9

Here's what my hadoop dependency looks like:

<dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
            <version>0.23.1-mr1-cdh4.0.0b2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <version>0.23.1-mr1-cdh4.0.0b2</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>jetty</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

As soon as I add this to my application, it can no longer be used and, naturally, without these dependencies everything works very smoothly. What am I missing here?

+5
source share
2 answers

, , hasoop API , "" API . Hadoop Jetty, , , API .

, Spring MVC Hadoop. hadoop. , , cloudera's. , , javax.servlet, . Jetty:

           <dependency>     
              <groupId>org.apache.hadoop</groupId>
              <artifactId>hadoop-core</artifactId>
              <version>${hadoop.version}</version>
           <exclusions>

          <exclusion>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-util</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jsp-2.1</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jsp-api-2.1</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>servlet-api-2.1</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>tomcat</groupId>
                <artifactId>jasper-compiler</artifactId>
            </exclusion>
            <exclusion>
                <groupId>tomcat</groupId>
                <artifactId>jasper-runtime</artifactId>
            </exclusion>
            <!-- other exclusions snipped for brevity -->
+5

hadoop-core 1.2.1 -. , Paul Sanwald, org.eclipse.jetty:

            <exclusion>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-client</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-plus</artifactId>
            </exclusion>

, , , - Tomcat, JSP . - .

+1

All Articles