struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From usha <u...@justcommodity.com>
Subject Re: urgent RowsetDynaClass help
Date Mon, 27 Jan 2003 04:43:51 GMT
Hi

i am not geeting this conversion error while executing the qyery. i am 
getting this error when i try to create the Rowsetdynaclass from this 
resultset. How to use the Bigdecimal in dyna beans they are created by 
this rowsetDynaclass

Thanks
usha

Arunachalam Jaisankar wrote:

>Instead of  'long'  try using java.math.BigDecimal. It may work.
>By the way, where exactly you are getting conversion exception when
>executing the query or after that.
>
>----- Original Message -----
>From: "usha" <usha@justcommodity.com>
>To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>Sent: Monday, January 27, 2003 4:19 PM
>Subject: Re: urgent RowsetDynaClass help
>
>
>  
>
>>Hi
>>
>>my table field type is Integer.
>>
>>i am using the jboss 3.0 as the application server and interbase 6.0 as
>>the database.
>>
>>my problem is the when i check the columnclassname in the
>>resultsetmetadata its showing as Long, but when i check this with the
>>resultset getObject() its showing as Integer.
>>
>>how to get the correct classname in the resultsetmetadata. can you help
>>in this issue
>>
>>Thanks
>>usha
>>
>>
>>
>>Arunachalam Jaisankar wrote:
>>
>>    
>>
>>>I think this is internal conversion problem.
>>>
>>>Your property type is long and ivtransbatchid is converted into integer
>>>based on the databased field type.
>>>
>>>What is your table field type?
>>>
>>>Ensure your property type and table field type are similar or compatible.
>>>
>>>I faced similar problem with money field type and worked fine after I
>>>changed  it to numeric type.
>>>
>>>----- Original Message -----
>>>From: "usha" <usha@justcommodity.com>
>>>To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>>>Sent: Monday, January 27, 2003 3:47 PM
>>>Subject: Re: urgent RowsetDynaClass help
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>Hi Craig
>>>>
>>>>my property type is long only. can you suggest me what i can do to use
>>>>this RowsetDynaClass
>>>>
>>>>Thanks
>>>>usha
>>>>
>>>>Craig R. McClanahan wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>On Sat, 25 Jan 2003, usha wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Date: Sat, 25 Jan 2003 15:21:36 +0800
>>>>>>From: usha <usha@justcommodity.com>
>>>>>>Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
>>>>>>To: struts-user@jakarta.apache.org
>>>>>>Subject: urgent RowsetDynaClass help
>>>>>>
>>>>>>Hi
>>>>>>
>>>>>>i am trying to use the RowsetDynaclass in my actionform class like
>>>>>>            
>>>>>>
>this
>  
>
>>>>>>public Collection getBatchidlist() throws Exception {
>>>>>>     ....
>>>>>>     ....
>>>>>>      rs = stmt.executeQuery("select ivtransbatchid from ivtranshdr
>>>>>>order by ivtransbatchid");
>>>>>>      RowSetDynaClass rsdc = new RowSetDynaClass(rs);
>>>>>>      rows = rsdc.getRows();
>>>>>>      return rows;
>>>>>>}
>>>>>>
>>>>>>i am getting the following exception
>>>>>>
>>>>>>
>>>>>>org.apache.commons.beanutils.ConversionException: Cannot assign value
>>>>>>            
>>>>>>
>of
>  
>
>>>>>>type 'java.lang.Integer' to property 'ivtransbatchid' of type
>>>>>>'java.lang.Long'
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>Try making your property type "long" instead of "int".  It would be
>>>>>          
>>>>>
>nice
>  
>
>>>>>if the standard converters did widening and narrowing conversions when
>>>>>possible (would make a good enhancement request), but at the moment
>>>>>          
>>>>>
>they
>  
>
>>>>>do not.
>>>>>
>>>>>Craig
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>To unsubscribe, e-mail:
>>>>>
>>>>>
>>>>>          
>>>>>
>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>>For additional commands, e-mail:
>>>>>
>>>>>
>>>>>          
>>>>>
>>><mailto:struts-user-help@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>>          
>>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>>
>>>>
>>>>        
>>>>
>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>For additional commands, e-mail:
>>>>
>>>>
>>>>        
>>>>
>>><mailto:struts-user-help@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>        
>>>>
>>>--
>>>To unsubscribe, e-mail:
>>>      
>>>
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>  
>
>>>For additional commands, e-mail:
>>>      
>>>
><mailto:struts-user-help@jakarta.apache.org>
>  
>
>>>      
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><mailto:struts-user-help@jakarta.apache.org>
>  
>
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>  
>




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


Mime
View raw message