Empty requests parameters

classic Classic list List threaded Threaded
9 messages Options
MJ
Reply | Threaded
Open this post in threaded view
|

Empty requests parameters

MJ
Hi all,

I have a serious problem with stripes, Several queries are erroneous with empty parameters.
The framework is unable to answer request and i have no default handler exception in the log.
Making the application unusable

This problem is random, in dev does not reproduce but in prod with for many connected user the application unusable.

Thank you for your urgent help.
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

Nestor Hernandez
Hi, can you show some code?. An ActionBean? It's hard to tell what is the problem with no more information.

2017-07-13 5:20 GMT-05:00 MJ <[hidden email]>:
Hi all,

I have a serious problem with stripes, Several queries are erroneous with
empty parameters.
The framework is unable to answer request and i have no default handler
exception in the log.
Making the application unusable

This problem is random, in dev does not reproduce but in prod with for many
connected user the application unusable.

Thank you for your urgent help.



--
View this message in context: http://stripes.996289.n3.nabble.com/Empty-requests-parameters-tp18061.html
Sent from the stripes-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

Rick Grashel
In reply to this post by MJ
Hi MJ,

I agree with Nestor.  If you can show some ActionBean code, this will help a lot.

Thanks.

-- Rick

On Thu, Jul 13, 2017 at 5:20 AM, MJ <[hidden email]> wrote:
Hi all,

I have a serious problem with stripes, Several queries are erroneous with
empty parameters.
The framework is unable to answer request and i have no default handler
exception in the log.
Making the application unusable

This problem is random, in dev does not reproduce but in prod with for many
connected user the application unusable.

Thank you for your urgent help.



--
View this message in context: http://stripes.996289.n3.nabble.com/Empty-requests-parameters-tp18061.html
Sent from the stripes-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
MJ
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

MJ
Hello,

Nothing special, a sample action bean like

@UrlBinding(Bindings.LOGIN)
public class LoginActionBean extends ActionBean {
    @DefaultHandler
    @HandlesEvent("connect")
    public Resolution connect() throws Exception {
         return new ForwardResolution(Resolutions.HOME);
    }
}

I am using Glassfish 4 and Stripes 1.5.7, the problem is many request are empty parameters in entry point of ActionBean, and i can't understand what is wrong. NB: the some request work fine but sometimes server recive it with empty parameters (1/10 request failed).

Thank you for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

VANKEISBELCK Remi
Hello,

Have you turned on logs ? Stripes can tell you everything it does, which could help pinpoint the problem (binding/validation ? bean resolution ? etc.).

HTH

Rémi

2017-07-19 13:00 GMT+02:00 MJ <[hidden email]>:
Hello,

Nothing special, a sample action bean like

@UrlBinding(Bindings.LOGIN)
public class LoginActionBean extends ActionBean {
    @DefaultHandler
    @HandlesEvent("connect")
    public Resolution connect() throws Exception {
         return new ForwardResolution(Resolutions.HOME);
    }
}

I am using Glassfish 4 and Stripes 1.5.7, the problem is many request are
empty parameters in entry point of ActionBean, and i can't understand what
is wrong. NB: the some request work fine but sometimes server recive it with
empty parameters (1/10 request failed).

Thank you for your help.




--
View this message in context: http://stripes.996289.n3.nabble.com/Empty-requests-parameters-tp18061p18077.html
Sent from the stripes-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
MJ
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

MJ
Hi Rémi,

Nothing in the log, stripes detecte the ActionBean URL, but with empty parameter and excute the default handler.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

Rick Grashel
In reply to this post by MJ
If the parameters are posted parameters are not being received by Stripes, then something is hijacking the request before Stripes has a chance to process them.  If only 1 out of 10 requests fail, then you are try to find the commonality where those requests fail.

My guess is that there is a defect in your application in certain circumstances where it is consuming the request before the ActionBean has a chance to have the parameters bound to it.

I also use Stripes on Glassfish 4, so I am very confident that it works well.  The only times I have encountered the situation you describe is when I have a defect in an interceptor or Java filter which hijacks the request before Stripes has a chance to perform binding.

Thanks.

-- Rick

 

On Wed, Jul 19, 2017 at 6:00 AM, MJ <[hidden email]> wrote:
Hello,

Nothing special, a sample action bean like

