WSO2,仅从 API 调用的子查询出现数据源错误

WSO2, Data Source Error only with a subquery called from API

我有一个包含调用子查询的查询的数据源。
如果我通过 SOAP 请求(例如 SOAPUI)到达数据源,我没有任何问题。

如果我改为通过 WSO2 API 调用 SOAP 端点,或者如果我从主查询中删除子查询,我会得到以下 log/errors:

[2021-09-06 17:16:12,017]  INFO {TRACE_LOGGER} - Sending message through endpoint : UOServiceEP resolving to address = http://localhost:8290/services/UOService?wsdl
[2021-09-06 17:16:12,017]  INFO {TRACE_LOGGER} - SOAPAction: urn:getOrganigramma
[2021-09-06 17:16:12,018]  INFO {TRACE_LOGGER} - WSA-Action: urn:getOrganigramma
[2021-09-06 17:16:13,234] ERROR {OMSourcedElementImpl} - Could not get parser from data source for element {http://ws.wso2.org/dataservice}organigrammaUO javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:100)
....... 
 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:466)
    at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:182)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPostStoredProcQuery(SQLQuery.java:1031)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.runPostQuery(SQLQuery.java:2348)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.execute(Query.java:310)
    at org.wso2.micro.integrator.dataservices.core.engine.CallQuery.executeElement(CallQuery.java:280)
    at org.wso2.micro.integrator.dataservices.core.engine.OutputElement.execute(OutputElement.java:88)
    at org.wso2.micro.integrator.dataservices.core.description.operation.Operation.execute(Operation.java:56)
    at org.wso2.micro.integrator.dataservices.core.engine.DataService.invoke(DataService.java:613)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:94)
    ... 21 more
Caused by: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPreStoredProcQuery(SQLQuery.java:966)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.runPreQuery(SQLQuery.java:2336)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.execute(Query.java:301)
    at org.wso2.micro.integrator.dataservices.core.engine.CallQuery.executeElement(CallQuery.java:280)
    at org.wso2.micro.integrator.dataservices.core.engine.OutputElement.execute(OutputElement.java:88)
    at org.wso2.micro.integrator.dataservices.core.engine.OutputElementGroup.executeElement(OutputElementGroup.java:105)
    at org.wso2.micro.integrator.dataservices.core.engine.OutputElement.execute(OutputElement.java:88)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.writeResultEntry(Query.java:443)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPostStoredProcQuery(SQLQuery.java:1023)
    ... 28 more
Caused by: DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:1529)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPreStoredProcQuery(SQLQuery.java:924)
    ... 36 more
Caused by: java.sql.SQLException: Statement closed.
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:110)
    at com.sun.proxy.$Proxy46.setString(Unknown Source)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.setStringValue(SQLQuery.java:2168)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.setParamInPreparedStatement(SQLQuery.java:1633)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:1514)
    ... 37 more

[2021-09-06 17:16:13,405] ERROR {DBInOutMessageReceiver} - Error in in-out message receiver java.lang.RuntimeException: Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:230)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getXMLStreamReader(OMSourcedElementImpl.java:501)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getXMLStreamReader(OMSourcedElementImpl.java:486)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getXMLStreamReaderWithoutCaching(OMSourcedElementImpl.java:510)
    at org.wso2.micro.integrator.dataservices.core.DBUtils.cloneAndReturnBuiltElement(DBUtils.java:996)
    at org.wso2.micro.integrator.dataservices.core.dispatch.DataServiceRequest.dispatch(DataServiceRequest.java:364)
    ...
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:100)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:105)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.getReader(DSOMDataSource.java:111)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:224)
    ... 18 more
Caused by: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPostStoredProcQuery(SQLQuery.java:1031)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.runPostQuery(SQLQuery.java:2348)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.execute(Query.java:310)
    ...
    at org.wso2.micro.integrator.dataservices.core.engine.DataService.invoke(DataService.java:613)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:94)
    ... 21 more
