Получение ошибки при добавлении пользовательского Java-компонента в 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>

сведения о классе

 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();
 }
}

подробности есть.

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

Я только что перешел по ссылке по этой ссылке, все еще выдающей ошибку.


person Ravi Hanok    schedule 25.05.2016    source источник
comment
Создайте минимальный, полный и поддающийся проверке пример: stackoverflow.com/help/mcve   -  person DVarga    schedule 25.05.2016


Ответы (1)


Я только что попробовал ваш поток и не получаю никаких ошибок. Единственная причина, которую я могу себе представить, это то, что путь вашего Java-класса helloWorldComponent может быть неправильным.

С наилучшими пожеланиями.

Janthem.

person Janthem    schedule 08.06.2016