我在 Wso2 EI 6.1.1 中使用AS400 PCML 连接器来调用 AS400-DB2 远程程序调用。
问题:如果在 log4j.properties(wso2ei-6.1.1\conf) 中为rootlogger 启用了 DEBUG 级别日志 ,则 PCML 调用不起作用并引发错误:NativeWorkerPool 未捕获异常。
完整的堆栈跟踪:
错误 - NativeWorkerPool 未捕获异常 java.lang.NoSuchMethodError: com.ibm.as400.access.SocketProperties.getLoginTimeout()I at org.wso2.carbon.connector.pcml.AS400Initialize.getSocketProperties(AS400Initialize.java:297) at org.wso2 .carbon.connector.pcml.AS400Initialize.getConnectionPool(AS400Initialize.java:216) 在 org.wso2.carbon.connector.pcml.AS400Initialize.connect(AS400Initialize.java:78) 在 org.wso2.carbon.connector.core.AbstractConnector .mediate(AbstractConnector.java:32) 在 org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84) 在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) 在org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) 在 org.apache.synapse。mediators.template.TemplateMediator.mediate(TemplateMediator.java:104) at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148) at org.apache.synapse.mediators.template.InvokeMediator.mediate( InvokeMediator.java:84) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) at org.apache.synapse .mediators.template.TemplateMediator.mediate(TemplateMediator.java:104) 在 org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148) 在 org.apache.synapse.mediators.template.InvokeMediator.mediate (InvokeMediator.java:84) 在 org.apache.synapse.mediators.AbstractListMediator。org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) org.apache.synapse.mediators.template.TemplateMediator.mediate(TemplateMediator.java:104) 中的调解(AbstractListMediator.java:97) .apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:148) at org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:84) at org.apache.synapse.mediators.AbstractListMediator .mediate(AbstractListMediator.java:97) 在 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) 在 org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:169) 在org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) 在 org。apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) at org.apache.synapse.rest.Resource.process( Resource.java:343) 在 org.apache.synapse.rest.API.process(API.java:399) 在 org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123) 在 org.apache.synapse .rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101) at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java :304) 在 org.apache.axis2 的 org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78)。engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker. java:372) 在 org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151) 在 org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)processNonEntityEnclosureRESTHandler(ServerWorker.java:326) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)在 org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$ Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)processNonEntityEnclosureRESTHandler(ServerWorker.java:326) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)在 org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$ Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)
示例 PCML 文件:
<pcml version="4.0">
<program name="Validate" path="/QSYS.LIB/SVDGDG.LIB/PEB0012.PGM">
<data name="inputNIC" type="char" length="15" usage="input" />
<data name="inputIAC" type="char" length="4" usage="input" />
<data name="outputStatusCode" type="char" length="1" usage="output" />
</program>
</pcml>
在 log4j.properties 文件中启用 DEBUG 日志级别
log4j.rootLogger=DEBUG, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG, ERROR_LOGFILE
PCML 连接器配置应用类似于此链接:https ://docs.wso2.com/display/ESBCONNECTORS/Configuring+AS400+PCML+Connector+Operations
AS400驱动实现库:jt400
笔记:
- 如果 DEBUG 级别日志更改为更高级别(信息/错误)PCML 调用工作正常
- 我的实际要求是应用每个 API 调试日志。由于针对每个 API 调试日志提出了上述问题,我尝试在根记录器中全局启用调试级别日志(每个 -API 日志禁用)。但问题仍然存在。
- 启用连线日志不能满足我的要求。