Caused by: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPreStoredProcQuery(SQLQuery.java:966)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.runPreQuery(SQLQuery.java:2336)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.execute(Query.java:301)
    ...
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.writeResultEntry(Query.java:443)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPostStoredProcQuery(SQLQuery.java:1023)
    ... 28 more
Caused by: DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:1529)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPreStoredProcQuery(SQLQuery.java:924)
    ... 36 more
Caused by: java.sql.SQLException: Statement closed.
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:110)
    at com.sun.proxy.$Proxy46.setString(Unknown Source)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.setStringValue(SQLQuery.java:2168)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.setParamInPreparedStatement(SQLQuery.java:1633)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:1514)
    ... 37 more

[2021-09-06 17:16:13,406] ERROR {ServerWorker} - Error processing POST request for : /services/UOService?wsdl org.apache.axis2.AxisFault: Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.DBUtils.createAxisFault(DBUtils.java:814)
    ...
    at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:100)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:105)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.getReader(DSOMDataSource.java:111)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:224)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getXMLStreamReader(OMSourcedElementImpl.java:501)
    ...
    at org.wso2.micro.integrator.dataservices.core.DataServiceProcessor.dispatch(DataServiceProcessor.java:40)
    at org.wso2.micro.integrator.dataservices.core.DBInOutMessageReceiver.invokeBusinessLogic(DBInOutMessageReceiver.java:81)
    ... 9 more
Caused by: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.



    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPostStoredProcQuery(SQLQuery.java:1031)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.runPostQuery(SQLQuery.java:2348)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.execute(Query.java:310)
    ...
    at org.wso2.micro.integrator.dataservices.core.engine.DataService.invoke(DataService.java:613)
    at org.wso2.micro.integrator.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:94)
    ... 21 more
Caused by: DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPreStoredProcQuery(SQLQuery.java:966)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.runPreQuery(SQLQuery.java:2336)
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.execute(Query.java:301)
    ....
    at org.wso2.micro.integrator.dataservices.core.description.query.Query.writeResultEntry(Query.java:443)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPostStoredProcQuery(SQLQuery.java:1023)
    ... 28 more
Caused by: DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:1529)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.processPreStoredProcQuery(SQLQuery.java:924)
    ... 36 more
Caused by: java.sql.SQLException: Statement closed.
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:110)
    at com.sun.proxy.$Proxy46.setString(Unknown Source)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.setStringValue(SQLQuery.java:2168)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.setParamInPreparedStatement(SQLQuery.java:1633)
    at org.wso2.micro.integrator.dataservices.core.description.query.SQLQuery.createProcessedPreparedStatement(SQLQuery.java:1514)
    ... 37 more

[2021-09-06 17:16:13,436]  INFO {LogMediator} - {api:MDMCore:v1.0.0} To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:db58c128-25ce-494f-ab11-79af66292475, correlation_id: 8f009d24-0b4a-45c4-bce6-d8ffc2e1ddd0, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault xmlns:axis2ns10="http://ws.wso2.org/dataservice"><faultcode>axis2ns10:DATABASE_ERROR</faultcode><faultstring>Error obtaining parser from data source:DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


DS Code: DATABASE_ERROR
Source Data Service:-
Name: UOService
Location: /home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs
Description: Exposing the MDM Core data service as a REST service.
    
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: getOrganigramma
Current Params: {data=2021-08-27T00:00:00, cod_uo=807}
Nested Exception:-
DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.


