You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rhys J <rh...@gmail.com> on 2020/01/16 17:05:12 UTC

Error while updating: java.lang.NumberFormatException: empty String

While updating my Solr core, I ran into a problem with this curl statement.

When I looked up the error, the only reference I could find was that maybe
a float was being added as null. So I changed all the float fields from
'null' to '0.00'. But I still get the error.

Float fields as per the schema:

adjust_int

adjust_princ

cur_bal_original_currency

manual_orig_balance

orig_int_amt

orig_princ_amt

princ_paid

Curl statement:

curl http://localhost:8983/solr/debt/update?commit=true -d "[{ 'id':
'636628-242', 'adjust_int': {'set': '0.00'},'adjust_princ': {'set':
'0.00'},'clt_id': {'set': '3017'},'clt_ref_no': {'set':
'1057-43261-9/128694'},'comments': {'set': ' '},'contract_number': {'set':
'1057-43261-9'},'cur_bal_original_currency': {'set':
'0.00'},'currency_conv': {'set': '0.00'},'debt_descr': {'set': 'PO/XREF:
994042088'},'debt_id': {'set': '636628'},'debt_no': {'set':
'242'},'debt_type': {'set': 'COM'},'delq_date': {'set':
'2020-01-30T00:00:00Z'},'internal_adjustment': {'set':
'0'},'invoice_currency': {'set': null},'last_spreadsheet_date': {'set':
null},'list_date': {'set': '2019-12-31T00:00:00Z'},'manual_change': {'set':
null},'manual_orig_balance': {'set': '0.00'},'orig_clt': {'set':
'3017'},'orig_int_amt': {'set': '0.00'},'orig_princ_amt': {'set':
'480.00'},'original_invoice': {'set': null},'potential_bad_debt': {'set':
'0'},'primary_debtor_id': {'set': null},'princ_paid': {'set':
'0.00'},'reference_no': {'set':
'invoice:1057-43261-9/128694'},'reg_number': {'set': null},'salesperson':
{'set': 'Bob Drummond'},'serv_date': {'set':
'2019-12-31T00:00:00Z'},'shipper_name': {'set': null},'status_code':
{'set': ' '},'status_date': {'set':
'2020-01-16T00:00:00Z'},'storage_account': {'set': '0'},'time_stamp':
{'set': '2019-12-31T23:35:00Z'},}]"


Thanks,


Rhys

Re: Error while updating: java.lang.NumberFormatException: empty String

Posted by rhys J <rh...@gmail.com>.
On Thu, Jan 16, 2020 at 3:10 PM Edward Ribeiro <ed...@gmail.com>
wrote:

> Hi,
>
> There is a status_code in the JSON snippet and it is going as a string with
> single space. Maybe it is an integer?
>
> Best,
> Edward
>
>
Oh wow, yes you are right. When I adjusted the status_code to not be a
space, it fixed everything.

I had forgotten that status_code was an integer.

It turned out that a database update had an error, and the status_code was
not entered. So my script is now handling whether the status_code is empty,
and adjusting accordingly.

Thanks,

Rhys

Re: Error while updating: java.lang.NumberFormatException: empty String

Posted by Edward Ribeiro <ed...@gmail.com>.
Hi,

There is a status_code in the JSON snippet and it is going as a string with
single space. Maybe it is an integer?

Best,
Edward


On Thu, Jan 16, 2020 at 2:06 PM rhys J <rh...@gmail.com> wrote:

> While updating my Solr core, I ran into a problem with this curl statement.
>
> When I looked up the error, the only reference I could find was that maybe
> a float was being added as null. So I changed all the float fields from
> 'null' to '0.00'. But I still get the error.
>
> Float fields as per the schema:
>
> adjust_int
>
> adjust_princ
>
> cur_bal_original_currency
>
> manual_orig_balance
>
> orig_int_amt
>
> orig_princ_amt
>
> princ_paid
>
> Curl statement:
>
> curl http://localhost:8983/solr/debt/update?commit=true -d "[{ 'id':
> '636628-242', 'adjust_int': {'set': '0.00'},'adjust_princ': {'set':
> '0.00'},'clt_id': {'set': '3017'},'clt_ref_no': {'set':
> '1057-43261-9/128694'},'comments': {'set': ' '},'contract_number': {'set':
> '1057-43261-9'},'cur_bal_original_currency': {'set':
> '0.00'},'currency_conv': {'set': '0.00'},'debt_descr': {'set': 'PO/XREF:
> 994042088'},'debt_id': {'set': '636628'},'debt_no': {'set':
> '242'},'debt_type': {'set': 'COM'},'delq_date': {'set':
> '2020-01-30T00:00:00Z'},'internal_adjustment': {'set':
> '0'},'invoice_currency': {'set': null},'last_spreadsheet_date': {'set':
> null},'list_date': {'set': '2019-12-31T00:00:00Z'},'manual_change': {'set':
> null},'manual_orig_balance': {'set': '0.00'},'orig_clt': {'set':
> '3017'},'orig_int_amt': {'set': '0.00'},'orig_princ_amt': {'set':
> '480.00'},'original_invoice': {'set': null},'potential_bad_debt': {'set':
> '0'},'primary_debtor_id': {'set': null},'princ_paid': {'set':
> '0.00'},'reference_no': {'set':
> 'invoice:1057-43261-9/128694'},'reg_number': {'set': null},'salesperson':
> {'set': 'Bob Drummond'},'serv_date': {'set':
> '2019-12-31T00:00:00Z'},'shipper_name': {'set': null},'status_code':
> {'set': ' '},'status_date': {'set':
> '2020-01-16T00:00:00Z'},'storage_account': {'set': '0'},'time_stamp':
> {'set': '2019-12-31T23:35:00Z'},}]"
>
>
> Thanks,
>
>
> Rhys
>