user3098978
user3098978

Reputation:

mule standalone 3.7.0: error deploying mule app

I am trying to deploy a mule app via mule standalone 3.7.0 but I'm getting an error, even though it works perfect via anypoint studio version 5.4.1 using 3.7.2 mule server. note: I have created a zip folder via anypoint studio.

This is my flow:

    <?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:amqp="http://www.mulesoft.org/schema/mule/amqp" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:magento="http://www.mulesoft.org/schema/mule/magento" 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://www.mulesoft.org/schema/mule/magento http://www.mulesoft.org/schema/mule/magento/current/mule-magento.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/amqp http://www.mulesoft.org/schema/mule/amqp/current/mule-amqp.xsd">
  <amqp:connector name="AMQPConnector" 
                validateConnections="true" 
                doc:name="AMQPConnector"  
                />
<magento:config name="Magento" username="test" password="test" address="http://127.0.0.1:8000/api/v2_soap/" doc:name="Magento"/>
<flow name="flow">
    <amqp:inbound-endpoint queueName="test" responseTimeout="10000" exchange-pattern="request-response" connector-ref="AMQPConnector" doc:name="AMQP-0-9" exchangeType="topic"/>
    <logger message="test!!" level="INFO" doc:name="Logger"/>
    <magento:get-product config-ref="Magento" productId="1" doc:name="Magento">
        <magento:attributes-names>
            <magento:attributes-name>sku</magento:attributes-name>
        </magento:attributes-names>
    </magento:get-product>
    <mulexml:object-to-xml-transformer doc:name="Object to XML"/>
    <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    <set-payload value="payload: #[payload]" doc:name="Set Payload"/>
</flow>
</mule>

This is he error:

    ERROR 2016-01-10 18:40:46,877 [Mule.app.deployer.monitor.1.thread.1] org.mule.module.launcher.DefaultArchiveDeployer: 
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    + Failed to deploy artifact 'alone', see below             +
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    org.mule.module.launcher.DeploymentInitException: SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'amqp:connector'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.springframework.org/schema/beans":beans, "http://www.springframework.org/schema/beans":bean, "http://www.springframework.org/schema/context":property-placeholder, "http://www.springframework.org/schema/beans":ref, "http://www.mulesoft.org/schema/mule/core":global-property, "http://www.mulesoft.org/schema/mule/core":configuration, "http://www.mulesoft.org/schema/mule/core":notifications, "http://www.mulesoft.org/schema/mule/core":abstract-extension, "http://www.mulesoft.org/schema/mule/core":abstract-shared-extension, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-extension, "http://www.mulesoft.org/schema/mule/core":abstract-agent, "http://www.mulesoft.org/schema/mule/core":abstract-security-manager, "http://www.mulesoft.org/schema/mule/core":abstract-transaction-manager, "http://www.mulesoft.org/schema/mule/core":abstract-shared-transaction-manager, "http://www.mulesoft.org/schema/mule/core":abstract-connector, "http://www.mulesoft.org/schema/mule/core":abstract-shared-connector, "http://www.mulesoft.org/schema/mule/core":abstract-global-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-flow-construct, "http://www.mulesoft.org/schema/mule/core":flow, "http://www.mulesoft.org/schema/mule/core":sub-flow, "http://www.mulesoft.org/schema/mule/core":abstract-model, "http://www.mulesoft.org/schema/mule/core":abstract-interceptor-stack, "http://www.mulesoft.org/schema/mule/core":abstract-filter, "http://www.mulesoft.org/schema/mule/core":abstract-transformer, "http://www.mulesoft.org/schema/mule/core":processor-chain, "http://www.mulesoft.org/schema/mule/core":custom-processor, "http://www.mulesoft.org/schema/mule/core":abstract-empty-processor, "http://www.mulesoft.org/schema/mule/core":invoke, "http://www.mulesoft.org/schema/mule/core":set-payload, "http://www.mulesoft.org/schema/mule/core":abstract-global-intercepting-message-processor, "http://www.mulesoft.org/schema/mule/core":custom-queue-store, "http://www.mulesoft.org/schema/mule/core":abstract-processing-strategy}' is expected.

Any ideas how to fix?

Upvotes: 2

Views: 1105

Answers (10)

PShanker
PShanker

Reputation: 1

you are probably missing activemq connector jar files

Upvotes: 0

