maven + spring mvc 3 + tiles - maven

I am getting the following exception when I use Maven to build spring mvc 3 + tiles example
java.lang.NullPointerException
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:329)
at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(BaseLocaleUrlDefinitionDAO.java:276)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:251)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:222)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:204)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:154)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:123)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:54)
at org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:105)
at org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:364)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:618)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:514)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:619)
I am just following this tutorial here
Please suggest some solution. I think there is some dependency issue but I am not able to find out how to resolve it and which jar is missing.
Thanks

Looking at the digester code, it looks like you are missing SAX parser related libraries. The one used by default is com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl, which is present in Sun Java 1.5 and above.
One possibility is you are using an older java version. Another is you are not using Sun Java.

May be this tutorial i came across might help you.
how to configure maven to use spring with tiles
http://makemyinfo.com/Tutorial.do?action=getTutorial&tutId=T0011.jsp

Related

EAR not working in Weblogic 10.3.6

I'm using Eclipse and when I run the Spring MVC project under Pivotal tc (aka Tomcat), I have an image that is shown correctly (and I can reach its URL), but when I run under Weblogic 10.3.6 the EAR project (which load the Spring MVC project) the image is not showed, and when I try to load directly the image URL (on browser "open in a new window"), I get this error:
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getStatus()I
at org.springframework.web.context.request.ServletWebRequest.checkNotModified(ServletWebRequest.java:176)
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:241)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
The image is under: /resources/images/
I load it through:
<img th:src="#{/resources/images/0-logo.gif}" />
And in the xml I have:
<mvc:annotation-driven/>
<mvc:resources mapping="/resources/**" location="/resources/"/>
Why is the image showed only when I run on tomcat my project Foo, and not when I run under Weblogic the FooEAR? What can I do? Do I need any additional configuration?
Solution:
Downgrading from spring 4.2.0.RELEASE to 3.1.4.RELEASE and thymeleaf from 2.1.3.RELEASE to 2.1.2.RELEASE solved my problem. Read the answer for more details.
HttpServletResponse#getStatus is only added in Servlet 3.0. The issue is caused by an older Servlet implementation supplied by your application server. Check the version of Weblogic then see whether it implements Servlet 3.
Update : According to the information provided, the version of Weblogic you are using is 10.3.6. Looking at this Servlet version support table, you should atleast use Weblogic 12c in order to work with Servlet 3.
I would guess that the problem is with the context root mapping.
Try to add a WebLogic specific deployment descriptor and add the context-root stance.
Try checking the WebLogic deployment descriptor docs for more information on how to do that.

java.lang.NoSuchMethodError while starting JAX-RS service via Spring (servlet) configuration

I have a question. I'm still new to Spring Framework and how to configure a Jetty server with Apache CXF and JAX-RS services there.
I'm working on a Maven multi-module project and my module is just one part of that whole project. It's written in Java. And it uses the Spring Framework with Spring Beans/BeanFactory there. It's configured in an XML file there.
I followed those documentations:
- http://cxf.apache.org/docs/jetty-configuration.html
- http://cxf.apache.org/docs/jax-rs.html#JAX-RS-ConfiguringJAX-RSservices
- http://cxf.apache.org/docs/secure-jax-rs-services.html
The JAX-RS service is running so far already, but it shows me an empty webpage then. It also shows me in a LOG file that the Java classes (with the JAX-RS annotations #GET, #PUT and so on) of the JAX-RS service are running and called already, but as soon as I send a request, I receive the following error message:
27 Apr 2014 20:05:53 (cdmi) [] /
java.lang.NoSuchMethodError: org.eclipse.jetty.server.Request.getConnection()Lorg/eclipse/jetty/server/HttpConnection;
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:222) ~[cxf-rt-transports-http-jetty-2.4.0.jar:2.4.0]
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72) ~[cxf-rt-transports-http-jetty-2.4.0.jar:2.4.0]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.Server.handle(Server.java:370) ~[jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) [jetty-http-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) [jetty-server-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.13.v20130916.jar:8.1.13.v20130916]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.13.v20130916.jar:8.1.13.v20130916]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
Does someone know this error message. What is the error message trying to tell me and how can I solve it?
I'm not sure which further information might be required, but I can add that information if necessary. The dependency for cxf-rt-transports-http-jetty (version 2.4.0) exists in the POM.xml file of my Maven module.
Many thanks in advance!!!
NoSuchMethodError basically means that a class definition has changed between compile time and runtime. This can be caused by using a different version of a jar when running your application than the version things were compiled with.
It looks like sometime between Jetty 8 and 9 the getConnection method was removed from Request. I would check your target folder to make sure you don't have multiple versions of any jars and that the versions you are using are compatible with each other. Also make sure that however you are running Jetty, it's the same version as the libraries your application depends on.
You might also run maven dependency:tree to check that versions in your pom aren't being overridden in unexpected ways.

WebLogic 9.2: java.lang.NoClassDefFoundError: javax/el/ValueExpression

