Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

Need help!

Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to JSF and trying to learn it by running the example from on tomcat5.0.16
and I received this error in the log file:
2004-03-05 12:54:54 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL:], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL:], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:]]
2004-03-05 12:54:55 StandardContext[/jsfks]StandardWrapper.Throwable
java.lang.NoSuchFieldError: RESTORE_VIEW
at com.sun.faces.lifecycle.LifecycleFactoryImpl.<clinit>(
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(
at javax.faces.FactoryFinder.getImplementationInstance(
at javax.faces.FactoryFinder.getFactory(
at javax.faces.webapp.FacesServlet.init(
at org.apache.catalina.core.StandardWrapper.loadServlet(
at org.apache.catalina.core.StandardWrapper.load(
at org.apache.catalina.core.StandardContext.loadOnStartup(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(
at org.apache.catalina.core.StandardHostDeployer.addChild(
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(
at org.apache.commons.digester.SetNextRule.end(
at org.apache.commons.digester.Rule.end(
at org.apache.commons.digester.Digester.endElement(
at org.apache.catalina.util.CatalinaDigester.endElement(
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(
at org.apache.catalina.core.StandardHostDeployer.install(
at org.apache.catalina.core.StandardHost.install(
at org.apache.catalina.startup.HostConfig.deployDescriptors(
at org.apache.catalina.startup.HostConfig.deployApps(
at org.apache.catalina.startup.HostConfig.start(
at org.apache.catalina.startup.HostConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(
Any ideas?
Thanks in advance!
Ranch Hand
Posts: 15304
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java.lang.NoSuchFieldError: RESTORE_VIEW
I would say this is the key to the error. Problem is, you just gave us the error.
Do you have RESTORE_VIEW anywhere in your code/jsp's? When do you get this error? When tomcat starts? When you try and access the webapp?
Have you verified your webapp code against the tutorials code? Did you make sure you have all the correct JAR files?
Posts: 67595
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now that the JSF book promotion has ended, I'm recommending that futher discussion of JSF take place in the Struts and other frameworks forum. So I'm moving this topic there.
Bob Green
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I received this error when I was starting tomcat. Yes, I believe I have
all the jar files and have verified the code against the tutorial.
If you see anything wrong with the code or the setup, pls. let me know.
Here's the directory structure of the JSF under tomcat:
|->ant - contains build.xml
|->bundle - contains
|->jsfks - contains
|->pages - contains greeting.jsp, index.jsp and inputname.jsp
| |->bundle - contains
| |
| |->jsfks - contains PersonBean.class
|->lib - contains commons-beanutils.jar,commons-collections.jar,commons-digester.jar
commons-logging.jar, jsf-api.jar, jsp-impl.jar, jsf-ri.jar, jstl.jar,
roject name="jsjks" basedir="../" default="deploy">
<!-- Project settings -->
<property name="project.distname" value="jsfks"/>
<!-- define your folder for deployment -->
<property name="deploy.dir" value="deploy"/>

<!-- Local system paths -->
<property file="${basedir}/ant/"/>
<property name="webroot.dir" value="${basedir}/WebContent"/>
<property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
<property name="build.dir" value="build"/>

<!-- classpath -->
<path id="compile.classpath">
<pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
<pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
<pathelement path ="${classpath}"/>
<!-- Check timestamp on files -->
<target name="prepare">
<!-- Copy any resource or configuration files -->
<target name="resources">
<copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
<fileset dir="JavaSource">
<include name="**/*.conf"/>
<include name="**/*.properties"/>
<include name="**/*.xml"/>
<!-- Normal build of application -->
<target name="compile" depends="prepare,resources">
<javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
<classpath refid="compile.classpath"/>
<!-- Remove classes directory for clean build -->
<target name="clean"
description="Prepare for clean build">
<delete dir="${webinf.dir}/classes"/>
<mkdir dir="${webinf.dir}/classes"/>
<!-- Build entire project -->
<target name="build" depends="prepare,compile"/>
<target name="rebuild" depends="clean,prepare,compile"/>
<!-- Create binary distribution -->
<target name="war" depends="build">
<mkdir dir="${build.dir}"/>
<exclude name="WEB-INF/${build.dir}/**"/>
<exclude name="WEB-INF/src/**"/>
<exclude name="WEB-INF/web.xml"/>
<target name="deploy" depends="war">
<delete file="${deploy.dir}/${project.distname}.war"/>
<delete dir="${deploy.dir}/${project.distname}"/>
<copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
inputname_header=JSF KickStart
prompt=Tell us your name:
greeting_text=Welcome to JSF
package jsfks;
public class PersonBean {
String userName;

* @return User Name
public String getUserName() {
return userName;
* @param User Name
public void setUserName(String name) {
userName = name;
<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>
<f:loadBundle basename="bundle.Messages" var="Message"/>
<head> <title>Greeting Page</title> </head>

<h utputText value="#{Message.greeting_text}" />,
<h utputText value="#{PersonBean.userName}" />!
<jsp:forward page="faces/pages/inputname.jsp" />
<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>
<f:loadBundle basename="bundle.Messages" var="Message"/>
<HEAD> <title>Input Name Page</title> </HEAD>
<h1><h utputText value="#{Message.inputname_header}"/></h1>
<h:messages style="color: blue"/>
<h:form id="helloForm">
<h utputText value="#{Message.prompt}"/>
<h:inputText id="userName" value="#{PersonBean.userName}" required="true">
<f:validateLength minimum="2" maximum="10"/>
<h:commandButton id="submit" action="sayhello" value="Say Hello" />
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic