You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Adam Ruggles (JIRA)" <ji...@apache.org> on 2007/06/14 17:44:27 UTC
[jira] Created: (WW-1993) Unable to submit lists without a
conversion.properties file
Unable to submit lists without a conversion.properties file
-----------------------------------------------------------
Key: WW-1993
URL: https://issues.apache.org/struts/browse/WW-1993
Project: Struts 2
Issue Type: Bug
Affects Versions: 2.0.8
Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
Reporter: Adam Ruggles
Priority: Minor
My Form looks like this:
<form ...>
<input type="hidden" name="invoices[0].id" value="24907" />
<input type="text" name="invoices[0].salesOrder" value="" />
<input type="hidden" name="invoices[1].id" value="24908" />
<input type="text" name="invoices[1].salesOrder" value="" />
<input type="hidden" name="invoices[2].id" value="24909" />
<input type="text" name="invoices[2].salesOrder" value="" />
...
...
</form>
My Action looks like this
/**
* A list of Invoices.
*/
private List<Invoice> invoices;
/**
* Sets invoices.
* @param invoices The invoices to set.
*/
public void setInvoices(final List<Invoice> invoices) {
this.invoices = invoices;
}
In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WW-1993) Unable to submit lists
without a conversion.properties file
Posted by "Rene Gielen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41356 ]
Rene Gielen edited comment on WW-1993 at 7/4/07 1:43 PM:
---------------------------------------------------------
Yes, I can confirm this, too.
Basically, xwork does the same as before - automatically use GenericsObjectTypeDeterminer if found classpath. But from xwork 2.x on, this does not make sense any more, since it does not longer depend on additional tiger jar being deployed to activate Java5 support, and GenericsObjectTypeDeterminer will always be found in Classpath.
I've filed and fixed an issue for this in xwork:
http://jira.opensymphony.com/browse/XW-536
The output should now be less confusing.
+1 fo setting GenericsObjectTypeDeterminer as the default for Struts2, instead of DefaultObjectTypeDeterminer as it is now...
was:
Yes, I confirm this, too.
Basically, xwork does the same as before - automatically use GenericsObjectTypeDeterminer if found classpath. But from xwork 2.x on, this does not make sense any more, since it does not longer depend on additional tiger jar being deployed to activate Java5 support, and GenericsObjectTypeDeterminer will always be found in Classpath.
I've filed and fixed an issue for this in xwork:
http://jira.opensymphony.com/browse/XW-536
The output should now be less confusing.
+1 fo setting GenericsObjectTypeDeterminer as the default for Struts2, instead of DefaultObjectTypeDeterminer as it is now...
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Assignee: Rene Gielen
> Priority: Minor
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "Rene Gielen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41838 ]
Rene Gielen commented on WW-1993:
---------------------------------
Following issues are related and fixed:
http://jira.opensymphony.com/browse/XW-527
http://jira.opensymphony.com/browse/XW-536
http://jira.opensymphony.com/browse/XW-539
http://jira.opensymphony.com/browse/XW-540
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Assignee: Rene Gielen
> Priority: Minor
> Fix For: 2.1.0
>
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "Rene Gielen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rene Gielen reassigned WW-1993:
-------------------------------
Assignee: Rene Gielen
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Assignee: Rene Gielen
> Priority: Minor
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "Rene Gielen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rene Gielen closed WW-1993.
---------------------------
Resolution: Fixed
Fix Version/s: 2.0.10
Generics handling should be default now, documentation updated.
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Assignee: Rene Gielen
> Priority: Minor
> Fix For: 2.0.10, 2.1.0
>
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "Björn-H. Moritz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41243 ]
Björn-H. Moritz commented on WW-1993:
-------------------------------------
The same problem here with Maps: with Struts 2.0.6 everything worked fine, with 2.0.8 I have to add a conversion.properties. I don't get a NullPointerException but a ClassCastException. The map is correctly set to the action, but in the map there are objects of a wrong type (Map<String,String[]) vs. Map<Integer,Integer>)
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Priority: Minor
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "Aymeric Levaux (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41337 ]
Aymeric Levaux commented on WW-1993:
------------------------------------
I faced the same problem and found the cause.
Prior to Xwork 2.0.3 the objectTypeDeterminer property in XWorkConverter was initialised using the instance created by the static block in ObjectTypeDeterminerFactory. This static block determines which implementation of the ObjectTypeDeterminer must be instantiated according to the Java version. This was quite useful: no need of extra configuration to get some benefits when using Java5+ versions.
In 2.0.3 the instance of ObjectTypeDeterminer in use is the one created in the Dispatcher (method init_PreloadConfiguration) and the implementation used depends of the value of struts.objectTypeDeterminer in struts.properties, which defaults to struts that points to the non generics implementation.
So applications developed with WebWork or prior Struts 2 versions that are taking benefits of the GenericsObjectTypeDeterminer are broken after migration to Struts 2.0.8 until the struts.objectTypeDeterminer in struts.properties is set to 'tiger'.
As Struts 2 is using Java 5, I guess that the default value of struts.objectTypeDeterminer should be 'tiger'.
And maybe the static block in ObjectTypeDeterminerFactory should be removed; it is a bit confusing when debugging.
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Priority: Minor
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes updated WW-1993:
-----------------------------
Fix Version/s: 2.1.0
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Assignee: Rene Gielen
> Priority: Minor
> Fix For: 2.1.0
>
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-1993) Unable to submit lists without a
conversion.properties file
Posted by "Rene Gielen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41356 ]
Rene Gielen commented on WW-1993:
---------------------------------
Yes, I confirm this, too.
Basically, xwork does the same as before - automatically use GenericsObjectTypeDeterminer if found classpath. But from xwork 2.x on, this does not make sense any more, since it does not longer depend on additional tiger jar being deployed to activate Java5 support, and GenericsObjectTypeDeterminer will always be found in Classpath.
I've filed and fixed an issue for this in xwork:
http://jira.opensymphony.com/browse/XW-536
The output should now be less confusing.
+1 fo setting GenericsObjectTypeDeterminer as the default for Struts2, instead of DefaultObjectTypeDeterminer as it is now...
> Unable to submit lists without a conversion.properties file
> -----------------------------------------------------------
>
> Key: WW-1993
> URL: https://issues.apache.org/struts/browse/WW-1993
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.8
> Environment: Mac OSX 10.4.9, Java 1.5.0_07-87, Tomcat 5.5.20
> Reporter: Adam Ruggles
> Assignee: Rene Gielen
> Priority: Minor
>
> My Form looks like this:
> <form ...>
> <input type="hidden" name="invoices[0].id" value="24907" />
> <input type="text" name="invoices[0].salesOrder" value="" />
> <input type="hidden" name="invoices[1].id" value="24908" />
> <input type="text" name="invoices[1].salesOrder" value="" />
> <input type="hidden" name="invoices[2].id" value="24909" />
> <input type="text" name="invoices[2].salesOrder" value="" />
> ...
> ...
> </form>
> My Action looks like this
> /**
> * A list of Invoices.
> */
> private List<Invoice> invoices;
> /**
> * Sets invoices.
> * @param invoices The invoices to set.
> */
> public void setInvoices(final List<Invoice> invoices) {
> this.invoices = invoices;
> }
> In struts 2.0.6 the form submits and works like expected. In struts 2.0.8 I get a null pointer when trying to access invoices in my action (basically it's not coming over). I've changed nothing but the struts.
> Adding a conversion.properties file allowed me to submit the form successfully. According to the docs and previous versions of struts and webwork the Generics definition of Invoice should have been sufficient. Adding the new Element annotation did not solve the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.