Failed to find parameter:scriptSessionId

View: New views
6 Messages — Rating Filter:   Alert me  

Failed to find parameter:scriptSessionId

by Kalakota, Prudhvi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi

 

 I am using DWR 3.0RC1. I am getting the following exception intermittently. I searched online for this issue and couldn’t find any solution.

 Suddenly the browser waits for response from the server for long time and throws the exception. If I refresh the page,

 everything starts working fine again.  This happens for different requests, not just a particular request.

 

Exception : java.lang.IllegalArgumentException_: Failed to find parameter: scriptSessionId

    at org.directwebremoting.dwrp.Batch.extractParameter( _Batch.java:91_)

    at org.directwebremoting.dwrp.Batch.<init>(_Batch.java:59_)

            at org.directwebremoting.dwrp.CallBatch.<init>(_CallBatch.java:46_)

    at org.directwebremoting.dwrp.BaseCallHandler.handle(_BaseCallHandler.java:72_)

    at org.directwebremoting.servlet.UrlProcessor.handle(_UrlProcessor.java:120_)

    at org.directwebremoting.servlet.DwrServlet.doPost(_DwrServlet.java:141_)

    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:710_)

 

Obviously by looking at this exception, I understood that scriptSessionId is not sent to the server as a request parameter.

The application I am working is a web desktop (Extjs) and I have only one JSP page. All the javascript is loaded into that page. I am not sure why this is happening in the middle of nowhere. The application works fine most of the time after the page loads. After some time this exception is thrown and I have to refresh the browser to proceed. Any ideas on why this might be happening.

 

