7 Replies Latest reply on May 7, 2015 2:44 AM by Martin Kouba

    WELD-000321: No conversation found to restore for id 1

    Emily Jiang Newbie

      I am hitting the following error when switching from long-running coversation to a transient coversation. Anyone knows what is the possible cause for this? I also see in the trace that the coversation is null. Do I need to handle serialization for the classes in the package of org.jboss.weld.context.conversation?

       

      [4/23/15 10:36:44:720 EDT] 00000077 id= org.jboss.weld.context.beanstore.AttributeBeanStore 2 get WELD-000200: Looked for WELD%AbstractSyntheticBean%93b8df62-20f0-4e7f-9ee4-624f53128d8d#93b8df62-20f0-4e7f-9ee4-624f53128d8d.war%Conversation and got null in org.jboss.weld.context.beanstore.http.RequestBeanStore@e9a9a649


       

      E SRVE0777E: Exception thrown by application class 'org.jboss.weld.context.AbstractConversationContext.initialize:259'

      org.jboss.weld.context.NonexistentConversationException: WELD-000321: No conversation found to restore for id 1

          at org.jboss.weld.context.AbstractConversationContext.initialize(AbstractConversationContext.java:259)

          at org.jboss.weld.context.http.LazyHttpConversationContextImpl.initialize(LazyHttpConversationContextImpl.java:87)

          at org.jboss.weld.context.http.LazyHttpConversationContextImpl.checkContextInitialized(LazyHttpConversationContextImpl.java:121)

          at org.jboss.weld.context.AbstractConversationContext.getCurrentConversation(AbstractConversationContext.java:461)

          at org.jboss.weld.bean.builtin.ConversationBean.newInstance(ConversationBean.java:31)

          at org.jboss.weld.bean.builtin.ConversationBean.newInstance(ConversationBean.java:16)

          at org.jboss.weld.bean.builtin.AbstractDecorableBuiltInBean.create(AbstractDecorableBuiltInBean.java:52)

          at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)

          at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)

          at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)

          at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)

          at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)

          at org.jboss.weld.proxies.Conversation$64593700$Proxy$_$$_WeldClientProxy.isTransient(Unknown Source)

          at org.jboss.cdi.tck.tests.context.conversation.filter.IntrospectServlet.doGet(IntrospectServlet.java:81)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)

        • 1. Re: WELD-000321: No conversation found to restore for id 1
          Martin Kouba Master

          Hi Emily,

          the firt log message is expected - Weld attempts to find a contextual instance of a built-in conversation bean and and there's no such existing instance in the current request. Therefore, a new bean instance is being created (see ConversationBean.newInstance() in the stack). However, the request comes with a request parameter cid of value 1 which is obviously not a valid id of a long-running conversation within the current HTTP session and so the lazy initialization of the conversation context fails during Conversation.isTransient() invocation. It would be helpful if you provide more info about what you're trying to do.

          • 2. Re: WELD-000321: No conversation found to restore for id 1
            Emily Jiang Newbie

            Thanks Martin! This error message is from the following cts run:

            When running CTS the test: org.jboss.cdi.tck.tests.context.conversation.event.notattached.DestroyConversationNotAssociatedWithCurrentRequestEventTest

            Methods: testLifecycleEventFired

             

            Any suggestions about what might have gone wrong?

            • 3. Re: WELD-000321: No conversation found to restore for id 1
              Martin Kouba Master

              This is probably not the right test. I see the org.jboss.cdi.tck.tests.context.conversation.filter.IntrospectServlet class in the stack. So it's more likely org.jboss.cdi.tck.tests.context.conversation.filter.ConversationFilterTest. Am I right?

              • 4. Re: WELD-000321: No conversation found to restore for id 1
                Emily Jiang Newbie

                I think this is in the cdi tck package of org.jboss.cdi.tck.tests.context.conversation.filter. Basically I think you are right.

                • 5. Re: WELD-000321: No conversation found to restore for id 1
                  Martin Kouba Master

                  OK, it would be great if you could identify the problematic test method, i.e. try to run each method separately... mvn clean test -Dincontainer -DtckTest=ConversationFilterTest#testConversationActivation

                  • 6. Re: WELD-000321: No conversation found to restore for id 1
                    Emily Jiang Newbie

                    When I run the above command, I got this:

                    [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ weld-liberty-runner-tck12 ---

                    [INFO] Compiling 3 source files to /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/target/test-classes

                    [INFO] -------------------------------------------------------------

                    [ERROR] COMPILATION ERROR :

                    [INFO] -------------------------------------------------------------

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8Extension.java:[21,40] error: package org.jboss.as.arquillian.container does not exist

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[10,37] error: package org.jboss.as.controller.client does not exist

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[11,37] error: package org.jboss.as.controller.client does not exist

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[12,45] error: package org.jboss.as.controller.client.helpers does not exist

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[14,20] error: package org.jboss.dmr does not exist

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[15,20] error: package org.jboss.dmr does not exist

                    [ERROR] /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[59,31] error: cannot find symbol

                    [ERROR]   symbol:   class ModelControllerClient

                      location: class WildFly8EEResourceManager

                    /cdi-tck-1.2.4.Final/weld/liberty-tck-runner/src/test/java/org/jboss/weld/tck/wildfly8/WildFly8EEResourceManager.java:[101,31] error: cannot find symbol

                    .... there are many errors

                    • 7. Re: WELD-000321: No conversation found to restore for id 1
                      Martin Kouba Master

                      Emily,

                      I suppose you've copied the JBoss TCK runner which has some WildFly-specific code. So you should remove the org/jboss/weld/tck/wildfly8 package entirely...