Computer Science, asked by DavidSupierior4238, 1 year ago

Element is not described in mule registry in mule 4

Answers

Answered by NightFury
0
How do I invoke java bean in a mule flow in Mule 4.1.1? The way we do in mule 3 is just reference to the bean id, but it is not working anymore in Mule 4.1.1.

<java:invoke doc:name="Invoke" doc:id="a0283879-bcd6-4538-9209-8f2608ca5796" instance="myComponent1234" class="com.ggl.mule.java.JComponentOne" method="invokeMysqlDB()"/>

I got error at run time: org.mule.runtime.core.api.config.ConfigurationException: Element 'myComponent1234' is not defined in the Mule Registry

Answered by amprajwal123
2

Answer: Hi

I just defined the defined arguments as payload and i created the new java constructor for the instance. then it worked fine.

here is my xml code:

 <java:new constructor="InvokeSpringSample()" doc:name="New" doc:id="083a6a08-7d23-46ab-a1bf-f30382d09d49" class="mulewithjava.InvokeSpringSample"/>

 <java:invoke doc:name="Invoking java method" doc:id="332990be-c8b3-460f-8bc4-10cefb298c41" instance="#[payload]" class="mulewithjava.InvokeSpringSample" method="methodA()">

  <java:args ><![CDATA[#[payload]]]></java:args>

 </java:invoke>

Similar questions