IceFaces / JSF CSS parsing problem: Content is not allowed in prolog
I'm having issues with an IceFaces / JSF application. We have an IceFaces InputRichText component that is causing a lot of pain. Sometimes the page containing the component throws this exception and the page loading fails (it becomes all white):
[#|2010-03-18T10:44:40.197+0100|SEVERE|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=14;_ThreadName=httpSSLWorkerThread-80-0;RENDER_RESPONSE 6;/css/fck_editorarea.css;javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@75932728];_RequestID=45f3c97c-5cfc-4f25-a636-e76ec6b346eb;|JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /css/fck_editorarea.css) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@75932728]|#]
[#|2010-03-18T10:44:40.204+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=14;_ThreadName=httpSSLWorkerThread-80-0;_RequestID=45f3c97c-5cfc-4f25-a636-e76ec6b346eb;|StandardWrapperValve[Blocking Servlet]: PWC1406: Servlet.service() for servlet Blocking Servlet threw exception
java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: Error Parsing /css/fck_editorarea.css: Error Traced[line: 1] Content is not allowed in prolog.
at com.icesoft.faces.context.View.servePage(View.java:152)
at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:67)
at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
at com.icesoft.faces.webapp.http.servlet.MainSessionB开发者_如何转开发oundServlet$4.service(MainSessionBoundServlet.java:149)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
.
.
.
Caused by: com.sun.facelets.FaceletException: Error Parsing /css/fck_editorarea.css: Error Traced[line: 1] Content is not allowed in prolog.
at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:239)
Other times the loadin of the page works like a charm. To me it seems that the server for some reason tries to parse the CSS file as XML, which of course is doomed to fail miserably.
I have tried changing the servlet mappings in the web.xml file, as I've read reports on the Internet that it might fix the issue, but to no avail.
The servlet mappings section of the web.xml file is below:
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.iface</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>uploadServlet</servlet-name>
<url-pattern>/uploadHtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
We've also only ever encountered this on our servers (running CentOS and Windows 2k8), never on our dev machines (running XP and Vista). The only differance I can think of is that the servers run 64-bit JDK's.
Any ideas as to what might be going on?
EDIT:
Just noticed this in the server logs:
2010-03-18 07:55:04,914 ERROR com.icesoft.faces.context.View.serve(83) Exception occured during rendering on http://XXX.XXX.XXX.XXX/block/css/fck_editorarea.css [/css/fck_editorarea.css]
javax.faces.FacesException: Problem in renderResponse: Error Parsing /css/fck_editorarea.css: Error Traced[line: 1] Content is not allowed in prolog.
Could it be that the "Blocking Servlet" mapping needs to be changed in some way?
Thanks!
精彩评论