Here is a sample of my javascript

 

    <script type='text/javascript' src='/web/dwr/engine.js'> </script>

   <script type='text/javascript' src='/web/dwr/util.js'> </script>

   <script type='text/javascript' src='/web/dwr/interface/AuthenticationAction.js'></script>

   <script type='text/javascript' src='/web/dwr/interface/DataAuthAction.js'></script>

    --- lot more actions

 

 

     window.onload = function() {

          dwr.engine.setActiveReverseAjax(true);

          dwr.engine.setNotifyServerOnPageUnload(true);

     }

 

      window.onunload = function() {

            dwr.engine.setActiveReverseAjax(false);

     }

 

 My web.xml sample

 

            <filter-mapping>

                        <filter-name>SessionHandlerFilter</filter-name>

                        <url-pattern>*.jsp</url-pattern>

                        <url-pattern>*.dwr</url-pattern>

            </filter-mapping>

            <listener>

                        <listener-class>org.directwebremoting.servlet.DwrListener</listener-class>

            </listener>

              <servlet>

                        <servlet-name>dwr-invoker</servlet-name>

                       

                        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

 

                        <init-param>

                                    <param-name>debug</param-name>

                                    <param-value>true</param-value>

                        </init-param>

 

 

 

                        <init-param>

                                    <param-name>activeReverseAjaxEnabled</param-name>

                                    <param-value>true</param-value>

                        </init-param>

                        <init-param>

                                    <param-name>initApplicationScopeCreatorsAtStartup</param-name>

                                    <param-value>true</param-value>

                        </init-param>

                        <init-param>

                                    <param-name>maxWaitAfterWrite</param-name>

                                    <param-value>-1</param-value>

                        </init-param>

                       

                        <init-param>

                                    <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>

                                    <param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value>

                        </init-param>

 

                         <init-param>

                             <param-name>scriptSessionTimeout</param-name>

                             <param-value>1800000</param-value>

                        </init-param>

       

                        <init-param>

                                    <param-name>disconnectedTime</param-name>

                                    <param-value>30000</param-value>

                        </init-param>

 

                      <load-on-startup>1</load-on-startup>

            </servlet>

 

            <servlet-mapping>

                        <servlet-name>dwr-invoker</servlet-name>

                        <url-pattern>/dwr/*</url-pattern>

            </servlet-mapping>

 

            <session-config>

                        <session-timeout>30</session-timeout>

            </session-config>

 

 

 

 

 

                                                                                                              

 


RE: Failed to find parameter:scriptSessionId

by mikewse :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi Prudhvi,
 
FYI there has been a related discussion of this issue recently, see
 
Your case doesn't seem to be related to unload though, so here are a few things you could use to analyze the problem further:
  • DWR has some extra code paths if you are using Reverse Ajax. (Are you?)
  • Script sessions time out (by default) after 5 minutes of inactivity. New script sessions are then created on the next call. Could your problem be related to this "script session swap"?
Also, to help us find the cause of this issue, it would be great if you could:
  • Try the latest snapshot (pre-RC2) version, downloadable from
    http://bugs.directwebremoting.org/bamboo/
  • Log (f ex through Firebug or similar) the HTTP request contents for the request triggering the error + the request before that.
Best regards
Mike Wilson


From: Kalakota, Prudhvi [mailto:Prudhvi.Kalakota@...]
Sent: den 28 oktober 2009 08:03
To: users@...
Subject: [dwr-user] Failed to find parameter:scriptSessionId

Hi

 

 I am using DWR 3.0RC1. I am getting the following exception intermittently. I searched online for this issue and couldn’t find any solution.

 Suddenly the browser waits for response from the server for long time and throws the exception. If I refresh the page,

 everything starts working fine again.  This happens for different requests, not just a particular request.

 

Exception : java.lang.IllegalArgumentException_: Failed to find parameter: scriptSessionId

    at org.directwebremoting.dwrp.Batch.extractParameter( _Batch.java:91_)

    at org.directwebremoting.dwrp.Batch.<init>(_Batch.java:59_)

            at org.directwebremoting.dwrp.CallBatch.<init>(_CallBatch.java:46_)

    at org.directwebremoting.dwrp.BaseCallHandler.handle(_BaseCallHandler.java:72_)

    at org.directwebremoting.servlet.UrlProcessor.handle(_UrlProcessor.java:120_)

    at org.directwebremoting.servlet.DwrServlet.doPost(_DwrServlet.java:141_)

    at javax.servlet.http.HttpServlet.service(_HttpServlet.java:710_)

 

Obviously by looking at this exception, I understood that scriptSessionId is not sent to the server as a request parameter.

The application I am working is a web desktop (Extjs) and I have only one JSP page. All the javascript is loaded into that page. I am not sure why this is happening in the middle of nowhere. The application works fine most of the time after the page loads. After some time this exception is thrown and I have to refresh the browser to proceed. Any ideas on why this might be happening.

 

Here is a sample of my javascript

 

    <script type='text/javascript' src='/web/dwr/engine.js'> </script>

   <script type='text/javascript' src='/web/dwr/util.js'> </script>

   <script type='text/javascript' src='/web/dwr/interface/AuthenticationAction.js'></script>

   <script type='text/javascript' src='/web/dwr/interface/DataAuthAction.js'></script>

    --- lot more actions

 

 

     window.onload = function() {

          dwr.engine.setActiveReverseAjax(true);

          dwr.engine.setNotifyServerOnPageUnload(true);

     }

 

      window.onunload = function() {

            dwr.engine.setActiveReverseAjax(false);

     }

 

 My web.xml sample

 

            <filter-mapping>

                        <filter-name>SessionHandlerFilter</filter-name>

                        <url-pattern>*.jsp</url-pattern>

                        <url-pattern>*.dwr</url-pattern>

            </filter-mapping>

            <listener>

                        <listener-class>org.directwebremoting.servlet.DwrListener</listener-class>

            </listener>

              <servlet>

                        <servlet-name>dwr-invoker</servlet-name>

                       

                        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

 

                        <init-param>

                                    <param-name>debug</param-name>

                                    <param-value>true</param-value>

                        </init-param>

 

 

 

                        <init-param>

                                    <param-name>activeReverseAjaxEnabled</param-name>

                                    <param-value>true</param-value>

                        </init-param>

                        <init-param>

                                    <param-name>initApplicationScopeCreatorsAtStartup</param-name>

                                    <param-value>true</param-value>

                        </init-param>

                        <init-param>

                                    <param-name>maxWaitAfterWrite</param-name>

                                    <param-value>-1</param-value>

                        </init-param>

                       

                        <init-param>

                                    <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name>

                                    <param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value>

                        </init-param>

 

                         <init-param>

                             <param-name>scriptSessionTimeout</param-name>

                             <param-value>1800000</param-value>

                        </init-param>

       

                        <init-param>

                                    <param-name>disconnectedTime</param-name>

                                    <param-value>30000</param-value>

                        </init-param>

 

                      <load-on-startup>1</load-on-startup>

            </servlet>

 

            <servlet-mapping>

                        <servlet-name>dwr-invoker</servlet-name>

                        <url-pattern>/dwr/*</url-pattern>

            </servlet-mapping>

 

            <session-config>

                        <session-timeout>30</session-timeout>

            </session-config>

 

 

 

 

 

                                                                                                              

 


RE: Failed to find parameter:scriptSessionId

by prudhvi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Mike,

Thanks for your response. I already looked into that discussion and as you said that doesn't seem to relate to my issue. In my case it happens not on unload.

I am using reverse ajax for polling every 30 seconds. If you verify my web.xml and javascript that I posted in my previous thread, you will notice it.

I thought when reverse ajax is enabled, the scriptSession won't timeout after 5 minutes. Can anyone confirm?

And I added init param in web.xml to increase scriptSessionTimeout(not sure if this actually changes session timeout)

         <init-param>
                 <param-name>scriptSessionTimeout</param-name>
                  <param-value>1800000</param-value>
          </init-param>

Thanks,
Prudhvi


Hi Prudhvi,
 
FYI there has been a related discussion of this issue recently, see
 
<http://www.nabble.com/Failed-to-find-parameter:-scriptSessionId-td25865304.
html>
http://www.nabble.com/Failed-to-find-parameter:-scriptSessionId-td25865304.h
tml
 
Your case doesn't seem to be related to unload though, so here are a few
things you could use to analyze the problem further:

*

        DWR has some extra code paths if you are using Reverse Ajax. (Are
you?)
*

        Script sessions time out (by default) after 5 minutes of inactivity.
New script sessions are then created on the next call. Could your problem be
related to this "script session swap"?

Also, to help us find the cause of this issue, it would be great if you
could:

*

        Try the latest snapshot (pre-RC2) version, downloadable from
 <http://bugs.directwebremoting.org/bamboo/>
http://bugs.directwebremoting.org/bamboo/
*

        Log (f ex through Firebug or similar) the HTTP request contents for
the request triggering the error + the request before that.

Best regards
Mike Wilson

Re: Failed to find parameter:scriptSessionId

by Lance Java :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Are there any filters getting in the way? Does the SessionHandlerFilter munge the request? Do you use DWR's file upload capabilities and if yes is it only occurring on file upload?

2009/10/28 prudhvi <prudhvireddy@...>

Hi Mike,

Thanks for your response. I already looked into that discussion and as you
said that doesn't seem to relate to my issue. In my case it happens not on
unload.

I am using reverse ajax for polling every 30 seconds. If you verify my
web.xml and javascript that I posted in my previous thread, you will notice
it.

I thought when reverse ajax is enabled, the scriptSession won't timeout
after 5 minutes. Can anyone confirm?

And I added init param in web.xml to increase scriptSessionTimeout(not sure
if this actually changes session timeout)

        <init-param>
                <param-name>scriptSessionTimeout</param-name>
                 <param-value>1800000</param-value>
         </init-param>

Thanks,
Prudhvi


Hi Prudhvi,

FYI there has been a related discussion of this issue recently, see

<http://www.nabble.com/Failed-to-find-parameter:-scriptSessionId-td25865304.
html
>
http://www.nabble.com/Failed-to-find-parameter:-scriptSessionId-td25865304.h
tml


Your case doesn't seem to be related to unload though, so here are a few
things you could use to analyze the problem further:

*

       DWR has some extra code paths if you are using Reverse Ajax. (Are
you?)
*

       Script sessions time out (by default) after 5 minutes of inactivity.
New script sessions are then created on the next call. Could your problem be
related to this "script session swap"?

Also, to help us find the cause of this issue, it would be great if you
could:

*

       Try the latest snapshot (pre-RC2) version, downloadable from
 <http://bugs.directwebremoting.org/bamboo/>
http://bugs.directwebremoting.org/bamboo/
*

       Log (f ex through Firebug or similar) the HTTP request contents for
the request triggering the error + the request before that.

Best regards
Mike Wilson

--
View this message in context: http://www.nabble.com/Failed-to-find-parameter%3AscriptSessionId-tp26090181p26098908.html
Sent from the DWR - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Failed to find parameter:scriptSessionId

by prudhvi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There are three filters that I use and one of them is DWRAjaxFilter. And I am not changing any of the request parameters. All I am doing in filters is to check some HttpSession parameters and  redirect response.

Regarding file upload capabilities, I am not using any file uploads in my app.

Do you know what causes a scriptSessionId to reset?

Thanks,
Prudhvi




Are there any filters getting in the way? Does the SessionHandlerFilter
munge the request? Do you use DWR's file upload capabilities and if yes is
it only occurring on file upload?



RE: Failed to find parameter:scriptSessionId

by mikewse :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Right. So, try the two things I mentioned (snapshot version
and log faulty request flow) and get back to us when you
have some new information. It would be interesting to know
more about the request and data scenario when this is
happening. You could also attach the Java source code and
run a debug session in Eclipse, using a breakpoint at the
location where the exception is thrown. Then you can examine
the request object to see what the POST contains.

Alternatively, you could cut down your app to the bare
minimum that still exhibits the problem, and send along, and
I'll try it out in my own environment.

(And yes, doing Reverse Ajax polls every 30 secs should keep
your ScriptSession alive)

Best regards
Mike

prudhvi wrote:

> Hi Mike,
>
> Thanks for your response. I already looked into that
> discussion and as you
> said that doesn't seem to relate to my issue. In my case it
> happens not on
> unload.
>
> I am using reverse ajax for polling every 30 seconds. If you verify my
> web.xml and javascript that I posted in my previous thread,
> you will notice
> it.
>
> I thought when reverse ajax is enabled, the scriptSession
> won't timeout
> after 5 minutes. Can anyone confirm?
>
> And I added init param in web.xml to increase
> scriptSessionTimeout(not sure
> if this actually changes session timeout)
>
>          <init-param>
>                  <param-name>scriptSessionTimeout</param-name>
>                   <param-value>1800000</param-value>
>           </init-param>
>
> Thanks,
> Prudhvi
>
>
> Hi Prudhvi,
>  
> FYI there has been a related discussion of this issue recently, see
>  
> <http://www.nabble.com/Failed-to-find-parameter:-scriptSession
> Id-td25865304.
> html>
> http://www.nabble.com/Failed-to-find-parameter:-scriptSessionI
> d-td25865304.h
> tml
>  
> Your case doesn't seem to be related to unload though, so
> here are a few
> things you could use to analyze the problem further:
>
> *
>
> DWR has some extra code paths if you are using Reverse
> Ajax. (Are
> you?)
> *
>
> Script sessions time out (by default) after 5 minutes
> of inactivity.
> New script sessions are then created on the next call. Could
> your problem be
> related to this "script session swap"?
>
> Also, to help us find the cause of this issue, it would be
> great if you
> could:
>
> *
>
> Try the latest snapshot (pre-RC2) version, downloadable from
>  <http://bugs.directwebremoting.org/bamboo/>
> http://bugs.directwebremoting.org/bamboo/
> *
>
> Log (f ex through Firebug or similar) the HTTP request
> contents for
> the request triggering the error + the request before that.
>
> Best regards
> Mike Wilson
>
> --
> View this message in context:
> http://www.nabble.com/Failed-to-find-parameter%3AscriptSession
> Id-tp26090181p26098908.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...