Bug 778580 (SOA-1052) - EAP JSF upgrade breaks jBPM console
Summary: EAP JSF upgrade breaks jBPM console
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1052
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: EAP, Build Process
Version: 4.2 CP03
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.2 CP03
Assignee: Julian Coleman
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-21 12:23 UTC by Julian Coleman
Modified: 2009-01-12 19:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
SOA-P 4.2.0 CP03
Last Closed: 2009-01-12 19:09:09 UTC
Type: Bug


Attachments (Terms of Use)
server.log (7.26 MB, text/x-log)
2008-12-05 19:18 UTC, Len DiMaggio
no flags Details
JSF_jBPM_syntax_error.png (142.37 KB, image/png)
2008-12-05 19:18 UTC, Len DiMaggio
no flags Details
jbpm-console.war.diff (11.06 KB, application/octet-stream)
2009-01-07 11:00 UTC, Kevin Conner
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP-1445 0 Major Resolved EAP JSF upgrade breaks jBPM console 2016-08-10 15:07:01 UTC
Red Hat Issue Tracker JBPM-1913 0 Trivial Resolved Support JBoss AS 5.0 for JSF Console 2016-08-10 15:07:01 UTC
Red Hat Issue Tracker SOA-1052 0 Blocker Closed EAP JSF upgrade breaks jBPM console 2016-08-10 15:07:01 UTC

Description Julian Coleman 2008-11-21 12:23:37 UTC
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)
    ...

Comment 1 Mark Little 2008-11-21 13:41:01 UTC
http://jira.rhq-project.org/browse/RHQ-1096

Comment 2 Julian Coleman 2008-11-21 17:36:54 UTC
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

Comment 3 Julian Coleman 2008-11-21 17:49:55 UTC
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


Comment 4 Thomas Diesler 2008-11-24 07:03:46 UTC
Link: Added: This issue is related to JBPM-1885


Comment 5 Julian Coleman 2008-11-24 07:49:47 UTC
Link: Added: This issue related JBPAPP-1445


Comment 6 Len DiMaggio 2008-12-05 19:17:22 UTC
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 


Comment 7 Len DiMaggio 2008-12-05 19:18:53 UTC
Attachment: Added: server.log
Attachment: Added: JSF_jBPM_syntax_error.png


Comment 8 Julian Coleman 2008-12-08 15:21:39 UTC
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.

Comment 9 Julian Coleman 2008-12-09 10:30:09 UTC
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.)

Comment 10 Julian Coleman 2008-12-09 10:37:06 UTC
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.

Comment 12 Julian Coleman 2008-12-11 16:48:17 UTC
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)


Comment 13 Tom Baeyens 2008-12-12 10:40:21 UTC
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.


Comment 14 Julian Coleman 2008-12-12 11:12:42 UTC
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.


Comment 15 Stan Silvert 2008-12-15 16:02:26 UTC
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'}"/> 



Comment 16 Julian Coleman 2008-12-23 11:34:29 UTC
Using the JSF libraries from SOA 4.2 CP02 (EAP 4.3.0 CP01) appears to be a workround for this bug.


Comment 17 Julian Coleman 2008-12-31 10:24:52 UTC
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.


Comment 19 Len DiMaggio 2009-01-06 13:24:49 UTC
Link: Added: This issue depends JBPAPP-882


Comment 20 Julian Coleman 2009-01-06 13:52:59 UTC
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.

Comment 21 Julian Coleman 2009-01-06 15:47:53 UTC
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.


Comment 22 Jiri Pechanec 2009-01-07 08:23:56 UTC
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 ;-)

Comment 23 Kevin Conner 2009-01-07 11:00:34 UTC
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.

Comment 24 Kevin Conner 2009-01-07 11:00:34 UTC
Attachment: Added: jbpm-console.war.diff


Comment 25 Julian Coleman 2009-01-07 12:35:09 UTC
With the changes in jbpm-console.war.diff, the console appears to work correctly (including
the filtering flags).


Comment 26 Heiko Braun 2009-01-07 13:08:05 UTC
You need to add those changes to app/t_tasks_all.xhtml aswell. 

Comment 27 Kevin Conner 2009-01-07 13:12:54 UTC
t_tasks_all.xhtml is not present in this version, it must be a new addition to a later release.

Comment 28 Heiko Braun 2009-01-07 13:30:51 UTC
Link: Added: This issue related JBPM-1913


Comment 29 Julian Coleman 2009-01-07 14:14:37 UTC
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).


Comment 30 Jaroslaw Kijanowski 2009-01-12 19:08:48 UTC
verified in CR7


Note You need to log in before you can comment on or make changes to this bug.