在Mule中添加自定义java组件时出错

在Mule中添加自定义java组件时出错,java,mule-studio,mule-component,anypoint-studio,Java,Mule Studio,Mule Component,Anypoint Studio,在mule进程错误中添加java组件后,我发现下面的编译错误 xml配置 <?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/

在mule进程错误中添加java组件后,我发现下面的编译错误 xml配置

  <?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>
详情如下

Caused by: org.springframework.beans.PropertyBatchUpdateException: Failed properties: Property 'objectClassName' threw exception; nested exception is java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: Cannot load class 'org.Mule.transformers.helloWorldComponent'
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
Anypoint studio 5.4.3版


我只是按照链接仍然给出错误。

我刚刚尝试了你的流程,没有收到任何错误。 我能想象的唯一原因是Java类helloWorldComponent的路径可能不正确

致以最良好的祝愿


Janthes。

我刚刚尝试了你的流程,没有发现任何错误。 我能想象的唯一原因是Java类helloWorldComponent的路径可能不正确

致以最良好的祝愿


Jantem.

请创建一个最小、完整和可验证的示例:请创建一个最小、完整和可验证的示例:
Caused by: org.springframework.beans.PropertyBatchUpdateException: Failed properties: Property 'objectClassName' threw exception; nested exception is java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: Cannot load class 'org.Mule.transformers.helloWorldComponent'
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]