Details
Description
When attempting to bring up the main page of the attached test app, an exception is thrown in the server logs:
09:08:25,254 ERROR [[Persistent Faces Servlet]] Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.RuntimeException: Failed to append element[tag: html; attributes: ] into #document
at com.icesoft.faces.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:528)
at com.icesoft.faces.context.DOMResponseWriter.startElement(DOMResponseWriter.java:169)
..............
Caused by: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(CoreDocumentImpl.java:419)
The attached test case is a very basic web app. It has the required ICEfaces jar and myFaces jars along with this context param which tells jboss that the war bundles the JSF implementation:
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
09:08:25,254 ERROR [[Persistent Faces Servlet]] Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.RuntimeException: Failed to append element[tag: html; attributes: ] into #document
at com.icesoft.faces.context.DOMResponseWriter.appendToCursor(DOMResponseWriter.java:528)
at com.icesoft.faces.context.DOMResponseWriter.startElement(DOMResponseWriter.java:169)
..............
Caused by: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(CoreDocumentImpl.java:419)
The attached test case is a very basic web app. It has the required ICEfaces jar and myFaces jars along with this context param which tells jboss that the war bundles the JSF implementation:
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
Activity
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P1 |
Ted Goddard
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ted Goddard
made changes -
Fix Version/s | 1.8.1 [ 10170 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18825 | Fri May 01 09:05:13 MDT 2009 | ted.goddard | successful detection of MyFaces disabled JSF1.2 behaviors ( |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ImplementationUtil.java
|
Ken Fyten
made changes -
Assignee Priority | P1 | |
Assignee | Ted Goddard [ ted.goddard ] |
Tyler Johnson
made changes -
Attachment | TestIcefacesMyfaces.war [ 11634 ] |
Tyler Johnson
made changes -
Attachment | TestIcefacesMyfaces.war [ 11628 ] |
Tyler Johnson
made changes -
Attachment | TestIcefacesMyfaces.war [ 11628 ] |
Tyler Johnson
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [50070000008Iz6w] |
Tyler Johnson
created issue -
Candidate fix is to disable JSF12 detection when MyFaces is detected.
Index: src/com/icesoft/faces/webapp/parser/ImplementationUtil.java
===================================================================
— src/com/icesoft/faces/webapp/parser/ImplementationUtil.java (revision 18814)
+++ src/com/icesoft/faces/webapp/parser/ImplementationUtil.java (working copy)
@@ -111,16 +111,6 @@
} catch (ClassNotFoundException e) {
}
catch (ClassNotFoundException e)
{ - }-
-
{ Class.forName(JSF12_MARKER); @@ -144,6 +134,18 @@ }//Test for JSF 1.2
try
try
{ + Class.forName(MYFACES_MARKER); + isMyFaces = true; + //Disable JSF12 detection in MyFaces environment + isJSF12 = false; + }catch (ClassNotFoundException e)
{ + }+
{ + log.trace("JSF-RI: " + isRI + " MyFaces: " + isMyFaces); + }+ if (log.isTraceEnabled())
+
+ try {
javax.faces.component.html.HtmlOutputText comp =
new javax.faces.component.html.HtmlOutputText();
isStockAttributeTracking = isAttributeTracking(comp);