ICEfaces
  1. ICEfaces
  2. ICE-1573

spring: conversation lock release exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#4
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 1.6DR4, spring-webflow-1.0.3

      Description


      After configuring sellitem-jsf with the correct set of .jars (including backport-concurrent, fileupload, el-api) fixing unclosed img tags in the source, and mapping all .jsp to PersistentFacesServlet, the following exception is thrown (although the application seems functional):

      java.lang.IllegalMonitorStateException
              at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:125)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1102)
              at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
              at org.springframework.webflow.conversation.impl.JdkConcurrentConversationLock.unlock(JdkConcurrentConversationLock.java:40)
              at org.springframework.webflow.conversation.impl.ContainedConversation.unlock(ContainedConversation.java:104)
              at org.springframework.webflow.execution.repository.support.ConversationBackedFlowExecutionLock.unlock(ConversationBackedFlowExecutionLock.java:58)
              at org.springframework.webflow.executor.jsf.FlowPhaseListener.afterPhase(FlowPhaseListener.java:249)
              at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
              at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:58)
              at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
              at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:19)
              at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
              at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:30)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:53)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
              at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:89)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:53)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:60)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:370)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
              at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
              at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
              at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
              at java.lang.Thread.run(Thread.java:613)

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          The above exception occurs because the _flowExecutionKey is not found. By encoding the key into the form, it is available and the flow can be maintained.

          Further testing with the swf-sellitem-jsf lead to an exception dealing with the insertion of a null value into the database.

          categoryForm.jsp contains the following menu

          <h:selectOneMenu value="#

          {sale.category}

          ">
          <f:selectItem
          itemLabel="None (0.02 discount rate)"
          itemValue=""/>

          ICEfaces (and the Sun RI) convert "" selections to null, but
          MyFaces does not.

          This can be resolved at the application level.

          Show
          Ted Goddard added a comment - The above exception occurs because the _flowExecutionKey is not found. By encoding the key into the form, it is available and the flow can be maintained. Further testing with the swf-sellitem-jsf lead to an exception dealing with the insertion of a null value into the database. categoryForm.jsp contains the following menu <h:selectOneMenu value="# {sale.category} "> <f:selectItem itemLabel="None (0.02 discount rate)" itemValue=""/> ICEfaces (and the Sun RI) convert "" selections to null, but MyFaces does not. This can be resolved at the application level.
          Hide
          Ted Goddard added a comment -

          Spring integration currently makes use of encoding _flowExecutionKey into the form as a hidden field. If this hidden field is cleared the Spring flow is lost.

          Show
          Ted Goddard added a comment - Spring integration currently makes use of encoding _flowExecutionKey into the form as a hidden field. If this hidden field is cleared the Spring flow is lost.
          Hide
          Ted Goddard added a comment -

          The changes to sellitem-jsf are as follows:

          > diff -crb ../sellitem-jsf ../sellitem-icefaces

          Only in ../sellitem-icefaces/lib/global: backport-util-concurrent.jar
          Only in ../sellitem-icefaces/lib/global: commons-fileupload.jar
          Only in ../sellitem-icefaces/lib/global: el-api.jar
          Only in ../sellitem-icefaces/lib/global: icefaces-comps.jar
          Only in ../sellitem-icefaces/lib/global: icefaces.jar
          diff -crb ../sellitem-jsf/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java ../sellitem-icefaces/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java

              • ../sellitem-jsf/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java Thu Apr 19 14:01:24 2007
              • ../sellitem-icefaces/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java Tue Jun 5 17:21:51 2007
                ***************
              • 37,42 ****
              • 37,45 ----

          public void setCategory(String category) {
          this.category = category;
          + if (null == category)

          { + this.category = ""; + }

          }

          public int getItemCount() {
          diff -crb ../sellitem-jsf/src/main/webapp/WEB-INF/web.xml ../sellitem-icefaces/src/main/webapp/WEB-INF/web.xml

              • ../sellitem-jsf/src/main/webapp/WEB-INF/web.xml Thu Apr 19 14:01:24 2007
              • ../sellitem-icefaces/src/main/webapp/WEB-INF/web.xml Tue Jun 5 16:55:04 2007
                ***************
              • 12,17 ****
              • 12,32 ----
                </param-value>
                </context-param>

          + <context-param>
          + <param-name>com.icesoft.faces.standardRequestScope</param-name>
          + <param-value>true</param-value>
          + </context-param>
          +
          + <context-param>
          + <param-name>com.icesoft.faces.synchronousUpdate</param-name>
          + <param-value>true</param-value>
          + </context-param>
          + <context-param>
          + <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
          + <param-value>true</param-value>
          + </context-param>
          +
          +
          <!-- Bootstraps the root Spring Web Application Context, responsible for deploying managed beans
          defined in the configuration files above. These beans represent the services used by the JSF application. -->
          <listener>
          ***************

              • 23,28 ****
              • 38,47 ----
                <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                </listener>

          + <listener>
          + <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
          + </listener>
          +
          <!-- The front controller for the JSF application, responsible for handling all application requests -->
          <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          ***************

              • 30,39 ****
                <load-on-startup>1</load-on-startup>
                </servlet>

          <!-- Map all requests to *.faces to the Faces Servlet for handling -->
          <servlet-mapping>
          ! <servlet-name>Faces Servlet</servlet-name>
          ! <url-pattern>*.faces</url-pattern>
          </servlet-mapping>

          <welcome-file-list>
          — 49,86 ----
          <load-on-startup>1</load-on-startup>
          </servlet>

          + <servlet>
          + <servlet-name>Persistent Faces Servlet</servlet-name>
          + <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
          + <load-on-startup> 1 </load-on-startup>
          + </servlet>
          + <servlet>
          + <servlet-name>Blocking Servlet</servlet-name>
          + <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
          + <load-on-startup> 1 </load-on-startup>
          + </servlet>
          +
          +
          + <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>/xmlhttp/*</url-pattern>
          + </servlet-mapping>
          +
          + <servlet-mapping>
          + <servlet-name>Blocking Servlet</servlet-name>
          + <url-pattern>/block/*</url-pattern>
          + </servlet-mapping>
          +
          +
          <!-- Map all requests to *.faces to the Faces Servlet for handling -->
          <servlet-mapping>
          ! <servlet-name>Persistent Faces Servlet</servlet-name>
          ! <url-pattern>*.jsp</url-pattern>
          </servlet-mapping>

          <welcome-file-list>
          diff -crb ../sellitem-jsf/src/main/webapp/costOverview.jsp ../sellitem-icefaces/src/main/webapp/costOverview.jsp

              • ../sellitem-jsf/src/main/webapp/costOverview.jsp Thu Apr 19 14:01:24 2007
              • ../sellitem-icefaces/src/main/webapp/costOverview.jsp Wed Jun 6 09:33:02 2007
                ***************
              • 30,35 ****
              • 30,36 ----
                </tr>
                <tr class="readOnly">
                <td>Category:</td><td><h:outputText value="# {sale.category}"/></td>
                + </tr>
                <tr class="readOnly">
                <td>Shipping:</td>
                <c:choose>
                ***************
                *** 61,67 ****
                </tr>
                <tr>
                <td colspan="2" class="buttonBar">
                ! <form action="<c:url value="/index.faces"/>">
                <input type="submit" class="button" value="Home">
                </form>
                </td>
                — 62,68 ----
                </tr>
                <tr>
                <td colspan="2" class="buttonBar">
                ! <form action="intro.iface">
                <input type="submit" class="button" value="Home">
                </form>
                </td>
                diff -crb ../sellitem-jsf/src/main/webapp/intro.jsp ../sellitem-icefaces/src/main/webapp/intro.jsp
                *** ../sellitem-jsf/src/main/webapp/intro.jsp Thu Apr 19 14:01:24 2007
                — ../sellitem-icefaces/src/main/webapp/intro.jsp Wed Jun 6 13:03:50 2007
                ***************
                *** 14,20 ****
                </h:form>
                </p>
                <p>
                ! <a href="controller.faces?_flowId=sellitem-flow">Sell Item</A> (launch with a regular anchor tag)
                </p>
                <p>
                This Spring Web Flow sample application is the JSF-based version of the familiar "Sell item" sample.
                — 14,20 ----
                </h:form>
                </p>
                <p>
                ! <a href="controller.iface?_flowId=sellitem-flow">Sell Item</A> (launch with a regular anchor tag)
                </p>
                <p>
                This Spring Web Flow sample application is the JSF-based version of the familiar "Sell item" sample.
                diff -crb ../sellitem-jsf/src/main/webapp/shippingDetailsForm.jsp ../sellitem-icefaces/src/main/webapp/shippingDetailsForm.jsp
                *** ../sellitem-jsf/src/main/webapp/shippingDetailsForm.jsp Thu Apr 19 14:01:24 2007
                — ../sellitem-icefaces/src/main/webapp/shippingDetailsForm.jsp Wed Jun 6 13:00:01 2007
                ***************
                *** 29,34 ****
                — 29,35 ----
                </tr>
                <tr class="readOnly">
                <td>Category:</td><td><h:outputText value="#{sale.category}

                "/></td>
                + </tr>
                <tr class="readOnly">
                <td>Shipping:</td><td><h:outputText value="#

                {sale.shipping}

                "/></td>
                </tr>

          Show
          Ted Goddard added a comment - The changes to sellitem-jsf are as follows: > diff -crb ../sellitem-jsf ../sellitem-icefaces Only in ../sellitem-icefaces/lib/global: backport-util-concurrent.jar Only in ../sellitem-icefaces/lib/global: commons-fileupload.jar Only in ../sellitem-icefaces/lib/global: el-api.jar Only in ../sellitem-icefaces/lib/global: icefaces-comps.jar Only in ../sellitem-icefaces/lib/global: icefaces.jar diff -crb ../sellitem-jsf/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java ../sellitem-icefaces/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java ../sellitem-jsf/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java Thu Apr 19 14:01:24 2007 ../sellitem-icefaces/src/main/java/org/springframework/webflow/samples/sellitem/Sale.java Tue Jun 5 17:21:51 2007 *************** 37,42 **** 37,45 ---- public void setCategory(String category) { this.category = category; + if (null == category) { + this.category = ""; + } } public int getItemCount() { diff -crb ../sellitem-jsf/src/main/webapp/WEB-INF/web.xml ../sellitem-icefaces/src/main/webapp/WEB-INF/web.xml ../sellitem-jsf/src/main/webapp/WEB-INF/web.xml Thu Apr 19 14:01:24 2007 ../sellitem-icefaces/src/main/webapp/WEB-INF/web.xml Tue Jun 5 16:55:04 2007 *************** 12,17 **** 12,32 ---- </param-value> </context-param> + <context-param> + <param-name>com.icesoft.faces.standardRequestScope</param-name> + <param-value>true</param-value> + </context-param> + + <context-param> + <param-name>com.icesoft.faces.synchronousUpdate</param-name> + <param-value>true</param-value> + </context-param> + <context-param> + <param-name>com.icesoft.faces.doJSFStateManagement</param-name> + <param-value>true</param-value> + </context-param> + + <!-- Bootstraps the root Spring Web Application Context, responsible for deploying managed beans defined in the configuration files above. These beans represent the services used by the JSF application. --> <listener> *************** 23,28 **** 38,47 ---- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> + <listener> + <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class> + </listener> + <!-- The front controller for the JSF application, responsible for handling all application requests --> <servlet> <servlet-name>Faces Servlet</servlet-name> *************** 30,39 **** <load-on-startup>1</load-on-startup> </servlet> <!-- Map all requests to *.faces to the Faces Servlet for handling --> <servlet-mapping> ! <servlet-name>Faces Servlet</servlet-name> ! <url-pattern>*.faces</url-pattern> </servlet-mapping> <welcome-file-list> — 49,86 ---- <load-on-startup>1</load-on-startup> </servlet> + <servlet> + <servlet-name>Persistent Faces Servlet</servlet-name> + <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class> + <load-on-startup> 1 </load-on-startup> + </servlet> + <servlet> + <servlet-name>Blocking Servlet</servlet-name> + <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class> + <load-on-startup> 1 </load-on-startup> + </servlet> + + + <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>/xmlhttp/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>Blocking Servlet</servlet-name> + <url-pattern>/block/*</url-pattern> + </servlet-mapping> + + <!-- Map all requests to *.faces to the Faces Servlet for handling --> <servlet-mapping> ! <servlet-name>Persistent Faces Servlet</servlet-name> ! <url-pattern>*.jsp</url-pattern> </servlet-mapping> <welcome-file-list> diff -crb ../sellitem-jsf/src/main/webapp/costOverview.jsp ../sellitem-icefaces/src/main/webapp/costOverview.jsp ../sellitem-jsf/src/main/webapp/costOverview.jsp Thu Apr 19 14:01:24 2007 ../sellitem-icefaces/src/main/webapp/costOverview.jsp Wed Jun 6 09:33:02 2007 *************** 30,35 **** 30,36 ---- </tr> <tr class="readOnly"> <td>Category:</td><td><h:outputText value="# {sale.category}"/></td> + </tr> <tr class="readOnly"> <td>Shipping:</td> <c:choose> *************** *** 61,67 **** </tr> <tr> <td colspan="2" class="buttonBar"> ! <form action="<c:url value="/index.faces"/>"> <input type="submit" class="button" value="Home"> </form> </td> — 62,68 ---- </tr> <tr> <td colspan="2" class="buttonBar"> ! <form action="intro.iface"> <input type="submit" class="button" value="Home"> </form> </td> diff -crb ../sellitem-jsf/src/main/webapp/intro.jsp ../sellitem-icefaces/src/main/webapp/intro.jsp *** ../sellitem-jsf/src/main/webapp/intro.jsp Thu Apr 19 14:01:24 2007 — ../sellitem-icefaces/src/main/webapp/intro.jsp Wed Jun 6 13:03:50 2007 *************** *** 14,20 **** </h:form> </p> <p> ! <a href="controller.faces?_flowId=sellitem-flow">Sell Item</A> (launch with a regular anchor tag) </p> <p> This Spring Web Flow sample application is the JSF-based version of the familiar "Sell item" sample. — 14,20 ---- </h:form> </p> <p> ! <a href="controller.iface?_flowId=sellitem-flow">Sell Item</A> (launch with a regular anchor tag) </p> <p> This Spring Web Flow sample application is the JSF-based version of the familiar "Sell item" sample. diff -crb ../sellitem-jsf/src/main/webapp/shippingDetailsForm.jsp ../sellitem-icefaces/src/main/webapp/shippingDetailsForm.jsp *** ../sellitem-jsf/src/main/webapp/shippingDetailsForm.jsp Thu Apr 19 14:01:24 2007 — ../sellitem-icefaces/src/main/webapp/shippingDetailsForm.jsp Wed Jun 6 13:00:01 2007 *************** *** 29,34 **** — 29,35 ---- </tr> <tr class="readOnly"> <td>Category:</td><td><h:outputText value="#{sale.category} "/></td> + </tr> <tr class="readOnly"> <td>Shipping:</td><td><h:outputText value="# {sale.shipping} "/></td> </tr>
          Hide
          Ted Goddard added a comment -

          Will mark as resolved pending testing with a recent ICEfaces build.

          Show
          Ted Goddard added a comment - Will mark as resolved pending testing with a recent ICEfaces build.
          Hide
          Ted Goddard added a comment -

          Tested ICEfaces 1.6.0.build4 with swf-sellitem.jsf and application functionality is confirmed.

          Show
          Ted Goddard added a comment - Tested ICEfaces 1.6.0.build4 with swf-sellitem.jsf and application functionality is confirmed.

            People

            • Assignee:
              Unassigned
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: