| Summary: | EAP JSF upgrade breaks jBPM console | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 4 | Reporter: | Julian Coleman <jcoleman> | ||||||||
| Component: | EAP, Build Process | Assignee: | Julian Coleman <jcoleman> | ||||||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||||
| Severity: | urgent | Docs Contact: | |||||||||
| Priority: | urgent | ||||||||||
| Version: | 4.2 CP03 | CC: | simoromag | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | 4.2 CP03 | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| URL: | http://jira.jboss.org/jira/browse/SOA-1052 | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: |
SOA-P 4.2.0 CP03
|
|||||||||
| Last Closed: | 2009-01-12 19:09:09 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Attachments: |
|
||||||||||
The change from JSF 1.1 (EAP 4.3.0 CP02) to JSF 1.2 (EAP 4.3.0 CP03) breaks
compatability. The "selectBooleanCheckbox" "value parameter has changed from
java.lang.String to javax.el.ValueExpression (must evaluate to java.lang.Object).
The fix is to change lines of the form:
<h:selectBooleanCheckbox id="id" value="#{var}"/>
to:
<h:selectBooleanCheckbox id="id" value="#{var == true}"/>
when #{var} is the String "true" or "false".
See:
http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/h/selectBooleanCheckbox.html
http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/selectBooleanCheckbox.html
Fixed in revision 2340 of: build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/t_processinstances.xhtml build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/t_tasks.xhtml Commit message: Modify selectBooleanCheckbox expressions to be JSF 1.2 compatable. Fixes JIRA SOA-1052 Link: Added: This issue is related to JBPM-1885 Link: Added: This issue related JBPAPP-1445 See the attached server.log and screenshot files.
A syntax error is reported to the user in the UI and written to the server.log when a deployed process is started in the jBPM console.
Steps to recreate the error:
* Using bpm_orchestration2 quickstart
* ant deploy
* ant deployProcess
* In the jBPM console, locate the process instance and start it.
This error is displayed and written to the log:
/app/t_processinstances.xhtml @69,88 value="#{filter_running == true}": Illegal Syntax for Set Operation
/app/t_processinstances.xhtml @71,92 value="#{filter_suspended == true}": Illegal Syntax for Set Operation
/app/t_processinstances.xhtml @73,84 value="#{filter_ended == true}": Illegal Syntax for Set Operation
Attachment: Added: server.log Attachment: Added: JSF_jBPM_syntax_error.png This error is coming from the facelets jar (WEB-INF/lib/jsf-facelets.jar) in: .../deploy/jbmp.esb/jbpm-console.jar. The version shipped with jBPM is 1.1.12. Replacing the facelets jar with version 1.1.14 does not change the symptoms. (1.1.14 is meant to be JSF 1.2 compatible.) Putting the JSF 1.1 jars in the jBPM console war causes a deployment error: java.lang.LinkageError: loader constraints violated when linking javax/faces/application/ViewHandler class Presumaly, this is because we now have JSF 1.1 and JSF 1.2 jars and we're loading (incompatible) classes from both. Added test for this bug to: https://svn.corp.jboss.com/repos/soa/trunk/qa/tests/consoles/src/com/jboss/qa/soap/consoles/ConsoleTest.java With a stack trace added to the JSF UIInput class, I see:
2008-12-11 17:08:59,852 ERROR [STDERR] javax.el.PropertyNotWritableException: /app/t_processinstances.xhtml @69,88 value="#{filter_running == true}": Illegal Syntax for Set Operation
2008-12-11 17:08:59,852 ERROR [STDERR] at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:98)
2008-12-11 17:08:59,852 ERROR [STDERR] at javax.faces.component.UIInput.updateModel(Unknown Source)
2008-12-11 17:08:59,852 ERROR [STDERR] at javax.faces.component.UIInput.processUpdates(Unknown Source)
2008-12-11 17:08:59,852 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(Unknown Source)
2008-12-11 17:08:59,853 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(Unknown Source)
2008-12-11 17:08:59,853 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(Unknown Source)
2008-12-11 17:08:59,853 ERROR [STDERR] at javax.faces.component.UIComponentBase.processUpdates(Unknown Source)
2008-12-11 17:08:59,853 ERROR [STDERR] at javax.faces.component.UIViewRoot.processUpdates(Unknown Source)
2008-12-11 17:08:59,853 ERROR [STDERR] at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
2008-12-11 17:08:59,853 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
2008-12-11 17:08:59,853 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
2008-12-11 17:08:59,853 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(Unknown Source)
2008-12-11 17:08:59,853 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2008-12-11 17:08:59,853 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2008-12-11 17:08:59,853 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
2008-12-11 17:08:59,854 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
2008-12-11 17:08:59,855 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2008-12-11 17:08:59,855 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
2008-12-11 17:08:59,855 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
2008-12-11 17:08:59,855 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
2008-12-11 17:08:59,855 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2008-12-11 17:08:59,855 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
how come the jbpm console 'sees' the other jsf version ? i believe you should be able to solve this by making sure that jbpm only sees the jsf version it expects. we don't have the time now to get involved in an upgrade scenario. especially since we don't have anyone that is up to speed on our to-be-replaced JSF console. I think the problem is because the jbpm console war doesn't include a copy of JSF, so it picks up the one from the server. I've tried adding the JSF 1.1 jars to the console war, but run into other problems, probably because two JSF versions are available to the class loader. true is a reserved word in EL and it evaluates to true. So if var is a String then you need to use quotes:
<h:selectBooleanCheckbox id="id" value="#{var == 'true'}"/>
Using the JSF libraries from SOA 4.2 CP02 (EAP 4.3.0 CP01) appears to be a workround for this bug. Now using EAP 4.3.0 CP01 JSF libraries in the SOA 4.2 branch. Revision 2487 of: build-tools/deps/patches/jsf-libs/README build-tools/deps/patches/jsf-libs/jboss-faces.jar build-tools/deps/patches/jsf-libs/jsf-api.jar build-tools/deps/patches/jsf-libs/jsf-impl.jar Commit message: Add jsf libraries from EAP 4.3.0 CP01. Part of the fix for JIRA SOA-1052. Revision 2488 of: build-tools/builders/eap/build.xml build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/t_processinstances.xhtml build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/t_tasks.xhtml Commit message: Patch EAP base with jsf libraries from EAP 4.3.0 CP01. Revert changes to jBPM console xhtml. Part of the fix for JIRA SOA-1052. Link: Added: This issue depends JBPAPP-882 We can't downgrade the JSF libraries, as that will break Seam applications (see JBPAPP-882). So, we need to make the jBPM console work with the newer JSF library. Backed out change to downgrade the JSF libraries in revision 2499 of: build-tools/builders/eap/build.xml (SOA-P-4.2-branch) Commit message: Back out revision 2488 and do not override the EAP JSF libraries. OK, this seems to be the core of the problem and potential solution As mentioned earlier - the datatype for selectBooleanCheckbox's tag value parameter has changed from java.lang.String to javax.el.ValueExpression (must evaluate to java.lang.Object). So the fix was added to replace the string with value expression based on comparison. But the value expression in case on value paramter evaluates to r-value for the page display BUT TO L-VALUE when the postback is executed. And the value expression used as fix CANNOT ACT AS L-VALUE. So I tried 1) Remove the introduced fix from the JSF page 2) Copy only the JSF jar files from SOA-P 4.3 directly to the WAR file WEB-INF/lib directory At least on my box this workaround fixed the issue - at least we can sell my box ;-) This attachment would appear to be a simpler change to the console in order to make it work.
There are three types of changes to the CR5 codebase
- change the selectBooleanCheckbox to use the variable name again,
i.e. #{task_filter_notstarted == true} back to #{task_filter_notstarted}
- change the ga:parameter default initialisation to a boolean
i.e. default="true" becomes default="${true}
- add a boolean converter to the ga:parameter
From what I can tell there are seven variables that need changing
filter_running, filter_suspended, filter_ended, task_filter_running, task_filter_suspended, task_filter_ended and task_filter_notstarted.
The files to change are
app/procdef.xhtml
app/procins.xhtml
app/tasks.xhtml
app/user.xhtml
app/t_processinstances.xhtml
app/t_tasks.xhtml
Initial testing looks good but I would want to verify that all filtering works as expected, just in case something is missed.
Attachment: Added: jbpm-console.war.diff With the changes in jbpm-console.war.diff, the console appears to work correctly (including the filtering flags). You need to add those changes to app/t_tasks_all.xhtml aswell. t_tasks_all.xhtml is not present in this version, it must be a new addition to a later release. Link: Added: This issue related JBPM-1913 Fixed with revision 2505 of: build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/procdef.xhtml build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/procins.xhtml build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/tasks.xhtml build-tools/builders/soa/p-consoles/jbpm/src/main/webapp/app/user.xhtml (SOA-P-4.2-branch) Commit message: Apply fix for JIRA SOA-1052 (from Kevin Conner). verified in CR7 |
Date of First Response: 2008-11-21 08:41:01 project_key: SOA The upgraded JSF libs from EAP 4.3.0 CP03 break the jBPM console. Trying to examine a process (which invokes JSF on procdef.xhtml) gives: ERROR [facelets.viewhandler] Error Rendering View[/app/procdef.xhtml] java.lang.ClassCastException: java.lang.String at javax.faces.component.UISelectBoolean.isSelected(UISelectBoolean.java:106) at com.sun.faces.renderkit.html_basic.CheckboxRenderer.getEndTextToRender(CheckboxRenderer.java:137) ...