Sree
Sree

Reputation: 21

Try changing your namespace reference from current to: "http://www.mulesoft.org/schema/mule/amqp/3.1/mule-amqp.xsd".

You could also refer to: https://docs.mulesoft.com/mule-user-guide/v/3.7/activemq-integration

Upvotes: 1

Hemin
Hemin

Reputation: 752

This Error is thrown because ampq:connector is used in your flow, not installed in your setup. To install ampq:connector , go to Help-> Install new Software -> http://repository.mulesoft.org/connectors/releases/3.5.0 and install following package from the list. Than install Mule AMPQ Tranpost package and restart your Anypoint Studio. This will solve your Problem.

enter image description here

Upvotes: 1

Naveen Kumar
Naveen Kumar

Reputation: 31

Hi i think amqp:connector is not present in your AnyPoint studio. Go thru Help --> Install new Sofware --> select Anypoint Connectors Update Site - http://repository.mulesoft.org/connectors/releases/3.5.0. Hope this helps as mentioned by others above.

Upvotes: 1

Giribabu Ch
Giribabu Ch

Reputation: 1

i think amqp:connector is not present in your AnyPoint studio. try to download it in Studio by following steps. Help --> Install new Sofware --> select Anypoint Connectors Update Site - http://repository.mulesoft.org/connectors/releases/3.5.0.

Upvotes: 0

CountD
CountD

Reputation: 669

Most likely the connector dependency is missing from the Mule project descriptor file, called mule-project.xml. This prevents Studio from attaching the proper connector JARs to the app, causing the Invalid content was found starting with element 'amqp:connector exception you experienced.

All connectors used by the app are declared in mule-project.xml inside a <muleExtension> tag:

<muleExtension name="AMQP-0-9" qualifier="mule-transport-amqp-contribution"/>

With dependency:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mule-project xmlns="http://www.mulesoft.com/tooling/project" runtimeId="org.mule.tooling.server.3.7.3.ee" schemaVersion="5.3.0.0">
    <name>demo-amqp</name>
    <description></description>
    <muleExtension name="AMQP-0-9" qualifier="mule-transport-amqp-contribution"/>
</mule-project>

Without dependency:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mule-project xmlns="http://www.mulesoft.com/tooling/project" runtimeId="org.mule.tooling.server.3.7.3.ee" schemaVersion="5.3.0.0">
     <name>demo-amqp</name>
     <description></description>
</mule-project>

Solution 1 (from Studio)

Drag & drop the connector onto the canvas. This will force an update of the Mule app, automatically adding the dependency to the project's classpath.

Solution 2 (from Studio)

Manually add the connector dependency to the classpath:

  1. Right-click on the project and navigate through Build Path > Configure Build Path.
  2. Select the Libraries tab.
  3. Click Add Library button > Anypoint Connector Dependencies
  4. Select the desired connector/s and click Finish.

Upvotes: 0

Diwakar Reddy
Diwakar Reddy

Reputation: 1

looks like amqp:connector is not present in your AnyPoint studio. try to download it in Studio by following steps. Help --> Install new Sofware --> select Anypoint Connectors Update Site - http://repository.mulesoft.org/connectors/releases/3.5.0.

restart the studio...done..!!! please let me know if it helps.

Upvotes: -1

wsjsgeronimo
wsjsgeronimo

Reputation: 29

As stated above, you are probably missing activemq connector jar files, if you are using maven, place it on your pom and let it download the prescribed version for example:

    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-all</artifactId>
      <version>5.13.2</version>
    </dependency>

http://activemq.apache.org/download.html

Hope this helps.

Upvotes: 1

Deep
Deep

Reputation: 71

i think amqp:connector is not present in your AnyPoint studio. try to download it in Studio by following steps. Help --> Install new Sofware --> select Anypoint Connectors Update Site - http://repository.mulesoft.org/connectors/releases/3.5.0.

restart the studio...done..!!! please let me know if it helps.

Upvotes: 0

Mauro Rocco
Mauro Rocco

Reputation: 5128

You are probally missing the dependency for the AMQP connector in your POM if you have a maven project.

<dependency>
  <groupId>org.mule.transports</groupId>
  <artifactId>mule-transport-amqp</artifactId>
  <version>x.y.z</version>
</dependency>

Hope this helps

Upvotes: 4

Related Questions