You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Reuben Firmin <Re...@Copart.Com> on 2006/10/27 00:59:02 UTC

Problem addressing list index in a parameter declaration

I have the following code:


public class Buyer
{
...
    private Address mailingAddress;
 
...


public class Address
{
    private List<String> addressLine;
...
    public List<String> getAddressLine()
    {


In my insert statement, I'm addressing this as:

#mailingAddress.addressLine[0]#, #mailingAddress.addressLine[1]#,

When I start the webapp, I'm getting this exception:

[15:36:42.468] Caused by: com.ibatis.common.beans.ProbeException: There is no READABLE property named 'addressLine[0]' in class 'com.copart.xxx.Address'
[15:36:42.468] at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:114)
[15:36:42.468] at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:75)
[15:36:42.468] at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:93)
[15:36:42.468] at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:63)
[15:36:42.468] at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)

What's wrong with my code?

Thanks!
Reuben

Re: Problem addressing list index in a parameter declaration

Posted by Brandon Goodin <br...@gmail.com>.
Are you using the most current iBATIS version?

Brandon

On 10/26/06, Reuben Firmin <Re...@copart.com> wrote:
>
> I have the following code:
>
>
> public class Buyer
> {
> ...
>     private Address mailingAddress;
>
> ...
>
>
> public class Address
> {
>     private List<String> addressLine;
> ...
>     public List<String> getAddressLine()
>     {
>
>
> In my insert statement, I'm addressing this as:
>
> #mailingAddress.addressLine[0]#, #mailingAddress.addressLine[1]#,
>
> When I start the webapp, I'm getting this exception:
>
> [15:36:42.468] Caused by: com.ibatis.common.beans.ProbeException: There is
> no READABLE property named 'addressLine[0]' in class '
> com.copart.xxx.Address'
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.processNodelet(
> NodeletParser.java:114)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.process(
> NodeletParser.java:75)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.process(
> NodeletParser.java:93)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.parse(
> NodeletParser.java:63)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.parse(
> NodeletParser.java:51)
>
> What's wrong with my code?
>
> Thanks!
> Reuben
>

Re: Problem addressing list index in a parameter declaration

Posted by Clinton Begin <cl...@gmail.com>.
Looks like a bug.....but I can't believe nobody has hit it before.....

Can you create a JIRA issue for it?

Cheers,
Clinton

On 10/26/06, Reuben Firmin <Re...@copart.com> wrote:
>
> I have the following code:
>
>
> public class Buyer
> {
> ...
>     private Address mailingAddress;
>
> ...
>
>
> public class Address
> {
>     private List<String> addressLine;
> ...
>     public List<String> getAddressLine()
>     {
>
>
> In my insert statement, I'm addressing this as:
>
> #mailingAddress.addressLine[0]#, #mailingAddress.addressLine[1]#,
>
> When I start the webapp, I'm getting this exception:
>
> [15:36:42.468] Caused by: com.ibatis.common.beans.ProbeException: There is
> no READABLE property named 'addressLine[0]' in class '
> com.copart.xxx.Address'
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.processNodelet(
> NodeletParser.java:114)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.process(
> NodeletParser.java:75)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.process(
> NodeletParser.java:93)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.parse(
> NodeletParser.java:63)
> [15:36:42.468] at com.ibatis.common.xml.NodeletParser.parse(
> NodeletParser.java:51)
>
> What's wrong with my code?
>
> Thanks!
> Reuben
>