I'm running WebLogic 9.2 on Windows XP Professional.
I'm getting the error(s) below when deploying my "acme" webapp ( acme.war ).
However, I have no problems when deploying the same acme.war to Tomcat 6 or 7.
Between that Googling around I believe the cause may be that weblogic has some outdated libraries.
I would be grateful for help in identifying those libraries and which weblogic directory to deposit them into.
Thanks much in advance.
Error 500--Internal Server Error
java.lang.NoClassDefFoundError: javax/el/ValueExpression
at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:155)
at jsp_servlet._jsp.__header._jsp__tag12(__header.java:610)
at jsp_servlet._jsp.__header._jsp__tag11(__header.java:575)
at jsp_servlet._jsp.__header._jsp__tag2(__header.java:271)
at jsp_servlet._jsp.__header._jspService(__header.java:145)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:530)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:459)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:159)
at jsp_servlet._jsp.__login._jspService(__login.java:77)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:530)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:266)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at gov.noaa.nsd.controller.security.AuthenticationFilter.doFilter(AuthenticationFilter.java:83)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3270)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2019)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1925)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1394)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Your webapp apparently contains JSTL 1.2 libraries. JSTL 1.2 requires Servlet 2.5 / JSP 2.1. The mentioned missing class is part of JSP/EL 2.1. Weblogic 9.2 is however an old Servlet 2.4 / JSP 2.0 container (Tomcat 6 is a Servlet 2.5 container and Tomcat 7 is a Servlet 3.0 one).
In fact, you should be using JSTL 1.1 when deploying to a Servlet 2.4 container. But Weblogic itself as being a "full fledged" Java EE application server already ships with JSTL bundled. So you shouldn't need to bundle any JSTL libraries in your webapp. So to fix this particular problem, you just need to remove the JSTL 1.2 libraries from your webapp (and if applicable, also alter the web.xml to be Servlet 2.4 compliant instead of Servlet 2.5 compliant). The webapp will then use Weblogic's bundled JSTL 1.1.

org/springframework/core/AliasRegistry not found

I have developed demo application using spring struct and hibernate and getting following error while running it.
java.lang.NoClassDefFoundError: org/springframework/core/AliasRegistry
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:78)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:239)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
through google i came to know that problem might be because of some version conflict of spring library
So following is the jar list, i added in my application.
commons-digester-2.0.jar
commons-beanutils-1.7.0.jar
commons-chain-1.2.jar
commons-collections-3.1.jar
spring-core-2.5.jar
javassist.jar
spring-jdbc-2.5.jar
spring-beans-2.5.6.jar
spring-context-2.5.jar
commons-logging-1.1.1.jar
hibernate3.jar
oro-2.0.8.jar
struts2-core-2.3.1.2.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
mysql-connector-java-5.1.13-bin.jar
antlr-2.7.2.jar
struts-tiles-1.3.10.jar
struts-taglib-1.3.10.jar
struts-extras-1.3.10.jar
com.springsource.org.dom4j-1.6.1.jar
commons-validator-1.3.1.jar
xwork-core-2.3.1.2.jar
commons-io-2.0.1.jar
hibernate-commons-annotations-3.2.0.Final.jar
spring-context-support-2.5.jar
spring-orm-2.5.jar
spring-tx-2.5.6.jar
spring-web-2.5.jar
spring-webmvc-struts-2.5.jar
Try to use same version for all Spring dependencies. Now you are using 2.5 and 2.5.6.
The jar file that own AliasRegistry is from spring-core-2.5.jar and from your libraries output, it seem you have that. I have once with mixed version 3 and version 2.5 of spring causing issue. But the exceptions are gone once the correct version are in place.
I have struts1.3 and hibernate, I will comment based on our difference and to see if this give you any help. But with my libraries placed in lib, hibernate works fine though. So here goes,
Get the same version for this.
commons-digester-2.0.jar
commons-beanutils-1.7.0.jar
which version of javassist.jar do you have? I have javassist-3.12.0.GA.jar
spring-beans-2.5.6.jar, try get exact version of spring-beans-2.5.jar
which exact version of hibernate3.jar do you have? I'm using hibernate-core-3.6.4.Final.jar
These are libraries for struts1, are you using these together with struts2?
struts-tiles-1.3.10.jar
struts-taglib-1.3.10.jar
struts-extras-1.3.10.jar
commons-validator-1.3.1.jar
these seem like packages from struts2 which is the one you are using, yes?
struts2-core-2.3.1.2.jar
xwork-core-2.3.1.2.jar
try to get the exact version of spring-tx, that is spring-tx-2.5.jar which is the same with the rest of spring jars.

java.lang.NullPointerException at org.springframework.faces.webflow.FlowViewStateManager.saveView

I started a project with JSF 2.1, Spring 3.0.5, Spring Web Flow 2.3.0 in Tomcat 7.0.22.
When I put SWF JAR files (binding, faces, js, js.resources and webflow) in classpath, I can't to navigate to any page and I get this:
SEVERE: Error Rendering View[/login.xhtml]
java.lang.NullPointerException
at org.springframework.faces.webflow.FlowViewStateManager.saveView(FlowViewStateManager.java:181)
at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) ....
When I delete those JAR files, then all pages will be rendered correctly. How is this caused and how can I solve it?
This is a bug in SWF. See also SWF issue 1461. It's been fixed in SWF 2.3.1. So, upgrading to SWF 2.3.1 should solve this problem.

Resources