1
votes

Trying to import the Java class from Dataweave but not successful in doing so. I took the example from the Mulesoft official documentation: Mulesoft official documentations

Looks like, either it is the old documentation or my follow through is wrong. Need some help on this. Below is the line using which, I am trying to add the Java class or method.

import java!utils::ChangeTime

And below is the error, I am getting on this line:

Scripting language error on expression '%dw 2.0
var itemsValues = payload.Items
var firstName = itemsValues[0]
var l...'. Reason: Unable to resolve module with identifier utils::ChangeTime..

Thanks.

1
Please add the Java code to the question.aled
Are you sure that the ChangeTime class exists in utils package? Also is the method that you're accessing static or non-static?Vishwas Pawar

1 Answers

0
votes

There is no ChangeTime class in the examples page that you shared, so I assume that there is some issue with the Java code that you added.

It is difficult to say what is the problem without the complete code. It could be that the package or access are incorrect, or the project was not rebuilt.