0

I'm trying to implement some custom Java code in a non-static manor. I've used the "NEW" component under Java modules, so I can use the "INVOKE" component later.

XML for Component

<java:new doc:name="New" doc:id="b45f35b5-d524-45df-b006-a962d0a8ce69" class="com.company.LockComponent" constructor="LockComponent()"/>

I then added a classLoaderModelLoaderDescriptor to my mule-artifact.json, as shown below.

{
  "minMuleVersion": "4.1.5",
    "classLoaderModelLoaderDescriptor": {
    "id": "mule",
    "attributes": {
      "exportedPackages":[
       "com.company.LockComponent"
     ]
    }
  }
}

I'm getting JAVA:CLASS_NOT_FOUND error. I'm not sure what I'm missing...

4

1 回答 1

0

确保这件事:

  1. 应用程序使用最新的 Java 模块版本。
  2. 该应用程序使用最新的 Mule Maven 插件版本。
  3. 该类的 Java 源代码包含在您的项目中 (src/main/java) 或作为 Maven 中的依赖项。

您不需要使用上述步骤修改 mule-artifact.json。

于 2019-08-23T20:18:57.407 回答