我試圖將數據插入到數據庫表&我收到以下錯誤:騾:DB插入失敗,超時
異常堆棧: 1.超時超標(java.util.concurrent.TimeoutException) com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider:426(null) 2.發送HTTP請求時出錯。消息有效載荷的類型爲:字符串(org.mule.api.MessagingException) org.mule.module.http.internal.request.DefaultHttpRequester:287(http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
根異常堆棧跟蹤: 的java。 util.concurrent.TimeoutException:超時時間超過 at com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider.timeout(GrizzlyAsyncHttpProvider.java:426) at com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider $ 3.onTimeout (GrizzlyAsyncHttpProvider.java:274) at org.glassfish.grizzly.utils.IdleTimeoutFilter $ DefaultWorker.doWork(IdleTimeoutFilter.java:398) at org.glassfish.griz zly.utils.IdleTimeoutFilter $ DefaultWorker.doWork(IdleTimeoutFilter.java:377) at org.glassfish.grizzly.utils.DelayedExecutor $ DelayedRunnable.run(DelayedExecutor.java:158) at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1142) 在java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)
我插入代碼如下:
<flow name="api-main">
<http:listener config-ref="db-system-api-httpListenerConfig" path="/api/*" doc:name="HTTP"/>
<apikit:router config-ref="db-system-api-config" doc:name="APIkit Router"/>
<exception-strategy ref="db-system-api-apiKitGlobalExceptionMapping" doc:name="Reference Exception Strategy"/>
</flow>
<flow name="put:/contract/{id}:db-system-api-config" processingStrategy="synchronous" >
<set-property propertyName="Content-Type" value="application/json" doc:name="Set Content Type"/>
<logger message="#[payload]" level="INFO" doc:name="Initial Payload"/>
<json:json-to-object-transformer returnClass="java.util.HashMap" mimeType="text/plain" doc:name="JSON to Object"/>
<foreach collection="#[payload.entrySet()]" doc:name="For Each">
<db:insert config-ref="Oracle_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[INSERT INTO XX.XX_OE_HDR (ID,
NUMBER,
EFF_START_DATE,
EFF_END_DATE,
CUST_NUMBER)
VALUES (xx.XX_HDR_SEQ.NEXTVAL,
xx.XX_HDR_NUM_SEQ.NEXTVAL,
TO_DATE('2017-05-23','YYYY-MM-DD HH24:MI:SS'),
TO_DATE('2017-06-23','YYYY-MM-DD HH24:MI:SS'),
#[payload.myField])]]></db:parameterized-query>
</db:insert>
</foreach>
<logger message="Record successful" level="INFO" doc:name="Log Success"/>
任何人都可以輸入嗎? – insaneyogi