Getting errors when starting tomcat - spring

My project is a dynamic web project,not maven project.
It gets errors when startting tomcat:
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/springmvc]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2499)
at java.lang.Class.getDeclaredFields(Class.java:1811)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
I think it's caused by web.xml,codes below:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:WebContent/WEB-INF/spring-mybatis.xml</param-value>
</context-param>
<!-- Spring MVC servlet -->
<servlet>
<servlet-name>SpringMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:WebContent/WEB-INF/spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
I have googled before,most of them dont configure context-param and servlet,but I have configured them.And I have added jar files in lib.
This is my file structure:
-WEB-INF
--spring-mvc.xml
--spring-mybatis.xml
--web.xml
Are there someting wrongs with the contextConfigLocation?I also tried /WEB-INF/spring-mybatis.xml,but it not worked.

Recommended Options
Use Maven/Gradle project to build your project in your IDE and let them to take care of your dependencies.
When you are using spring framework it is always recommended to use Bill of Materials to avoid ClassNotFound exception.
Spring-boot is very popular, if you wish you can choose that option too to avoid XML configurations.

I think you are mission some jar to be added please make sure that you have below jars added... According to spring-webmvc 3.1.2 need following jar: I have given the same answer earlier so refer the below jar
aopalliance-1.0.jar
commons-logging-1.1.1.jar
spring-webmvc-3.1.2.RELEASE.jar
spring-asm-3.1.2.RELEASE.jar
spring-beans-3.1.2.RELEASE.jar
spring-core-3.1.2.RELEASE.jar
spring-context-3.1.2.RELEASE.jar
spring-aop-3.1.2.RELEASE.jar
spring-expression-3.1.2.RELEASE.jar
spring-context-support-3.1.2.RELEASE.jar
spring-web-3.1.2.RELEASE.jar

Related

Issue with name appServlet-servlet.xml

Hi guys I'm working with Spring 3.2.3, hibernate 4.2.2 and org.springframework.security 3.0.5. Before I start working with security in spring, my context file was called servlet-context.xml and everything worked fine. Since I start using org.springframework.security 3.0.5 when I try to run my application I get the error:
java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/appServlet-servlet.xml]
My web.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- Spring MVC -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/servlet-context.xml,
/WEB-INF/spring-security.xml
</param-value>
</context-param>
<!-- Spring Security -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Notice that I'm specifying my servlet-context.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/servlet-context.xml,
/WEB-INF/spring-security.xml
</param-value>
</context-param>
If I leave my web.xml just like this and copy/paste my servlet-context.xml content in a new file called appServlet-servlet.xml, everything works fine. This is confusing for me since I told web.xml that my context file name was servlet-context.xml. Am I forced to call my context file as appServlet-servlet.xml??. Of course, if I delete servlet-context.xml and leave appServlet-servlet.xml making the specficiation in web.xml, works fine.
I just wanna know if is obligatory to call my context file as appServlet-servlet.xml if I want to use spring security in my app.
This is not strange. Spring works this way. Since your DispatchServlet name is appServlet, Spring automatically tries to find the servlet context that has the same name, here "appServlet-servlet.xml".
Here is a page that may help : http://syntx.io/difference-between-loading-context-via-dispatcherservlet-and-contextloaderlistener/

Error Parsing /index.xhtml: not supported setting property http://xml.org/sax/properties/lexical-handler

