java - AWS ec2 instance running tomcat 8 gives error: getDispatcherType() is undefined for the type HttpServletRequest -
getdispatchertype() undefined type httpservletrequest when deploying aws ec2 instance running tomcat 8 using beanstalk. same webapp works when deployed on localhost on machine.
the project runs when deployed on localhost in machine gives error when deployed on aws using beanstalk. using eclipse aws java toolkit.
- i have used javax.servlet-api version 3.0.1 scope provided.
- i have removed maven dependencies on servlet-api 2.5.
- the webapp runs on localhost in machine.
- i downloaded zip of uploaded package aws , contains javax.servlet-api 3.0.1 , no other version of it.
here stacktrace.
org.apache.jasper.jasperexception: unable compile class jsp: error occurred @ line: [82] in generated java file: [/usr/share/tomcat8/work/catalina/localhost/root/org/apache/jsp/web_002dinf/jsp/login_jsp.java] method getdispatchertype() undefined type httpservletrequest stacktrace: org.apache.jasper.compiler.defaulterrorhandler.javacerror(defaulterrorhandler.java:102) org.apache.jasper.compiler.errordispatcher.javacerror(errordispatcher.java:198) org.apache.jasper.compiler.jdtcompiler.generateclass(jdtcompiler.java:450) org.apache.jasper.compiler.compiler.compile(compiler.java:361) org.apache.jasper.compiler.compiler.compile(compiler.java:336) org.apache.jasper.compiler.compiler.compile(compiler.java:323) org.apache.jasper.jspcompilationcontext.compile(jspcompilationcontext.java:570) org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:356) org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:396) org.apache.jasper.servlet.jspservlet.service(jspservlet.java:340) javax.servlet.http.httpservlet.service(httpservlet.java:725) org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52) org.springframework.web.servlet.view.internalresourceview.rendermergedoutputmodel(internalresourceview.java:209) org.springframework.web.servlet.view.abstractview.render(abstractview.java:266) org.springframework.web.servlet.dispatcherservlet.render(dispatcherservlet.java:1225) org.springframework.web.servlet.dispatcherservlet.processdispatchresult(dispatcherservlet.java:1012) org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:959) org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:876) org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:961) org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:852) javax.servlet.http.httpservlet.service(httpservlet.java:618) org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:837) javax.servlet.http.httpservlet.service(httpservlet.java:725) org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:316) org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:126) org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:90) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:114) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:122) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:111) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:168) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:48) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:205) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:120) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.csrf.csrffilter.dofilterinternal(csrffilter.java:96) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:108) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:64) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:108) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:91) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:53) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:108) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:213) org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:176) org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:344) org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:261)
this pom.xml file dependecies:
<properties> <spring.version>4.0.1.release</spring.version> <spring.security.version>4.0.1.release</spring.security.version> </properties> <dependencies> <dependency> <groupid>com.microsoft.azure</groupid> <artifactid>azure-documentdb</artifactid> <version>1.0.0</version> </dependency> <dependency> <groupid>com.google.code.gson</groupid> <artifactid>gson</artifactid> <version>2.3.1</version> </dependency> <dependency> <groupid>javax.mail</groupid> <artifactid>mail</artifactid> <version>1.4.7</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>javax.servlet-api</artifactid> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupid>javax.servlet.jsp.jstl</groupid> <artifactid>jstl-api</artifactid> <version>1.2-rev-1</version> <exclusions> <exclusion> <artifactid>servlet-api</artifactid> <groupid>javax.servlet</groupid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.glassfish.web</groupid> <artifactid>jstl-impl</artifactid> <version>1.2</version> <exclusions> <exclusion> <artifactid>servlet-api</artifactid> <groupid>javax.servlet</groupid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> <version>1.7.12</version> </dependency> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> <version>1.7.12</version> </dependency> <dependency> <groupid>org.projectlombok</groupid> <artifactid>lombok</artifactid> <version>1.16.4</version> <scope>provided</scope> </dependency> <!-- spring dependencies --> <!-- spring 3 dependencies --> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>${spring.version}</version> <exclusions> <exclusion> <groupid>commons-logging</groupid> <artifactid>commons-logging</artifactid> </exclusion> </exclusions> </dependency> <!-- spring mvc --> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-webmvc</artifactid> <version>${spring.version}</version> </dependency> <!-- spring + aspects --> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-aspects</artifactid> <version>${spring.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-web</artifactid> <version>${spring.version}</version> </dependency> <!-- spring security --> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-web</artifactid> <version>${spring.security.version}</version> </dependency> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-config</artifactid> <version>${spring.security.version}</version> </dependency> <!-- spring security jsp taglib --> <dependency> <groupid>org.springframework.security</groupid> <artifactid>spring-security-taglibs</artifactid> <version>${spring.security.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-tx</artifactid> <version>4.0.1.release</version> </dependency> <!-- aws dependecies excluding spring --> <dependency> <groupid>com.amazonaws</groupid> <artifactid>aws-java-sdk</artifactid> <version>1.9.39</version> </dependency>
what missing?
Comments
Post a Comment