3 Replies Latest reply on Oct 2, 2008 1:32 AM by Shane Bryzak

    remoting error in IE

    lance stine Newbie

      IE is again having troubles in the seam framework. When using seam remoting it generates some errors while it checks to see if the remote function has finished. It does finish and everything is fine but, the stack traces fill the sever log and make it look like it doesn't work.


      Here are some of the lines from the stack trace.


      Caused by: org.jboss.seam.RequiredException: @In attribute requires non-null value: paymentconfirmation.purchaseHome
           at org.jboss.seam.Component.getValueToInject(Component.java:2168)
           at org.jboss.seam.Component.injectAttributes(Component.java:1598)
           at org.jboss.seam.Component.inject(Component.java:1416)


      ...  more ...


      08:34:49,875 ERROR [Remoting] Error
      javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
           at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:74)
           at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:78)
           at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111)
           at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:75)
           at org.jboss.seam.servlet.SeamResourceServlet.doPost(SeamResourceServlet.java:92)


      ... more ...


      So the @In attribute isn't null. It is the seam component that begins the conversation annotated with @Begin. In other browsers there is no exception thrown.


      Does anyone have any ideas?

        • 1. Re: remoting error in IE
          lance stine Newbie

          This is the javascript for the remoting call


          function processPaymentRemote()
          {
          Seam.Remoting.getContext().setConversationId( #{conversation.id} );          Seam.Component.newInstance("paymentconfirmation").paymentconfirmationAction(remoteCallBack);
          }

          • 2. Re: remoting error in IE
            lance stine Newbie

            cmon dudes, can't I get some interest in the non compliant browser?


            In any case I came up with a simple answer that I'll post in case someone else needs it. The problem is just that IE wouldn't wait patiently for the remoting request to finish. Instead, it sent out more requests that were somehow invalid and caused the stack trace.


            The simple fox is to prevent the remoting function from being called more than once. Like this:


            var ieIsFun = true;


            function processPaymentRemote()
                 {
                      if (ieIsFun) {
                      Seam.Component.getInstance("paymentconfirmation").paymentconfirmationAction(remoteCallBack);
                      ieIsFun = false;
                      }
                 }

            • 3. Re: remoting error in IE
              Shane Bryzak Master

              Can you please raise an issue in JIRA with a reproducible test case.