Getting error while adding custom java component in Mule -
i getting below compile error after adding java component in mule process error xml config
<?xml version="1.0" encoding="utf-8"?> <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd"> <http:listener-config name="http_listener_configuration_8082" host="0.0.0.0" port="8082" doc:name="http listener configuration"/> <flow name="custom-componentsflow"> <http:listener config-ref="http_listener_configuration_8082" path="/" doc:name="http"/> <component class="org.mule.transformers.helloworldcomponent" doc:name="java"/> </flow> </mule>
class details
package org.mule.transformers; import org.mule.api.muleeventcontext; import org.mule.api.mulemessage; import org.mule.api.lifecycle.callable; import org.mule.api.transformer.transformerexception; import org.mule.transformer.abstractmessagetransformer; public class helloworldcomponent implements callable{ @override public object oncall(muleeventcontext eventcontext) throws exception { eventcontext.getmessage().setinvocationproperty("myproperty", "hello world!"); return eventcontext.getmessage().getpayload(); } }
details are.
caused by: org.springframework.beans.propertybatchupdateexception: failed properties: property 'objectclassname' threw exception; nested exception java.lang.illegalargumentexception: java.lang.classnotfoundexception: cannot load class 'org.mule.transformers.helloworldcomponent' @ org.springframework.beans.abstractpropertyaccessor.setpropertyvalues(abstractpropertyaccessor.java:121) ~[spring-beans-4.1.6.release.jar:4.1.6.release] @ org.springframework.beans.abstractpropertyaccessor.setpropertyvalues(abstractpropertyaccessor.java:75) ~[spring-beans-4.1.6.release.jar:4.1.6.release]
anypoint studio version 5.4.3
i followed this link still giving error.
i've tried flow , i'm not getting error. reason can imagine path of java class helloworldcomponent not correct.
best regards.
janthem.
Comments
Post a Comment