Skip to main content

JSF 2 + Can't parse configuration file: faces-config.xml + GF

7 replies [Last post]
sagarr
Offline
Joined: 2009-09-05
Points: 0

Hi All,

I'm new the JSF 2.0 and trying to build a Hello World app. Every time I deployed the app, I get the following exception:

<br />
[#|2010-04-14T15:31:58.219+0530|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=14;_ThreadName=httpWorkerThread-4848-1;_RequestID=8a03f428-3149-4943-8965-134135cf889c;|WebModule[/HelloWorld]PWC1275: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener<br />
javax.faces.FacesException: Can't parse configuration file: jndi:/server/HelloWorld/WEB-INF/faces-config.xml: Error at line 6 column 16: cvc-elt.1: Cannot find the declaration of element 'faces-config'.<br />
	at com.sun.faces.config.ConfigureListener.parse(ConfigureListener.java:1438)<br />
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:376)<br />
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4523)<br />
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:5184)<br />
	at com.sun.enterprise.web.WebModule.start(WebModule.java:326)<br />
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)<br />
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)<br />
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)<br />
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)<br />
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)<br />
	at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)<br />
	at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)<br />
	at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974)<br />
	at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)<br />
	at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)<br />
	at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)<br />
	at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)<br />
	at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)<br />
	at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)<br />
	at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)<br />
	at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)<br />
	at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)<br />
	at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)<br />
	at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)<br />
	at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
	at java.lang.reflect.Method.invoke(Method.java:597)<br />
	at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)<br />
	at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)<br />
	at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)<br />
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)<br />
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)<br />
	at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
	at java.lang.reflect.Method.invoke(Method.java:597)<br />
	at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)<br />
	at $Proxy1.invoke(Unknown Source)<br />
	at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)<br />
	at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)<br />
	at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)<br />
	at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)<br />
	at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)<br />
	at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)<br />
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)<br />
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)<br />
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)<br />
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)<br />
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)<br />
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)<br />
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)<br />
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)<br />
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)<br />
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)<br />
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)<br />
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)<br />
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)<br />
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)<br />
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)<br />
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)<br />
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)<br />
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)<br />
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)<br />
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)<br />
	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)<br />
	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)<br />
	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)<br />
	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)<br />
	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)<br />
	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)<br />
	at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)<br />
	at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)<br />
|#]</p>
<p>[#|2010-04-14T15:31:58.219+0530|SEVERE|sun-appserver9.1|org.apache.catalina.core.StandardContext|_ThreadID=14;_ThreadName=httpWorkerThread-4848-1;_RequestID=8a03f428-3149-4943-8965-134135cf889c;|PWC1306: Startup of context /HelloWorld failed due to previous errors|#]<br />

And here is my faces-config.xml file
<br />
<?xml version="1.0"?></p>
<p>

Any kind of help, pointers will be greatly appreciated.
Thank you

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
edburns
Offline
Joined: 2004-02-11
Points: 0

Any word on this thread? Can you please zip up the example?

Thanks,

Ed

dxxvi
Offline
Joined: 2006-07-24
Points: 0

I have the same problem.

jdlee
Offline
Joined: 2006-01-25
Points: 0

Are you bundling an XML parser with your app? I've seen bundled parsers pose problems with Mojarra and GlassFish. GlassFish bundles an XML parser, so there shouldn't be a need to ship one with your app.

sagarr
Offline
Joined: 2009-09-05
Points: 0

No. No bundled parser. I'm trying single JSP page "Hello World" so no question of adding another jar/libs.

Edward Burns

On 5/3/10 12:46 , webtier@javadesktop.org wrote:
> No. No bundled parser. I'm trying single JSP page "Hello World" so no question of adding another jar/libs.

Can you perhaps zip up your example and send a pointer to it?

Ed

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

rogerk
Offline
Joined: 2004-05-06
Points: 0

The declaration looks valid to me. Are you using a tool?

sagarr
Offline
Joined: 2009-09-05
Points: 0

Tool?
I use Eclipse and validate my XML before deploying the app.