6 Replies Latest reply on Sep 20, 2007 1:19 PM by rlao

    Conversation related error (UnsupportedOperationException)

    rlao

      I hope someone may be able to point me to the right direction to resolve this problem. I am getting the following error

      Caused by: java.lang.UnsupportedOperationException
      at java.util.Collections$UnmodifiableList.set(Collections.java:1157)
      at org.jboss.seam.core.Manager.updateCurrentConversationId(Manager.java:112)
      at org.jboss.seam.interceptors.ConversationInterceptor.redirectToExistingConversation(ConversationInterceptor.java:83)
      at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:46)


      The application normally requires an user to login. After logging in, it takes the user to the Main screen, from there, user can search for items then clicks on an item to launch a Detail screen of that item. There is a conversation established so additional clicking on the Main page for the same item would go to the same Detail page. We want to be able to give the Detail page URL to another person so they can see this page.

      I reworked the detail page so it can take parameters from URL and launched it into the correct information. I also assigned a different conversation id with its begin method. Everything works (if the user is already signed on) except when the signon redirect is put in place. When someone gets the link and if he/she is not logged in, it would first re-direct it to a signon page before proceeding to the Detail page. However, after it logs in, it would set the necessary parameters in the Detail Page but never got to the begin method (specified by action). The error I saw was UnsupportedOperationException as stated above. It seems to try to set a conversation id in a list which is not modifiable. Welcome any suggestions.

      Thanks

      Ralph

        • 1. Re: Conversation related error (UnsupportedOperationExceptio
          thejavafreak

          Can you please post the full stacktrace since we need to go deep figuring out your problems.

          • 2. Re: Conversation related error (UnsupportedOperationExceptio
            wise_guybg

            What version of Seam are you using? Have you tried with 2.0.0.CR1?

            I looked around for the usages of Manage.currentConversationIdStack and I don't think an UnmodifiableList is assigned anywhere. Do you make any modifications of values related to conversations?

            I also assigned a different conversation id with its begin method.

            What do you mean by this? Can you post your code?

            • 3. Re: Conversation related error (UnsupportedOperationExceptio
              rlao

              I am using Seam 1.1.5 I believe

              There are two ways to enter this page and it entered via 2 different methods, each with its own @BEGIN tag to set the conversation id. can I do so?

              @Begin(id="#{param.conversationId}",join=true)
              public String begin() {...}


              @Begin(id="#{detailsearch.ref_id}",join=false)
              public String showAccount() {...}


              Here is the whole trace:

              Caused by: java.lang.UnsupportedOperationException
              at java.util.Collections$UnmodifiableList.set(Collections.java:1157)
              at org.jboss.seam.core.Manager.updateCurrentConversationId(Manager.java:112)
              at org.jboss.seam.interceptors.ConversationInterceptor.redirectToExistingConversation(ConversationInterceptor.java:83)
              at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:46)
              at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
              at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
              at com.ga.riskapp.usermgmt.GALoggedInInterceptor.checkLoggedIn(GALoggedInInterceptor.java:32)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
              at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
              at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:36)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
              at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
              at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:29)
              at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
              at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
              at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
              at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
              at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
              at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:39)
              at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
              at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
              at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:148)
              at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:145)
              at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:80)
              at com.ga.riskapp.session.action.GAAccountDetailsAction$$EnhancerByCGLIB$$2fd77bd9.showAccount()
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
              ... 47 more

              • 4. Re: Conversation related error (UnsupportedOperationExceptio
                wise_guybg

                I see no problem in having two @Begin.

                Where is GALoggedInInterceptor declared to be used? Is it in components.xml? Can you paste some code?

                So it's GAAccountDetailsAction.showAccount() that gets invoked. Obviously the @Begin here is causing problems. I don't know why redirectToExistingConversation() is getting called while you have join=false.

                Why don't you upgrade at least to Seam 1.2.1.GA? There might be a fix for the problem you have...

                • 5. Re: Conversation related error (UnsupportedOperationExceptio
                  pmuir

                  Please try with Seam 1.2.1

                  • 6. Re: Conversation related error (UnsupportedOperationExceptio
                    rlao

                    Thanks for replying.

                    I tried to upgrade to 1.2.1 by replacing all the .jar files and recompiling it. When I ran it, I got the following exception

                    Class org.jboss.seam.remoting.SeamRemotingServlet not found


                    I looked at 1.2.1 library, there is a new jar jboss-seam-remoting.jar but it didn't have that class. In the 1.1.5, the remoting related classes were in jboss-seam.jar file. Is there something else I need to do so it didn't generate code for the class or I am missing additional .jar file. I tried to find an upgrade instruction for 1.1.5 to 1.2.1 but without much luck, is there one?

                    thanks