1 Reply Latest reply on Aug 14, 2009 5:21 PM by Arbi Sookazian

    java.lang.IllegalStateException: could not acquire lock on @Synchronized component: xyzCtrl

    Andreas Riedel Newbie
      Hello Forum.

      I've googled different request and responses on this error, but nothing occur on my problem.

      I now very well, when it happens. The reason is, in the controller is an method which makes, in a very few cause, very long time. Mostly it takes only a few millis. The Sychronisation timeout is set to 30000 millis. What happens:

      From the browser comes an second call, while the first one is running. This second call ends up in the @Synchronisation timeout. Now, anytime, the first call ended.

      What happens in the frontend:
      An Error Occurred:
      javax.el.ELException: /invoice/invoice.xhtml @68,81 value="#{invoiceCtrl.invoiceDataModel()}": java.lang.IllegalStateException: could not acquire lock on @Synchronized component: invoiceCtrl
      +- Stack Trace
      +- Scoped Variables

      It is useless to configure pages.xml with:
        <exception class="java.lang.IllegalStateException">
          <redirect view-id="....">

      Don't know why, maybe i should catch javax.el.ELException, but this error occur may different places, so it is not useful to catch it by an global directive.

      I try in components.xml
      <core:manager conversation-timeout="3600000" concurrent-request-timeout="15000" conversation-id-parameter="cid" />
      hoping, that the second call will be skipped before the @Synchronization fails, but this takes also no effect, or even not what I'm waiting for.

      Does anyone knows what to do. I want, that the second call takes no effect, destroy the first one result.

        Andreas Riedel