@UrlBinding(Bindings.LOGIN)
public class LoginActionBean extends ActionBean {
    @DefaultHandler
    @HandlesEvent("connect")
    public Resolution connect() throws Exception {
         return new ForwardResolution(Resolutions.HOME);
    }
}

I am using Glassfish 4 and Stripes 1.5.7, the problem is many request are
empty parameters in entry point of ActionBean, and i can't understand what
is wrong. NB: the some request work fine but sometimes server recive it with
empty parameters (1/10 request failed).

Thank you for your help.




--
View this message in context: http://stripes.996289.n3.nabble.com/Empty-requests-parameters-tp18061p18077.html
Sent from the stripes-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

Luis Tiago Rico
Hi, 
I agree with Rick last message, specially if you can only reproduce this problem in PROD environment as said.
Just guessing but, sounds like some of your requests are going trough a load balancer / reverse proxy in PROD (like nginx) and there is url rewrite rule stripping down the parameters!

Cheers

2017-07-19 14:52 GMT+01:00 Rick Grashel <[hidden email]>:
If the parameters are posted parameters are not being received by Stripes, then something is hijacking the request before Stripes has a chance to process them.  If only 1 out of 10 requests fail, then you are try to find the commonality where those requests fail.

My guess is that there is a defect in your application in certain circumstances where it is consuming the request before the ActionBean has a chance to have the parameters bound to it.

I also use Stripes on Glassfish 4, so I am very confident that it works well.  The only times I have encountered the situation you describe is when I have a defect in an interceptor or Java filter which hijacks the request before Stripes has a chance to perform binding.

Thanks.

-- Rick

 

On Wed, Jul 19, 2017 at 6:00 AM, MJ <[hidden email]> wrote:
Hello,

Nothing special, a sample action bean like

@UrlBinding(Bindings.LOGIN)
public class LoginActionBean extends ActionBean {
    @DefaultHandler
    @HandlesEvent("connect")
    public Resolution connect() throws Exception {
         return new ForwardResolution(Resolutions.HOME);
    }
}

I am using Glassfish 4 and Stripes 1.5.7, the problem is many request are
empty parameters in entry point of ActionBean, and i can't understand what
is wrong. NB: the some request work fine but sometimes server recive it with
empty parameters (1/10 request failed).

Thank you for your help.




--
View this message in context: http://stripes.996289.n3.nabble.com/Empty-requests-parameters-tp18061p18077.html
Sent from the stripes-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users




--
Luís Tiago Barreto Rico

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
MJ
Reply | Threaded
Open this post in threaded view
|

Re: Empty requests parameters

MJ
This post has NOT been accepted by the mailing list yet.
Hi Cheers and Rick,

Thanks for your help,

I have only one listener to clean session when is destroyed, and i have DispatcherServlet extends net.sourceforge.stripes.controller.DispatcherServlet Empty just to log requests

what do you think ?

Thanks,

  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>StripesResources</param-value>
  </context-param>
  <filter>
    <display-name>Stripes Filter</display-name>
    <filter-name>StripesFilter</filter-name>
    <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
    <init-param>
      <param-name>ActionResolver.Packages</param-name>
      <param-value>com.customer</param-value>
    </init-param>
    <init-param>
      <param-name>Extension.Packages</param-name>
      <param-value>com.samaxes.stripes.inject</param-value>
    </init-param>
    <init-param>
      <param-name>ExceptionHandler.Class</param-name>
      <param-value>com.customer.web.handlers.ExceptionHandler</param-value>
    </init-param>
    <init-param>
      <param-name>FileUpload.MaximumPostSize</param-name>
      <param-value>500m</param-value>
    </init-param>
    <init-param>
      <param-name>PopulationStrategy.Class</param-name>
      <param-value>com.common.utils.web.strategy.CustomPopulationStrategy</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>StripesFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
  <filter-mapping>
    <filter-name>StripesFilter</filter-name>
    <servlet-name>StripesDispatcher</servlet-name>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
  <servlet>
    <servlet-name>StripesDispatcher</servlet-name>
    <servlet-class>com.customer.web.servlets.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>StripesDispatcher</servlet-name>
    <url-pattern>*.html</url-pattern>
  </servlet-mapping>
  <listener>
    <listener-class>com.customer.web.handlers.HttpSessionListener</listener-class>
  </listener>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
</web-app>