PSQLException:错误:编码“UTF8”的无效字节序列:0x00。查询中没有空值

时间:2017-01-03 12:37:06

标签: java postgresql

查询:

  

插入订单(id,lead_id,user_id,status,purchase_mode,   bid_id,amt_charged_buyer,payment_medium,reference_id,referral_id,   callcenter_id,reseller_id,reseller_oid,desk_username,desk_type,   generation_time,comments,invoice_number,is_accounted,   pre_booking_info,order_type,initial_snapshot,reason,payment_fee,   misc,supplier_id,approval_code,partner_id,process_time,   distributor_id,custom_reference,booker_type,is_excel_accounted,   cc_id,departure_time,is_confirmed,is_payment_made,tds_rate,   r_department_id,r_band_id,r_administrator_id,   is_group_booking,sourcetype,deviceid)值   ( '9484', ' - 1', '326', 'N', '', ' - 1', '118', 'd', 'DDD00007AUEV', ' - 1', ' - 1','326 ' '', '', ' - ',' 2017年1月3日   16:29:26.743000   04:00:00' , '::::', '', '0', '', 'IntlInsuranceOrder', '118.00#', '', '0.0','真:真:假::: -1 ::: 0:',' - 1','SYSTEM',' - 1','2017-01-03 16:29:43.049000   04:00:00' , ' - 1', '', 'A', '0', ' - 1',NULL, '0', '0', '0.0', ' - 1',' - 1' , ' - 1', '0', '1', '')

在PG SQL中执行查询时出现以下错误

org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) ~[postgresql.jar:na]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) ~[postgresql.jar:na]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) ~[postgresql.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500) ~[postgresql.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) ~[postgresql.jar:na]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) ~[postgresql.jar:na]
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[tomcat-dbcp.jar:7.0.55]
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[tomcat-dbcp.jar:7.0.55]
at com.eos.accounts.orders.Order.storeOrder(Order.java:1239) ~[flightraja.jar:na]

然而,当我直接在PG admin上执行相同的查询时,它给了我成功

0 个答案:

没有答案