Mule DevKit - 变换器/无法加载应用程序的类

时间:2016-01-13 03:29:48

标签: maven mule mule-studio

我在Mule DevKit中实现了一个带变换器的连接器(3.7 - 最新)。我成功构建(maven)并在Studio中安装。 Transformer的功能是在运行时加载作为参数(来自有效负载)传递的类,并访问其方法以设置某些对象并构造特定于第三方协议的消息格式。当我运行应用程序时,它会启动并成功部署;但得到Classnotfound异常。请建议/推荐一个解决方案。

我的变压器类中的代码;其中wsClassName作为org.aa.bb.cc.MemberSearchRequestInfo传递(参考日志)

woClassObject = Class.forName(wsClassName).newInstance();

Mule项目在src / main / java下的指定包中有MemberSearchRequestInfo类

以下是日志。

2016-01-12 20:54:05,555 [[testzzmbrview1].HTTP_Listener_Configuration.worker.01] ERROR org.mule.exception.DefaultMessagingExceptionStrategy - 
********************************************************************************
Message               : Failed to transform from "java.util.HashMap" to "java.lang.String"
Type                  : org.mule.api.transformer.TransformerException
Code                  : MULE_ERROR-109
JavaDoc               : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html
Transformer           : EnquiryMapToKkkkTransformer{this=c0fbf40, name='EnquiryMapToKkkkTransformer', ignoreBadInput=false, returnClass=SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}, sourceTypes=[SimpleDataType{type=java.util.HashMap, mimeType='*/*', encoding='null'}]}
********************************************************************************
Exception stack is:
1. org.aa.bb.cc.MemberSearchRequestInfo (java.lang.ClassNotFoundException)
  java.net.URLClassLoader$1:-1 (null)
2. Failed to transform from "java.util.HashMap" to "java.lang.String" (org.mule.api.transformer.TransformerException)
  org.mule.modules.xxxcore.transformers.EnquiryMapToKkkkTransformer:43 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html)
********************************************************************************
Root Exception stack trace:
java.lang.ClassNotFoundException: org.aa.bb.cc.MemberSearchRequestInfo
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.mule.module.launcher.FineGrainedControlClassLoader.findClass(FineGrainedControlClassLoader.java:175)
    at org.mule.module.launcher.FineGrainedControlClassLoader.loadClass(FineGrainedControlClassLoader.java:119)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.ddd.zz.common.KkkkRequestFormatter.applyFieldRule(KkkkRequestFormatter.java:223)
    at org.ddd.zz.common.KkkkRequestFormatter.getKkkkEnquiryRequest(KkkkRequestFormatter.java:309)
    at org.mule.modules.xxxcore.xxxcoreConnector.enquiryMapToKkkk(xxxcoreConnector.java:124)
    at org.mule.modules.xxxcore.transformers.EnquiryMapToKkkkTransformer.doTransform(EnquiryMapToKkkkTransformer.java:41)
    at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:415)
    at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:366)
    at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1604)
    at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1507)
    at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1485)
    at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1477)
    at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:114)
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
    at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
    at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94)
    at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56)
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
    at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
    at org.mule.routing.AbstractSelectiveRouter.processEventWithProcessor(AbstractSelectiveRouter.java:303)
    at org.mule.routing.AbstractSelectiveRouter.routeWithProcessors(AbstractSelectiveRouter.java:293)
    at org.mule.routing.AbstractSelectiveRouter.process(AbstractSelectiveRouter.java:193)
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
    at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
    at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:85)
    at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56)
    at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
    at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
    at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94)
    at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56)
    at org.mule.module.cxf.CxfInboundMessageProcessor.processNext(CxfInboundMessageProcessor.java:471)
    at org.mule.module.cxf.MuleInvoker$1.process(MuleInvoker.java:100)
    at org.mule.module.cxf.MuleInvoker$1.process(MuleInvoker.java:96)
    at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:16)
    at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:35)
    at org.mule.execution.CommitTransactionInterceptor.execute(CommitTransactionInterceptor.java:22)
    at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:30)
    at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:14)
    at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:67)
    at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:50)
    at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:28)
    at org.mule...
********************************************************************************

0 个答案:

没有答案