Re: struts 2.1.6 conventions plugin questions
Hi Wes, I have an AuthenticationInterceptor that checks for a Spring-injected session scoped bean for authentication information (though I'm not sure if this is actually thread-safe, I should probably check on that... if Interceptors in Struts are singletons then it'd need to be a ThreadLocal, but that's probably a separate issue. In any case, the interceptor is just tacked on top of the defaultStack and appears to work properly and is configured as the default interceptor stack within a secured package that I've created. Then any . I've set up a sandbox with config-browser enabled at http://dev.tdar.org:8080/tdar2/config-browser/index.action but I don't see anything immediately suspect... here's a direct link to the action that's giving me type conversion trouble: http://dev.tdar.org:8080/tdar2/config-browser/showConfig.action?namespace=%2Fresource%2FdatasetactionName=add Thanks again for all your help! Allen On Wed, Jan 28, 2009 at 6:57 PM, Wes Wannemacher w...@wantii.com wrote: On Wednesday 28 January 2009 20:33:59 you wrote: Hi Wes, That is weird that the stack trace is printing out what looks like a String array / object pointer-address instead of the actual String... hmm. I've got nothing fancy in my submitting form, just @s.textfield theme='simple' name='longitudeLatitudeBox.maximumLatitude' id='maxy' size=14 / @s.textfield theme='simple' name=longitudeLatitudeBox.minimumLongitude id=minx size=14 / etc. and in my Action receiving the post I have a longitudeLatitudeBox bean property. The id fields are just there so we can use JS + the google maps API to auto-fill in those fields when someone draws a box in a google map widget. This was working when our app was using Struts 2.1.2 / XWork 2.1.1 and the old REST plugin, so I know it has worked in the past, but I'm still checking to see if I've fubared something else configuration-wise while switching to the conventions plugin. Thanks for looking into this! Allen You mentioned earlier that you were using a custom interceptor... How are you ensuring that it is invoked? I would suggest dropping the config-browser plugin into your app and see what's configured. It really smells like there is an interceptor that isn't being called. -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
Oops, sent before I completed a sentence fragment. Then any . should be Then any actions that require authentication specify @ParentPackage(secured) to signify that they want the AuthenticationInterceptor in place. I just tried it using only the defaultStack as well but still no luck... I'll continue removing any customizations we've made to see if I can isolate the problem. On Thu, Jan 29, 2009 at 1:52 PM, Allen Lee allen@asu.edu wrote: Hi Wes, I have an AuthenticationInterceptor that checks for a Spring-injected session scoped bean for authentication information (though I'm not sure if this is actually thread-safe, I should probably check on that... if Interceptors in Struts are singletons then it'd need to be a ThreadLocal, but that's probably a separate issue. In any case, the interceptor is just tacked on top of the defaultStack and appears to work properly and is configured as the default interceptor stack within a secured package that I've created. Then any . I've set up a sandbox with config-browser enabled at http://dev.tdar.org:8080/tdar2/config-browser/index.action but I don't see anything immediately suspect... here's a direct link to the action that's giving me type conversion trouble: http://dev.tdar.org:8080/tdar2/config-browser/showConfig.action?namespace=%2Fresource%2FdatasetactionName=add Thanks again for all your help! Allen On Wed, Jan 28, 2009 at 6:57 PM, Wes Wannemacher w...@wantii.com wrote: On Wednesday 28 January 2009 20:33:59 you wrote: Hi Wes, That is weird that the stack trace is printing out what looks like a String array / object pointer-address instead of the actual String... hmm. I've got nothing fancy in my submitting form, just @s.textfield theme='simple' name='longitudeLatitudeBox.maximumLatitude' id='maxy' size=14 / @s.textfield theme='simple' name=longitudeLatitudeBox.minimumLongitude id=minx size=14 / etc. and in my Action receiving the post I have a longitudeLatitudeBox bean property. The id fields are just there so we can use JS + the google maps API to auto-fill in those fields when someone draws a box in a google map widget. This was working when our app was using Struts 2.1.2 / XWork 2.1.1 and the old REST plugin, so I know it has worked in the past, but I'm still checking to see if I've fubared something else configuration-wise while switching to the conventions plugin. Thanks for looking into this! Allen You mentioned earlier that you were using a custom interceptor... How are you ensuring that it is invoked? I would suggest dropping the config-browser plugin into your app and see what's configured. It really smells like there is an interceptor that isn't being called. -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
Ok, I just figured out the problem I think - it occurs when OGNL tries to parse a negative double. I've been able to reproduce it in a small test app that you can unpack and run via mvn jetty:run at http://libai.la.asu.edu/src/tdartest.tar.bz2 -- it looks like any negative numbers fails to get parsed by OGNL. Is this by design or should I file a JIRA ticket with OGNL? Allen On Thu, Jan 29, 2009 at 5:24 PM, Wes Wannemacher w...@wantii.com wrote: On Thursday 29 January 2009 15:52:52 you wrote: Hi Wes, I have an AuthenticationInterceptor that checks for a Spring-injected session scoped bean for authentication information (though I'm not sure if this is actually thread-safe, I should probably check on that... if Interceptors in Struts are singletons then it'd need to be a ThreadLocal, but that's probably a separate issue. In any case, the interceptor is just tacked on top of the defaultStack and appears to work properly and is configured as the default interceptor stack within a secured package that I've created. Then any . I've set up a sandbox with config-browser enabled at http://dev.tdar.org:8080/tdar2/config-browser/index.action but I don't see anything immediately suspect... here's a direct link to the action that's giving me type conversion trouble: http://dev.tdar.org:8080/tdar2/config-browser/showConfig.action?namespace=% 2Fresource%2FdatasetactionName=add You're right about interceptors being thread locals, but you are also right that it is a separate issue. I'm not seeing anything suspect either. Does this work with the REST plugin (sans Convention plugin?) Can you create a small-ish app that would make a good test-case for a JIRA? I'd like to debug it and get to the bottom of it, but I'm not really getting a sense of where it's going wrong. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
a ticket would be better. thanks musachy On Thu, Jan 29, 2009 at 8:51 PM, Allen Lee allen@asu.edu wrote: Ok, I just figured out the problem I think - it occurs when OGNL tries to parse a negative double. I've been able to reproduce it in a small test app that you can unpack and run via mvn jetty:run at http://libai.la.asu.edu/src/tdartest.tar.bz2 -- it looks like any negative numbers fails to get parsed by OGNL. Is this by design or should I file a JIRA ticket with OGNL? Allen On Thu, Jan 29, 2009 at 5:24 PM, Wes Wannemacher w...@wantii.com wrote: On Thursday 29 January 2009 15:52:52 you wrote: Hi Wes, I have an AuthenticationInterceptor that checks for a Spring-injected session scoped bean for authentication information (though I'm not sure if this is actually thread-safe, I should probably check on that... if Interceptors in Struts are singletons then it'd need to be a ThreadLocal, but that's probably a separate issue. In any case, the interceptor is just tacked on top of the defaultStack and appears to work properly and is configured as the default interceptor stack within a secured package that I've created. Then any . I've set up a sandbox with config-browser enabled at http://dev.tdar.org:8080/tdar2/config-browser/index.action but I don't see anything immediately suspect... here's a direct link to the action that's giving me type conversion trouble: http://dev.tdar.org:8080/tdar2/config-browser/showConfig.action?namespace=% 2Fresource%2FdatasetactionName=add You're right about interceptors being thread locals, but you are also right that it is a separate issue. I'm not seeing anything suspect either. Does this work with the REST plugin (sans Convention plugin?) Can you create a small-ish app that would make a good test-case for a JIRA? I'd like to debug it and get to the bottom of it, but I'm not really getting a sense of where it's going wrong. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
created: https://issues.apache.org/struts/browse/WW-2971 On Thu, Jan 29, 2009 at 8:04 PM, Musachy Barroso musa...@gmail.com wrote: a ticket would be better. thanks musachy On Thu, Jan 29, 2009 at 8:51 PM, Allen Lee allen@asu.edu wrote: Ok, I just figured out the problem I think - it occurs when OGNL tries to parse a negative double. I've been able to reproduce it in a small test app that you can unpack and run via mvn jetty:run at http://libai.la.asu.edu/src/tdartest.tar.bz2 -- it looks like any negative numbers fails to get parsed by OGNL. Is this by design or should I file a JIRA ticket with OGNL? Allen On Thu, Jan 29, 2009 at 5:24 PM, Wes Wannemacher w...@wantii.com wrote: On Thursday 29 January 2009 15:52:52 you wrote: Hi Wes, I have an AuthenticationInterceptor that checks for a Spring-injected session scoped bean for authentication information (though I'm not sure if this is actually thread-safe, I should probably check on that... if Interceptors in Struts are singletons then it'd need to be a ThreadLocal, but that's probably a separate issue. In any case, the interceptor is just tacked on top of the defaultStack and appears to work properly and is configured as the default interceptor stack within a secured package that I've created. Then any . I've set up a sandbox with config-browser enabled at http://dev.tdar.org:8080/tdar2/config-browser/index.action but I don't see anything immediately suspect... here's a direct link to the action that's giving me type conversion trouble: http://dev.tdar.org:8080/tdar2/config-browser/showConfig.action?namespace=% 2Fresource%2FdatasetactionName=add You're right about interceptors being thread locals, but you are also right that it is a separate issue. I'm not seeing anything suspect either. Does this work with the REST plugin (sans Convention plugin?) Can you create a small-ish app that would make a good test-case for a JIRA? I'd like to debug it and get to the bottom of it, but I'm not really getting a sense of where it's going wrong. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
Thanks for the reply Musachy - has a fix for this been commited to the xwork trunk? I pulled xwork 2.1.3-SNAPSHOT from svn, compiled it and threw it onto our snapshot maven repository but I'm still getting the same error. Could I somehow be subverting the type conversion process by using the wrong interceptor stack? I'm using an extended version of the defaultStack that just has a custom authentication interceptor tagged on. Here's a sample stack trace that I get: ognl.MethodFailedException: Method setMaximumLongitude failed for object org.tdar.core.bean.coverage.longitudelatitude...@dee6e2 [java.lang.NoSuchMethodException: setMaximumLongitude([Ljava.lang.String;)] at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:823) at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:964) at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:75) at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:131) at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.ASTChain.setValueBody(ASTChain.java:172) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192) at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:155) at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:143) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at
Re: struts 2.1.6 conventions plugin questions
On Wednesday 28 January 2009 19:49:11 Allen Lee wrote: Thanks for the reply Musachy - has a fix for this been commited to the xwork trunk? I pulled xwork 2.1.3-SNAPSHOT from svn, compiled it and threw it onto our snapshot maven repository but I'm still getting the same error. Could I somehow be subverting the type conversion process by using the wrong interceptor stack? I'm using an extended version of the defaultStack that just has a custom authentication interceptor tagged on. Here's a sample stack trace that I get: [snip] Allen, I'm jumping into this late, but looking at the stack trace, it looks like you are trying to invoke the method with an array of Strings. Can I see the offending OGNL code? -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
Hi Wes, That is weird that the stack trace is printing out what looks like a String array / object pointer-address instead of the actual String... hmm. I've got nothing fancy in my submitting form, just @s.textfield theme='simple' name='longitudeLatitudeBox.maximumLatitude' id='maxy' size=14 / @s.textfield theme='simple' name=longitudeLatitudeBox.minimumLongitude id=minx size=14 / etc. and in my Action receiving the post I have a longitudeLatitudeBox bean property. The id fields are just there so we can use JS + the google maps API to auto-fill in those fields when someone draws a box in a google map widget. This was working when our app was using Struts 2.1.2 / XWork 2.1.1 and the old REST plugin, so I know it has worked in the past, but I'm still checking to see if I've fubared something else configuration-wise while switching to the conventions plugin. Thanks for looking into this! Allen On Wed, Jan 28, 2009 at 6:08 PM, Wes Wannemacher w...@wantii.com wrote: On Wednesday 28 January 2009 19:49:11 Allen Lee wrote: Thanks for the reply Musachy - has a fix for this been commited to the xwork trunk? I pulled xwork 2.1.3-SNAPSHOT from svn, compiled it and threw it onto our snapshot maven repository but I'm still getting the same error. Could I somehow be subverting the type conversion process by using the wrong interceptor stack? I'm using an extended version of the defaultStack that just has a custom authentication interceptor tagged on. Here's a sample stack trace that I get: [snip] Allen, I'm jumping into this late, but looking at the stack trace, it looks like you are trying to invoke the method with an array of Strings. Can I see the offending OGNL code? -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] The Virtual Commons [http://commons.asu.edu] The Digital Archaeological Record [http://www.tdar.org] The OpenABM Consortium [http://www.openabm.org] Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
On Wednesday 28 January 2009 20:33:59 you wrote: Hi Wes, That is weird that the stack trace is printing out what looks like a String array / object pointer-address instead of the actual String... hmm. I've got nothing fancy in my submitting form, just @s.textfield theme='simple' name='longitudeLatitudeBox.maximumLatitude' id='maxy' size=14 / @s.textfield theme='simple' name=longitudeLatitudeBox.minimumLongitude id=minx size=14 / etc. and in my Action receiving the post I have a longitudeLatitudeBox bean property. The id fields are just there so we can use JS + the google maps API to auto-fill in those fields when someone draws a box in a google map widget. This was working when our app was using Struts 2.1.2 / XWork 2.1.1 and the old REST plugin, so I know it has worked in the past, but I'm still checking to see if I've fubared something else configuration-wise while switching to the conventions plugin. Thanks for looking into this! Allen You mentioned earlier that you were using a custom interceptor... How are you ensuring that it is invoked? I would suggest dropping the config-browser plugin into your app and see what's configured. It really smells like there is an interceptor that isn't being called. -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
yes, the conversion problem was fixed in xwork trunk. musachy On Wed, Jan 28, 2009 at 7:49 PM, Allen Lee allen@asu.edu wrote: Thanks for the reply Musachy - has a fix for this been commited to the xwork trunk? I pulled xwork 2.1.3-SNAPSHOT from svn, compiled it and threw it onto our snapshot maven repository but I'm still getting the same error. Could I somehow be subverting the type conversion process by using the wrong interceptor stack? I'm using an extended version of the defaultStack that just has a custom authentication interceptor tagged on. Here's a sample stack trace that I get: ognl.MethodFailedException: Method setMaximumLongitude failed for object org.tdar.core.bean.coverage.longitudelatitude...@dee6e2 [java.lang.NoSuchMethodException: setMaximumLongitude([Ljava.lang.String;)] at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:823) at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:964) at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:75) at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:131) at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.ASTChain.setValueBody(ASTChain.java:172) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:192) at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:155) at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:143) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148) at
Re: struts 2.1.6 conventions plugin questions
I figured out #1 - my IndexAction hadn't declared a @Namespace(/) annotation. In conjunction with struts.convention.redirect.to.slash set to true it was getting invoked on every request for a missing action. Kind of a neat side effect actually that might be useful some day.. :-). I'm going to go ahead and assume that #2 is also something I screwed up myself, but I'll certainly post an issue into JIRA if I can create a small reproducible test case for this behavior. Thanks! Allen On Thu, Jan 22, 2009 at 3:46 PM, Musachy Barroso musa...@gmail.com wrote: 1) how does the conventions plugin handle missing actions or 404s? Previously I'd configured an error-page 404 handler in my web.xml that seemed to work well, but now any invalid / missing URL goes back to the IndexAction I configured to handle requests for /). Not sure why errors are redirected to /. They shouldn't, there is got to be some config somewhere making it do this, you can share more details on your config. 2) For some reason type conversion is no longer being performed on some of my domain models. As an example I have a LongitudeLatitudeBox that has Doubles for the longitude/latitude pairs, but OGNL is now complaining that LongitudeLatitudeBox doesn't have setters that take Strings. Any ideas on why this might happen after switching to the Conventions plugin? I am lost on this one also, please give us more details, or open a jira ticket. 3) Minor nitpick on http://struts.apache.org/2.x/docs/annotations.html has InterfectorRefs instead of InterceptorRefs. Dave took care of it. musachy -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] College of Liberal Arts and Sciences Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
#2 might me related to http://jira.opensymphony.com/browse/XW-670. musachy On Fri, Jan 23, 2009 at 3:00 PM, Allen Lee allen@asu.edu wrote: I figured out #1 - my IndexAction hadn't declared a @Namespace(/) annotation. In conjunction with struts.convention.redirect.to.slash set to true it was getting invoked on every request for a missing action. Kind of a neat side effect actually that might be useful some day.. :-). I'm going to go ahead and assume that #2 is also something I screwed up myself, but I'll certainly post an issue into JIRA if I can create a small reproducible test case for this behavior. Thanks! Allen On Thu, Jan 22, 2009 at 3:46 PM, Musachy Barroso musa...@gmail.com wrote: 1) how does the conventions plugin handle missing actions or 404s? Previously I'd configured an error-page 404 handler in my web.xml that seemed to work well, but now any invalid / missing URL goes back to the IndexAction I configured to handle requests for /). Not sure why errors are redirected to /. They shouldn't, there is got to be some config somewhere making it do this, you can share more details on your config. 2) For some reason type conversion is no longer being performed on some of my domain models. As an example I have a LongitudeLatitudeBox that has Doubles for the longitude/latitude pairs, but OGNL is now complaining that LongitudeLatitudeBox doesn't have setters that take Strings. Any ideas on why this might happen after switching to the Conventions plugin? I am lost on this one also, please give us more details, or open a jira ticket. 3) Minor nitpick on http://struts.apache.org/2.x/docs/annotations.html has InterfectorRefs instead of InterceptorRefs. Dave took care of it. musachy -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] College of Liberal Arts and Sciences Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
struts 2.1.6 conventions plugin questions
Hi there, I've been playing with the new Conventions plugin in Struts 2.1.6 and really like its feature set, many thanks to the Struts devs for all your efforts. I do have a few questions though: 1) how does the conventions plugin handle missing actions or 404s? Previously I'd configured an error-page 404 handler in my web.xml that seemed to work well, but now any invalid / missing URL goes back to the IndexAction I configured to handle requests for /). 2) For some reason type conversion is no longer being performed on some of my domain models. As an example I have a LongitudeLatitudeBox that has Doubles for the longitude/latitude pairs, but OGNL is now complaining that LongitudeLatitudeBox doesn't have setters that take Strings. Any ideas on why this might happen after switching to the Conventions plugin? 3) Minor nitpick on http://struts.apache.org/2.x/docs/annotations.html has InterfectorRefs instead of InterceptorRefs. Thanks again for all the work put into this release! -- Allen Lee Center for the Study of Institutional Diversity [http://csid.asu.edu] School of Human Evolution and Social Change [http://shesc.asu.edu] College of Liberal Arts and Sciences Arizona State University | P.O. Box 872402 | Tempe, Arizona 85287-2402 Office: 480.727.0401 | Fax: 480.965.7671 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 conventions plugin questions
1) how does the conventions plugin handle missing actions or 404s? Previously I'd configured an error-page 404 handler in my web.xml that seemed to work well, but now any invalid / missing URL goes back to the IndexAction I configured to handle requests for /). Not sure why errors are redirected to /. They shouldn't, there is got to be some config somewhere making it do this, you can share more details on your config. 2) For some reason type conversion is no longer being performed on some of my domain models. As an example I have a LongitudeLatitudeBox that has Doubles for the longitude/latitude pairs, but OGNL is now complaining that LongitudeLatitudeBox doesn't have setters that take Strings. Any ideas on why this might happen after switching to the Conventions plugin? I am lost on this one also, please give us more details, or open a jira ticket. 3) Minor nitpick on http://struts.apache.org/2.x/docs/annotations.html has InterfectorRefs instead of InterceptorRefs. Dave took care of it. musachy -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org