Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1701

@PreDestroy method throw WELD-000019 exception

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 2.2.2.Final
    • Fix Version/s: 2.2.3.Final
    • Component/s: Conversations, Events
    • Labels:
      None
    • Environment:

      Tomcat 7.0.54, WELD-Servlet 2.2.2.Final.

      Description

      My Conversation Scoped Bean has a @PreDestroy method, this method try to check another conversation scoped bean.
      This works fine in normal case, but when the session timeout. it close the all the scope context, it will cause the method error:

      java.lang.IllegalStateException: WELD-000333: Must call associate() before calling activate()
      at org.jboss.weld.servlet.ConversationContextActivator.determineConversationId(ConversationContextActivator.java:180)
      at org.jboss.weld.context.http.LazyHttpConversationContextImpl.checkContextInitialized(LazyHttpConversationContextImpl.java:93)
      at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:74)
      at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:114)
      at org.jboss.weld.context.PassivatingContextWrapper$AbstractPassivatingContextWrapper.get(PassivatingContextWrapper.java:70)
      at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:81)
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:78)
      at com.cgi.horizon.financial.model.HorizonFinancialContext$Proxy$_$$_WeldClientProxy.getCheques(Unknown Source)
      at com.cgi.horizon.financial.service.HorizonChequeService.release(HorizonChequeService.java:199)

      And WELD swallowed the real exception, spit out a WELD-000019 error.
      Is this designed behavior or a bug?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mkouba Martin Kouba
                Reporter:
                wangliyu Wang Liyu
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: