struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <mbarr...@wfscorp.com>
Subject Re: [S2] Strange problem with Date handling
Date Mon, 01 Jan 2007 17:38:44 GMT
I was having that problem because S2 creates a new action to handle each 
request, and I was using Spring as the object factory which reuses the 
instances unless specified otherwise (scope="prototype" in Spring 2)

musachy

Dariusz Wojtas wrote:
> I am using Spring 2 but I do not define actions in Spring.
> I use Spring to manage my services and security (acegi).
> As I understand this way the actions are created the 'traditional'
> way, and only some setters are later autowired - in this case by name.
> My date property does not match any spring service, not even close ...
> Do I still have to set the scope somewhere?
>
> I only set some props in my struts.properties:
> struts.devMode=true
> struts.enable.DynamicMethodInvocation=false
> struts.action.extension=action
> struts.objectFactory=spring
> struts.objectFactory.spring.autoWire=name
>
>
> Best regards
>  Dariusz Wojtas
>
>
> On 1/1/07, Musachy Barroso <mbarroso@wfscorp.com> wrote:
>> I had a similar problem before, are you using Spring 2 with S2? If you
>> are, remember to set scope="prototype" in applicationContext.xml for
>> your action bean
>>
>> musachy
>> Dariusz Wojtas wrote:
>> > Now I am stuck with some other issue, something so strange that seems
>> > to be irrational.
>> >
>> > I have an URL
>> >    /myAction.action?dataPierwszejRejestracji=2006-12-31
>> > that leads to an action with a Date property - 
>> dataPierwszejRejestracji
>> >
>> > I submit this URL in IE and Firefox - works.
>> > I submit the same URL under Opera and it fails with long stacktrace on
>> > the Tomcat console.
>> > I repeated it several times.
>> >
>> > java.lang.NullPointerException
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:197)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:154)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:217)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

>>
>> >
>> >
>> > 
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

>>
>> >
>> > [...]
>> >
>> >
>> > Has anyone faced this problem?
>> > It does not make sense to me, but that's how it behaves.
>> > The date comes from dropdowndatetimepicker.
>> > I have cut all other request properties to narrow the problem down,
>> > and this is the property left. Without this param in URL the action
>> > executes.
>> >
>> > Using Struts 2,
>> > 2.0.3 snapshot from trunk.
>> >
>> > Regards
>> > Dariusz Wojtas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message