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...

jradich1234
  • 1,410
  • 5
  • 24
  • 29

1 Answers1

0

Ensure that:

  1. The applications uses the latest Java Module version.
  2. The application uses the latest Mule Maven Plugin version.
  3. The Java source for the class is included with your project (src/main/java) or as a dependency in Maven.

You should not need to modify mule-artifact.json with above steps.

aled
  • 21,330
  • 3
  • 27
  • 34