这是 WSO2DSS 的错误,或者它没有未来我正在将时代值从 WSO2 ESB 发送到 WSO2 DSS 并触发这个自定义查询
INSERT INTO public.emp2(e_device,e_amount,e_no,jointime) VALUES(?,?,?,(SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 15555565225/1000 * INTERVAL '1 second'))
但它显示错误我的 DSS 配置是这样的
<query id="insert_emp2_query" useConfig="default">
<sql>INSERT INTO public.emp2(e_device,e_amount,e_no,jointime) VALUES(?,?,?,(SELECT TIMESTAMP 'epoch' + ?/1000 * INTERVAL '1 second'))</sql>
<param name="e_device" ordinal="1" sqlType="STRING"/>
<param name="e_amount" ordinal="2" sqlType="STRING"/>
<param name="e_no" ordinal="3" sqlType="INTEGER"/>
<param name="jointime" ordinal="4" sqlType="TIMESTAMP"/>
</query
WSO2 DSS端的错误是这样的
Nested Exception:-
java.lang.NumberFormatException: date string can not be less than 19 characters
<soapenv:Reason>
<soapenv:Text xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace">DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: emp2_DataService
Location: /emp2_DataService.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: insert_emp2_operation
Current Params: {jointime=1361855692325, e_amount=5, e_no=5, e_device=5}
Nested Exception:-
java.lang.NumberFormatException: date string can not be less than 19 characters
</soapenv:Text>
</soapenv:Reaso