maven - Spring web-flow with JSF ClassNotFoundException issue -
i working on project using spring webflow , jsf. trying accomplish similar booking-faces example of spring webflow https://github.com/springsource/spring-webflow-samples/tree/master/booking-faces. following error while trying execute web-flow.
org/apache/myfaces/renderkit/statecacheutils viewid=/web-inf/flows/main/entersearchcriteria.xhtml location=c:\users\workspace4\.metadata\.plugins\org.eclipse.wst.server.core \tmp1\wtpwebapps\mywebapp\web-inf\flows\main\entersearchcriteria.xhtml phaseid=render_response(6) caused by: java.lang.classnotfoundexception - org.apache.myfaces.renderkit.statecacheutils @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1678)
the full stacktrace is:
java.lang.noclassdeffounderror: org/apache/myfaces/renderkit/statecacheutils @ org.springframework.faces.webflow.myfacesflowresponsestatemanager.getwrappedmyfacesresponsestatemanager(myfacesflowresponsestatemanager.java:66) @ org.springframework.faces.webflow.myfacesflowresponsestatemanager.iswritestateafterrenderviewrequired(myfacesflowresponsestatemanager.java:70) @ org.apache.myfaces.application.viewhandlerimpl.setwritingstate(viewhandlerimpl.java:371) @ org.apache.myfaces.application.viewhandlerimpl.writestate(viewhandlerimpl.java:315) @ javax.faces.application.viewhandlerwrapper.writestate(viewhandlerwrapper.java:65) @ org.apache.myfaces.shared.renderkit.html.htmlformrendererbase.encodeend(htmlformrendererbase.java:220) @ javax.faces.component.uicomponentbase.encodeend(uicomponentbase.java:665) @ org.primefaces.renderkit.corerenderer.renderchild(corerenderer.java:63) @ org.primefaces.renderkit.corerenderer.renderchildren(corerenderer.java:47) @ org.primefaces.component.panel.panelrenderer.encodecontent(panelrenderer.java:202) @ org.primefaces.component.panel.panelrenderer.encodemarkup(panelrenderer.java:119) @ org.primefaces.component.panel.panelrenderer.encodeend(panelrenderer.java:56) @ javax.faces.component.uicomponentbase.encodeend(uicomponentbase.java:665) @ javax.faces.component.uicomponentbase.encodeall(uicomponentbase.java:545) @ javax.faces.component.uicomponentbase.encodeall(uicomponentbase.java:541) @ javax.faces.component.uicomponentbase.encodeall(uicomponentbase.java:541) @ org.apache.myfaces.view.facelets.faceletviewdeclarationlanguage.renderview(faceletviewdeclarationlanguage.java:1981) @ org.apache.myfaces.application.viewhandlerimpl.renderview(viewhandlerimpl.java:285) @ javax.faces.application.viewhandlerwrapper.renderview(viewhandlerwrapper.java:59) @ org.apache.myfaces.lifecycle.renderresponseexecutor.execute(renderresponseexecutor.java:116) @ org.apache.myfaces.lifecycle.lifecycleimpl.render(lifecycleimpl.java:241) @ org.springframework.faces.support.lifecyclewrapper.render(lifecyclewrapper.java:54) @ org.springframework.faces.webflow.jsfview.render(jsfview.java:87) @ org.springframework.webflow.engine.viewstate.render(viewstate.java:293) @ org.springframework.webflow.engine.viewstate.refresh(viewstate.java:242) @ org.springframework.webflow.engine.viewstate.resume(viewstate.java:220) @ org.springframework.webflow.engine.flow.resume(flow.java:537) @ org.springframework.webflow.engine.impl.flowexecutionimpl.resume(flowexecutionimpl.java:259) @ org.springframework.webflow.executor.flowexecutorimpl.resumeexecution(flowexecutorimpl.java:169) @ org.springframework.webflow.mvc.servlet.flowhandleradapter.handle(flowhandleradapter.java:227) @ org.springframework.faces.webflow.jsfflowhandleradapter.handle(jsfflowhandleradapter.java:46) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:925) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:856) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:920) @ org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:816) @ javax.servlet.http.httpservlet.service(httpservlet.java:621) @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:801) @ javax.servlet.http.httpservlet.service(httpservlet.java:722) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:304) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:118) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:84) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:113) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:103) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:113) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:54) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:45) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.www.basicauthenticationfilter.dofilter(basicauthenticationfilter.java:150) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:183) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:105) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:87) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:192) @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:160) @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:259) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:88) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:224) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:169) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:472) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:168) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:100) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:929) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:405) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:964) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:515) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:304) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:722) caused by: java.lang.classnotfoundexception: org.apache.myfaces.renderkit.statecacheutils @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1678) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1523) ... 86 more
i checked answer stackoverflow post: java.lang.classnotfoundexception: org.apache.myfaces.webapp.startupservletcontextlistener . using maven , don't have /web-inf/lib directory. have jsf dependencies on classpath through maven dependencies. not sure, what's going on. thanks
myfaces repackaged statecacheutils in version 2.1.10. spring-webflow not work myfaces 2.1.10 or higher.
i created issue in jira this. maybe fixed in further version.
meanwhile there very very ugly workaround problem:
create class org.apache.myfaces.rederkit.statecacheutils in own project , let inherit new location unsing following code:
package org.apache.myfaces.renderkit; public class statecacheutils extends org.apache.myfaces.application.viewstate.statecacheutils { }
Comments
Post a Comment