commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niall Pemberton <niall.pember...@gmail.com>
Subject Re: bean utils : automatic type conversion newbie question
Date Wed, 04 Mar 2009 00:19:23 GMT
On Tue, Mar 3, 2009 at 2:24 PM, Paul Hussein <paul.hussein@hapnin.net> wrote:
> Hi,
>
> I am trying to use Bean Utils to fill my bean. I am expecting automatic
> conversion from String to BigDecimal or Float and various other base types.
> However for me this is not working.
>
>
> When I call
>
> PropertyUtils.setProperty(bean, "VALUE", "125.0")

PropertyUtils doesnt do conversion - it just calls the setter with the
supplied value - you need to use BeanUtils to get value conversion,
try

BeanUtils.setProperty(bean, "VALUE", "125.0")

Niall

> on a method
>
>    public void setVALUE(Float VALUE) {
>
> I get the error 'argument type mismatch - had objects of type
> "java.lang.String" but expected signature "java.lang.Float"'
>
> Am I missing somethimg ? DO I have to explicitly state which converters to
> use automatically ???
>
> Thanks
>
> Paul.
>
>
> 0    [main] DEBUG
> org.apache.commons.beanutils.converters.BooleanConverter.setDefaultValue  -
> Setting default value: false
> 6    [main] DEBUG
> org.apache.commons.beanutils.converters.BooleanConverter.convert  -
> Converting 'Boolean' value 'false' to type 'Boolean'
> 8    [main] DEBUG
> org.apache.commons.beanutils.converters.BooleanConverter.convert  -     No
> conversion required, value is already a Boolean
> 16   [main] DEBUG
> org.apache.commons.beanutils.converters.ByteConverter.setDefaultValue  -
> Setting default value: 0
> 19   [main] DEBUG
> org.apache.commons.beanutils.converters.ByteConverter.convert  - Converting
> 'Integer' value '0' to type 'Byte'
> 27   [main] DEBUG
> org.apache.commons.beanutils.converters.ByteConverter.convert  -
> Converted to Byte value '0'
> 30   [main] DEBUG
> org.apache.commons.beanutils.converters.CharacterConverter.setDefaultValue
> - Setting default value:
> 32   [main] DEBUG
> org.apache.commons.beanutils.converters.CharacterConverter.convert  -
> Converting 'Character' value ' ' to type 'Character'
> 33   [main] DEBUG
> org.apache.commons.beanutils.converters.CharacterConverter.convert  -     No
> conversion required, value is already a Character
> 36   [main] DEBUG
> org.apache.commons.beanutils.converters.DoubleConverter.setDefaultValue  -
> Setting default value: 0
> 37   [main] DEBUG
> org.apache.commons.beanutils.converters.DoubleConverter.convert  -
> Converting 'Integer' value '0' to type 'Double'
> 38   [main] DEBUG
> org.apache.commons.beanutils.converters.DoubleConverter.convert  -
> Converted to Double value '0.0'
> 40   [main] DEBUG
> org.apache.commons.beanutils.converters.FloatConverter.setDefaultValue  -
> Setting default value: 0
> 41   [main] DEBUG
> org.apache.commons.beanutils.converters.FloatConverter.convert  - Converting
> 'Integer' value '0' to type 'Float'
> 42   [main] DEBUG
> org.apache.commons.beanutils.converters.FloatConverter.convert  -
> Converted to Float value '0.0'
> 44   [main] DEBUG
> org.apache.commons.beanutils.converters.IntegerConverter.setDefaultValue  -
> Setting default value: 0
> 46   [main] DEBUG
> org.apache.commons.beanutils.converters.IntegerConverter.convert  -
> Converting 'Integer' value '0' to type 'Integer'
> 47   [main] DEBUG
> org.apache.commons.beanutils.converters.IntegerConverter.convert  -     No
> conversion required, value is already a Integer
> 48   [main] DEBUG
> org.apache.commons.beanutils.converters.LongConverter.setDefaultValue  -
> Setting default value: 0
> 49   [main] DEBUG
> org.apache.commons.beanutils.converters.LongConverter.convert  - Converting
> 'Integer' value '0' to type 'Long'
> 50   [main] DEBUG
> org.apache.commons.beanutils.converters.LongConverter.convert  -
> Converted to Long value '0'
> 52   [main] DEBUG
> org.apache.commons.beanutils.converters.ShortConverter.setDefaultValue  -
> Setting default value: 0
> 54   [main] DEBUG
> org.apache.commons.beanutils.converters.ShortConverter.convert  - Converting
> 'Integer' value '0' to type 'Short'
> 55   [main] DEBUG
> org.apache.commons.beanutils.converters.ShortConverter.convert  -
> Converted to Short value '0'
> 58   [main] DEBUG
> org.apache.commons.beanutils.converters.BigDecimalConverter.setDefaultValue
> - Setting default value: 0.0
> 59   [main] DEBUG
> org.apache.commons.beanutils.converters.BigDecimalConverter.convert  -
> Converting 'BigDecimal' value '0.0' to type 'BigDecimal'
> 60   [main] DEBUG
> org.apache.commons.beanutils.converters.BigDecimalConverter.convert  -
> No conversion required, value is already a BigDecimal
> 63   [main] DEBUG
> org.apache.commons.beanutils.converters.BigIntegerConverter.setDefaultValue
> - Setting default value: 0
> 64   [main] DEBUG
> org.apache.commons.beanutils.converters.BigIntegerConverter.convert  -
> Converting 'BigInteger' value '0' to type 'BigInteger'
> 65   [main] DEBUG
> org.apache.commons.beanutils.converters.BigIntegerConverter.convert  -
> No conversion required, value is already a BigInteger
> 66   [main] DEBUG
> org.apache.commons.beanutils.converters.BooleanConverter.setDefaultValue  -
> Setting default value: false
> 67   [main] DEBUG
> org.apache.commons.beanutils.converters.BooleanConverter.convert  -
> Converting 'Boolean' value 'false' to type 'Boolean'
> 70   [main] DEBUG
> org.apache.commons.beanutils.converters.BooleanConverter.convert  -     No
> conversion required, value is already a Boolean
> 71   [main] DEBUG
> org.apache.commons.beanutils.converters.ByteConverter.setDefaultValue  -
> Setting default value: 0
> 72   [main] DEBUG
> org.apache.commons.beanutils.converters.ByteConverter.convert  - Converting
> 'Integer' value '0' to type 'Byte'
> 73   [main] DEBUG
> org.apache.commons.beanutils.converters.ByteConverter.convert  -
> Converted to Byte value '0'
> 74   [main] DEBUG
> org.apache.commons.beanutils.converters.CharacterConverter.setDefaultValue
> - Setting default value:
> 75   [main] DEBUG
> org.apache.commons.beanutils.converters.CharacterConverter.convert  -
> Converting 'Character' value ' ' to type 'Character'
> 76   [main] DEBUG
> org.apache.commons.beanutils.converters.CharacterConverter.convert  -     No
> conversion required, value is already a Character
> 77   [main] DEBUG
> org.apache.commons.beanutils.converters.DoubleConverter.setDefaultValue  -
> Setting default value: 0
> 78   [main] DEBUG
> org.apache.commons.beanutils.converters.DoubleConverter.convert  -
> Converting 'Integer' value '0' to type 'Double'
> 79   [main] DEBUG
> org.apache.commons.beanutils.converters.DoubleConverter.convert  -
> Converted to Double value '0.0'
> 80   [main] DEBUG
> org.apache.commons.beanutils.converters.FloatConverter.setDefaultValue  -
> Setting default value: 0
> 81   [main] DEBUG
> org.apache.commons.beanutils.converters.FloatConverter.convert  - Converting
> 'Integer' value '0' to type 'Float'
> 81   [main] DEBUG
> org.apache.commons.beanutils.converters.FloatConverter.convert  -
> Converted to Float value '0.0'
> 82   [main] DEBUG
> org.apache.commons.beanutils.converters.IntegerConverter.setDefaultValue  -
> Setting default value: 0
> 83   [main] DEBUG
> org.apache.commons.beanutils.converters.IntegerConverter.convert  -
> Converting 'Integer' value '0' to type 'Integer'
> 84   [main] DEBUG
> org.apache.commons.beanutils.converters.IntegerConverter.convert  -     No
> conversion required, value is already a Integer
> 85   [main] DEBUG
> org.apache.commons.beanutils.converters.LongConverter.setDefaultValue  -
> Setting default value: 0
> 85   [main] DEBUG
> org.apache.commons.beanutils.converters.LongConverter.convert  - Converting
> 'Integer' value '0' to type 'Long'
> 86   [main] DEBUG
> org.apache.commons.beanutils.converters.LongConverter.convert  -
> Converted to Long value '0'
> 88   [main] DEBUG
> org.apache.commons.beanutils.converters.ShortConverter.setDefaultValue  -
> Setting default value: 0
> 89   [main] DEBUG
> org.apache.commons.beanutils.converters.ShortConverter.convert  - Converting
> 'Integer' value '0' to type 'Short'
> 90   [main] DEBUG
> org.apache.commons.beanutils.converters.ShortConverter.convert  -
> Converted to Short value '0'
> 92   [main] DEBUG
> org.apache.commons.beanutils.converters.StringConverter.setDefaultValue  -
> Setting default value:
> 92   [main] DEBUG
> org.apache.commons.beanutils.converters.StringConverter.convert  -
> Converting 'String' value '' to type 'String'
> 103  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Z@2cba5bdb
> 104  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'boolean[]' value '[Z@2cba5bdb' to type 'boolean[]'
> 105  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a boolean[]
> 105  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [B@53343ed0
> 106  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'byte[]' value '[B@53343ed0' to type 'byte[]'
> 107  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a byte[]
> 107  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [C@373c0b53
> 108  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'char[]' value '[C@373c0b53' to type 'char[]'
> 109  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a char[]
> 110  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [D@48bd6a5f
> 110  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'double[]' value '[D@48bd6a5f' to type 'double[]'
> 111  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a double[]
> 112  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [F@496614e7
> 112  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'float[]' value '[F@496614e7' to type 'float[]'
> 113  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a float[]
> 114  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [I@2c979e8b
> 115  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'int[]' value '[I@2c979e8b' to type 'int[]'
> 115  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a int[]
> 116  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [J@12b754b2
> 117  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'long[]' value '[J@12b754b2' to type 'long[]'
> 117  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a long[]
> 118  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [S@17094d48
> 119  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'short[]' value '[S@17094d48' to type 'short[]'
> 120  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a short[]
> 122  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.math.BigDecimal;@687bc899
> 122  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'BigDecimal[]' value '[Ljava.math.BigDecimal;@687bc899' to type
> 'BigDecimal[]'
> 123  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a BigDecimal[]
> 125  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.math.BigInteger;@359eda2c
> 126  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'BigInteger[]' value '[Ljava.math.BigInteger;@359eda2c' to type
> 'BigInteger[]'
> 127  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a BigInteger[]
> 128  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Boolean;@4c349471
> 128  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Boolean[]' value '[Ljava.lang.Boolean;@4c349471' to type 'Boolean[]'
> 129  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Boolean[]
> 130  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Byte;@579d75ee
> 131  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Byte[]' value '[Ljava.lang.Byte;@579d75ee' to type 'Byte[]'
> 132  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Byte[]
> 133  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Character;@286e4365
> 134  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Character[]' value '[Ljava.lang.Character;@286e4365' to type 'Character[]'
> 134  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Character[]
> 135  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Double;@36d1c778
> 136  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Double[]' value '[Ljava.lang.Double;@36d1c778' to type 'Double[]'
> 137  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Double[]
> 138  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Float;@6833f0de
> 139  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Float[]' value '[Ljava.lang.Float;@6833f0de' to type 'Float[]'
> 140  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Float[]
> 141  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Integer;@774acfcd
> 141  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Integer[]' value '[Ljava.lang.Integer;@774acfcd' to type 'Integer[]'
> 142  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Integer[]
> 143  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Long;@559113f8
> 144  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Long[]' value '[Ljava.lang.Long;@559113f8' to type 'Long[]'
> 145  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Long[]
> 146  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Short;@28ab54eb
> 147  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Short[]' value '[Ljava.lang.Short;@28ab54eb' to type 'Short[]'
> 148  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Short[]
> 149  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.String;@4c53ab04
> 150  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'String[]' value '[Ljava.lang.String;@4c53ab04' to type 'String[]'
> 150  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a String[]
> 151  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.lang.Class;@ee51b2c
> 152  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Class[]' value '[Ljava.lang.Class;@ee51b2c' to type 'Class[]'
> 153  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Class[]
> 153  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.util.Date;@66941db6
> 154  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Date[]' value '[Ljava.util.Date;@66941db6' to type 'Date[]'
> 155  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Date[]
> 156  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.util.Calendar;@63cd66ea
> 156  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'Calendar[]' value '[Ljava.util.Calendar;@63cd66ea' to type 'Calendar[]'
> 157  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a Calendar[]
> 158  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.io.File;@326b9c84
> 159  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'java.io.File[]' value '[Ljava.io.File;@326b9c84' to type 'java.io.File[]'
> 160  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a java.io.File[]
> 161  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.sql.Date;@75be16f5
> 162  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'java.sql.Date[]' value '[Ljava.sql.Date;@75be16f5' to type
> 'java.sql.Date[]'
> 163  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a java.sql.Date[]
> 164  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.sql.Time;@7971f189
> 164  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'java.sql.Time[]' value '[Ljava.sql.Time;@7971f189' to type
> 'java.sql.Time[]'
> 165  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a java.sql.Time[]
> 166  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.sql.Timestamp;@2d7cec96
> 167  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'java.sql.Timestamp[]' value '[Ljava.sql.Timestamp;@2d7cec96' to type
> 'java.sql.Timestamp[]'
> 167  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a java.sql.Timestamp[]
> 168  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.setDefaultValue  -
> Setting default value: [Ljava.net.URL;@4b947496
> 169  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  - Converting
> 'java.net.URL[]' value '[Ljava.net.URL;@4b947496' to type 'java.net.URL[]'
> 170  [main] DEBUG
> org.apache.commons.beanutils.converters.ArrayConverter.convert  -     No
> conversion required, value is already a java.net.URL[]
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: Found STRING cell in with value : DTS
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for FISHING_TECH : 'DTS'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: Found STRING cell in with value : DTS
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for FISHING_TECH : 'DTS'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader read
> INFO: DATA : FISHING_TECH, DTS
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for COMMENTS : 'null'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for COMMENTS : 'null'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader read
> INFO: DATA : COMMENTS, null
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: Found STRING cell in with value : VL0012
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for VESSEL_LENGTH : 'VL0012'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: Found STRING cell in with value : VL0012
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for VESSEL_LENGTH : 'VL0012'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader read
> INFO: DATA : VESSEL_LENGTH, VL0012
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: Found NUMERIC cell in with value : 125.0
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for VALUE : '125.0'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: Found NUMERIC cell in with value : 125.0
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader
> getString
> INFO: ############## Value for VALUE : '125.0'
> Mar 3, 2009 3:16:50 PM it.jrc.fish.datacollection.excel.ExcelReader read
> INFO: DATA : VALUE, 125.0
> java.lang.IllegalArgumentException: Cannot invoke
> it.jrc.fish.datacollection.data.CAPACITY.setVALUE on bean class 'class
> it.jrc.fish.datacollection.data.CAPACITY' - argument type mismatch - had
> objects of type "java.lang.String" but expected signature "java.lang.Float"
>    at
> org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2181)
>    at
> org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2141)
>    at
> org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1948)
>    at
> org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2054)
>    at
> org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:858)
>    at
> it.jrc.fish.datacollection.excel.ExcelReader.read(ExcelReader.java:208)
>    at
> it.jrc.fish.datacollection.excel.ExcelReaderTest.testRead(ExcelReaderTest.java:93)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>

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


Mime
View raw message