I am trying to build a project using JSF, JPA, Spring, but I am not able to succeed. I am using JBoss as my server. It shows no error, but shows 404 error. Interesting thing is that when I use Tomcat, then the console is clear, but on loading page it shows,
Error Parsing /index.xhtml: not supported setting property http://xml.org/sax/properties/lexical-handler
Here's the complete stack trace
javax.faces.view.facelets.FaceletException: Error Parsing /index.xhtml: not supported setting property http://xml.org/sax/properties/lexical-handler
at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:425)
at com.sun.faces.facelets.compiler.SAXCompiler.doMetadataCompile(SAXCompiler.java:408)
at com.sun.faces.facelets.compiler.Compiler.metadataCompile(Compiler.java:130)
at com.sun.faces.facelets.impl.DefaultFaceletFactory.createMetadataFacelet(DefaultFaceletFactory.java:327)
at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$200(DefaultFaceletFactory.java:93)
at com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:166)
at com.sun.faces.facelets.impl.DefaultFaceletFactory$2.newInstance(DefaultFaceletFactory.java:164)
at com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:94)
at com.sun.faces.facelets.impl.DefaultFaceletCache$2.newInstance(DefaultFaceletCache.java:89)
at com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
at com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:143)
at com.sun.faces.facelets.impl.DefaultFaceletCache.getViewMetadataFacelet(DefaultFaceletCache.java:62)
at com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:260)
at com.sun.faces.facelets.impl.DefaultFaceletFactory.getMetadataFacelet(DefaultFaceletFactory.java:209)
at com.sun.faces.application.view.ViewMetadataImpl.createMetadataView(ViewMetadataImpl.java:114)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:233)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Jsf_Spring_Jpa</display-name>
<!-- Welcome Page -->
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<!-- JSF Servlet is defined to container -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Mapping with servlet and url for the http requests. -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<!-- Spring Context Configuration' s Path definition -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value> /WEB-INF/applicationContext.xml</param-value>
</context-param>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<!-- Project Stage Level -->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- The Bootstrap listener to start up and shut down Spring's root WebApplicationContext. It is registered to Servlet Container -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
</web-app>
How is this caused and how can I solve it?
This error comes from pull-parser which is an optional dependency of dom4j. You might be inadvertently getting pull-parser on your classpath even though it's optional for dom4j. Try explicitly excluding it and using your JDK's built-in parser instead (e.g. com.sun.org.apache.xerces.internal.parsers.SAXParser) which it should do by default then.
This question is 6 years old, so the following cannot have been the problem, but: in my Gradle project upgrading from Gradle 5.4 to Gradle 6.5 suddenly resulted in pull-parser being on the classpath because of a dependency on dom4j even though, as mentioned, the dependency of dom4j on pull-parser is optional and previously that wasn't happening. I've reported this to the Gradle project: https://github.com/gradle/gradle/issues/13656.
I get rid of the error by adding following dependency (in Gradle syntax):
implementation 'pull-parser:pull-parser:2.1.10'

java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?

This the file web.xml in WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<filter>
<filter-name>LoginFilter</filter-name>
<filter-class>glpi.filter.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>/index.jsp</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>/login.jsp</welcome-file>
</welcome-file-list>
</web-app>
I think you are missing the context loader listener(to pick your spring context file(s)).
Add this to your web.xml
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
You could also check out the Initial web configuration section # http://static.springsource.org/spring/docs/2.0.x/reference/beans.html
You have both ContextLoaderServlet and DispatcherServlet set to load-on-startup = 1. That means either one of them could start first, and you need the ContextLoaderServlet to start first, since that's what creates the root WebApplicationContext that your error says is missing. So leave ContextLoaderServlet's load-on-startup at 1, and change the DispatcherServlet's to 2 or higher.
Actually, it's preferred to use ContextLoaderListener instead of the Servlet unless you're on a really old container where the Listener doesn't work properly.
Add following code in web.xml file, bcs it looks for contex to load so we have to declare it initially.
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/HelloWeb-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
I've recently stumbled upon the same issue, and I knew for sure it couldn't be caused by misconfiguration because I've copied the entire working Tomcat installation from another machine. Yet I kept getting the same exception:
java.lang.IllegalStateException: No WebApplicationContext found: not in a DispatcherServlet request and no ContextLoaderListener registered?
As I've eventually figured out, it was a wrong JVM version that broke the application: this one used Java 7, whereas the working instance (and the webapp) was on Java 8.
Hope it helps someone struggling with this counter-intuitive error message.

