Hi, You have passed String 'null' as the parameter value. Try calling the service without setting anything to the fields you have allowed null compatible in the following SQL.
"select id, name, created_at, updated_at, quantity from products where (:id is null or id = :id) or (:name is null or name like :name) or (:created_at is null or created_at = :created_at) or (:updated_at is null or updated_at = :updated_at) or (:quantity is null or quantity = :quantity)" Anyway, this is a bug we need to fix in the next release. Please raise a JIRA issue. /sumedha On Wed, Jun 9, 2010 at 10:41 PM, <[email protected]> wrote: > Occurred errors in my tests with WSO2 Data Services Server 2.5.0 4RC22. > > My problems occurred when I use field type for input of types: date, > timestamp and int and I try passed "null" in value. > > In attachment my service and mysql dump. > > > > Erros recevieds in log: > > === with all fields "NULL" > > Name: Products > Location: > > /home/lsaraiva/Applications/wso2/wso2dataservices-2.5.0/repository/deployment/server/dataservices/Products.dbs > Description: N/A > Default Namespace: http://ws.wso2.org/dataservice > Current Request Name: selectProduct > Current Params: {id=null, updated_at=null, name=null, created_at=null, > quantity=null} > Nested Exception:- > java.lang.NumberFormatException: For input string: "null" > at > > java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:449) > at java.lang.Integer.parseInt(Integer.java:499) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.setIntValue(SQLQuery.java:1329) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.setParamInPreparedStatement(SQLQuery.java:832) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:813) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.processNormalQuery(SQLQuery.java:471) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.runQuery(SQLQuery.java:1411) > at > org.wso2.carbon.dataservices.dispatch.query.Query.execute(Query.java:214) > at > org.wso2.carbon.dataservices.dispatch.CallQuery.execute(CallQuery.java:154) > at > > org.wso2.carbon.dataservices.dispatch.CallQueryGroup.execute(CallQueryGroup.java:108) > at > > org.wso2.carbon.dataservices.dispatch.operation.Operation.execute(Operation.java:63) > at > > org.wso2.carbon.dataservices.dispatch.DataService.invoke(DataService.java:327) > at > > org.wso2.carbon.dataservices.dispatch.DSOMDataSource.serialize(DSOMDataSource.java:90) > > > === with id = 1 and other all fields "NULL" > > Name: Products > Location: > > /home/lsaraiva/Applications/wso2/wso2dataservices-2.5.0/repository/deployment/server/dataservices/Products.dbs > Description: N/A > Default Namespace: http://ws.wso2.org/dataservice > Current Request Name: selectProduct > Current Params: {id=1, updated_at=null, name=null, created_at=null, > quantity=null} > Nested Exception:- > java.lang.RuntimeException: In valid string to parse > at > > org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:603) > at org.wso2.carbon.dataservices.DBUtils.getDate(DBUtils.java:521) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.setDateValue(SQLQuery.java:995) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.setParamInPreparedStatement(SQLQuery.java:851) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:813) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.processNormalQuery(SQLQuery.java:471) > at > > org.wso2.carbon.dataservices.dispatch.query.SQLQuery.runQuery(SQLQuery.java:1411) > at > org.wso2.carbon.dataservices.dispatch.query.Query.execute(Query.java:214) > at > org.wso2.carbon.dataservices.dispatch.CallQuery.execute(CallQuery.java:154) > at > > org.wso2.carbon.dataservices.dispatch.CallQueryGroup.execute(CallQueryGroup.java:108) > at > > org.wso2.carbon.dataservices.dispatch.operation.Operation.execute(Operation.java:63) > at > > org.wso2.carbon.dataservices.dispatch.DataService.invoke(DataService.java:327) > at > > org.wso2.carbon.dataservices.dispatch.DSOMDataSource.serialize(DSOMDataSource.java:90) > > > > On Sat, 5 Jun 2010 09:25:03 +0530, Milinda Pathirage <[email protected]> > wrote: > > http://builder.wso2.org/~carbon/releases/carbon/3.0.0/4RC22/ > > > > <http://builder.wso2.org/~carbon/releases/carbon/3.0.0/4RC22/>Thanks > > Milinda > > > > > > _______________________________________________ > Carbon-dev mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >
_______________________________________________ Carbon-dev mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
