启用DEBUG日志级别WSO2 EI 6.1.1

时间:2017-11-23 07:45:12

标签: wso2 log4j wso2esb wso2carbon wso2ei

我在Wso2 EI 6.1.1中使用AS400 PCML Connector来调用AS400-DB2远程程序调用。

问题: 如果在log4j.properties中为 rootlogger 启用了DEBUG级别日志(wso2ei-6.1.1 \ conf) ,PCML调用不起作用并抛出错误:NativeWorkerPool Uncaught exception。

完成堆栈跟踪:

  

错误 - NativeWorkerPool未捕获的异常   java.lang.NoSuchMethodError:   com.ibm.as400.access.SocketProperties.getLoginTimeout()我           在org.wso2.carbon.connector.pcml.AS400Initialize.getSocketProperties(AS400Initialize.java:297)           在org.wso2.carbon.connector.pcml.AS400Initialize.getConnectionPool(AS400Initialize.java:216)           在org.wso2.carbon.connector.pcml.AS400Initialize.connect(AS400Initialize.java:78)           at 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)           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)           在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.mediate(AbstractListMediator.java:97)           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)           在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.mediate(AbstractListMediator.java:97)           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)           在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.mediate(AbstractListMediator.java:97)           at 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)           at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)           在org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)           在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)           在org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)           在org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304)           at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78)           在org.apache.axis2.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)           at 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驱动程序实现lib:jt400

注意:

  • 如果DEBUG级别日志更改为更高级别(信息/错误)PCML调用 工作正常
  • 我的实际要求是申请per-API DEBUG logs。自上述以来 为per-API DEBUG logs引发的问题,我尝试在root中全局启用DEBUG级别日志 记录器(每个-API日志禁用)。但问题仍然相同。
  • 启用电线记录不符合我的要求。

1 个答案:

答案 0 :(得分:0)

此错误是由于jt400.jar版本控制问题引起的。 可以使用最新版本的jt400.jar(目前为8.5版)解决此问题。