Undeployed application at context path

i'm facing an error while trying to run my application, here is the error:
OK - Undeployed application at context path /gest_project In-place
deployment at C:\Users......\target\gest_project Deployment is in
progress...
deploy?config=file%3A%2FC%3A%2FUsers%2Fnadya%2FAppData%2FLocal%2FTemp%2Fcontext1123098247565520222.xml&path=/gest_project
FAIL - Deployed application at context path /gest_project but context
failed to start The module has not been deployed. at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:167)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:123)
at
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:208)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
on tomcat log i have this:
GRAVE: Error listenerStart 11 sept. 2011 23:37:04
org.apache.catalina.core.StandardContext startInternal GRAVE:Error
Starting context [/ gest_project] following previous errors
here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<!--Upload Filters-->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!--End Upload Filters-->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- Theme Aristo -->
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>start</param-value>
</context-param>
<!-- FIN -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/admin-direction.xhtml</welcome-file>
</welcome-file-list>
<!-- Add Support for Spring -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:application-context.xml</param-value>
</context-param>
<!-- JSF mapping -->
<!-- Map these files with JSF -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
thanks a lot
(Not an answer)
Your errors are pretty generic and could be caused by lots of different problems in many other places apart from your web.xml. (The application-context, missing libraries, etc...)
You'll have to dig deeper (other files or look below in the same files) to find an error with more relevant information.
Try to find whether your application is up and running without any errors when you start the server. With that you eliminate any server configuration and dependency issues.
To do that:
1) Stop your tomcat server. Clean/Backup all log files.
2) If 'manager' app is not enabled, then try to enable it.
3) Start the tomcat server. Observe the start up logs for any errors.
4) If every thing is fine in the logs, then go to app manager 'http://localhost:8080/manager/'
to check whether your app is up and running (started) mode.
5) Now try to access the page or URL.
with this you could pin point the possible areas of error.
Problem could be also caused by lack of permissions. In my case I gave permissions (to everyone full access, because I'm not sure to who exactly give them) to folder containing Tomcat. This solved my problem.

Error 500: Filter [Spring OpenEntityManagerInViewFilter]: could not be loaded

I am trying to deploy a Spring application on WAS 6.0 (JDK 1.4.2). Day back I was getting tons of (Unsupported major.minor version 49.0) errors. I replaced most of the jar files and now I am left with only one error on:
org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter (Unsupported major.minor version 49.0)
what jar file do I need to replace for this? Also when I am running my URL in the browser I am getting the error:
Error 500: Filter [Spring OpenEntityManagerInViewFilter]: could not be loaded
Can you please guide me ,where exactly I am doing wrong. Attached is my Web.xml.
Your help is highly appreciated.
enter code here
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
analytics
Roo generated analytics application
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>analytics.root</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<context-param>
log4jConfigLocation
classpath:log4j.properties
org.springframework.web.util.Log4jConfigListener
org.springframework.web.context.ContextLoaderListener
<servlet>
<servlet-name>analytics</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Serves static resource content from .jar files such as spring-js.jar -->
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>analytics</servlet-name>
<url-pattern>/*.html</url-pattern>
</servlet-mapping>
<!-- Map all /resources requests to the Resource Servlet for handling -->
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/resources/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>httpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>httpMethodFilter</filter-name>
<servlet-name>analytics</servlet-name>
</filter-mapping>
<filter>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
</filter>
Spring OpenEntityManagerInViewFilter
/*
<session-config>
<session-timeout>10</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/WEB-INF/jsp/uncaughtException.jsp</location>
</error-page>
The "Unsupported major.minor version" errors are caused by your using JAR files compiled for a higher version of java than you're running.
I think class file version 49.0 is Java 5, and you're running 1.4. That means you must be using a library that's Java 5 only, and the only version of Spring thats java 5 only is Spring 3.0. If that's the case, then downgrade your Spring to 2.5.6.

Resources