</faultstring><detail><axis2ns9:DataServiceFault xmlns:axis2ns9="http://ws.wso2.org/dataservice"><axis2ns9:current_params>{data=2021-08-27T00:00:00, cod_uo=807}</axis2ns9:current_params><axis2ns9:source_data_service><axis2ns9:data_service_name>UOService</axis2ns9:data_service_name><axis2ns9:description>Exposing the MDM Core data service as a REST service.
    </axis2ns9:description><axis2ns9:location>/home/francesco/IntegrationStudio/runtime/microesb/tmp/carbonapps/-1234/1630940959815TestCompositeApplication_1.0.0.car/UOService_1.0.0/UOService-1.0.0.dbs</axis2ns9:location><axis2ns9:default_namespace>http://ws.wso2.org/dataservice</axis2ns9:default_namespace></axis2ns9:source_data_service><axis2ns9:ds_code>DATABASE_ERROR</axis2ns9:ds_code><axis2ns9:nested_exception>DS Fault Message: Error in 'SQLQuery.processStoredProcQuery': DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

DS Code: DATABASE_ERROR
Nested Exception:-
DS Fault Message: Error in 'createProcessedPreparedStatement'
DS Code: UNKNOWN_ERROR
Nested Exception:-
java.sql.SQLException: Statement closed.

</axis2ns9:nested_exception><axis2ns9:current_request_name>getOrganigramma</axis2ns9:current_request_name></axis2ns9:DataServiceFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

API序列:

    <resource methods="GET" url-mapping="/organigramma">
        <inSequence>
            <!--This is generated API skeleton. -->
            <!--Business Logic Goes Here -->
            <payloadFactory description="Create XML Payload" media-type="xml">
                <format>
                    <m:getOrganigramma xmlns:m="http://services.samples">
                        <m:request>
                            <m:cod_uo></m:cod_uo>
                            <m:data></m:data>
                        </m:request>
                    </m:getOrganigramma>
                </format>
                <args>
                    <arg evaluator="xml" expression="$url:cod_uo"/>
                    <arg evaluator="xml" expression="$url:data"/>
                </args>
            </payloadFactory>
            <header name="Action" scope="default" value="urn:getOrganigramma"/>
            <send>
                <endpoint key="gov:endpoints/UOServiceEP.xml"/>
            </send>
        </inSequence>
        <outSequence>
            <log level="full"/>
            <respond/>
        </outSequence>
        <faultSequence/>
    </resource>

数据服务:

  <operation name="getOrganigramma" returnRequestStatus="true">
    <call-query href="getOrganigramma">
      <with-param name="cod_uo" query-param="cod_uo" />
      <with-param name="data" query-param="data" />
    </call-query>
  </operation>
  <query id="getOrganigramma" useConfig="postgres">
    <sql>(main query)</sql>
    <param name="data" paramType="SCALAR" sqlType="TIMESTAMP" type="IN" optional="false" />
    <param name="cod_uo" paramType="SCALAR" sqlType="STRING" type="IN" optional="false" />
    <result element="organigrammaUO" rowName="UO">
      <element name="id" column="id" xsdType="integer" requiredRoles="" />
      <call-query href="getOrganigrammaFunctionalDependencies" requiredRoles="">
        <with-param name="cod_uo" column="cod_uo" />
      </call-query>
    </result>
  </query>
  <query id="getOrganigrammaFunctionalDependencies" useConfig="postgres">
    <sql>SELECT id FROM table WHERE cod_uo = :cod_uo::int</sql>
    <param name="cod_uo" paramType="SCALAR" sqlType="STRING" type="IN" optional="false" />
    <result element="organigrammaDipendenzeFunzionali" rowName="organigrammaDipendenze">
      <element name="id" column="cod_uo_df" xsdType="integer" />
    </result>
  </query>

我正在使用最新的 Integration Studio 8.0.0(及其 MicroIntegrator)

我会回答我自己的问题

不知何故, 内容会在那个单一的、单一的、特定的用例中导致错误...

错误:

<m:getOrganigramma xmlns:m="http://services.samples">
    <m:request>
        <m:cod_uo></m:cod_uo>
        <m:data></m:data>
    </m:request>
</m:getOrganigramma>

正确:

<m:getOrganigramma xmlns:m="http://services.samples">
    <m:cod_uo></m:cod_uo>
    <m:data></m:data>
</m:getOrganigramma>