2016-03-21 5 views
0

Ich migriere Ressourcen von verschiedenen Mule-Projekten zu einem Mule-Domain-Projekt (das von allen anderen Mule-Projekten verwendet werden sollte)). Alles funktioniert gut außer der Konfiguration für den Mongodb. Wenn ich anfangen alles und die Domäne beginnt mit der Initialisierung ich die folgende Fehlermeldung erhalten:org.xml.sax.SAXParseException: Fehler beim Lesen des Schemadokuments mule-mongo.xsd in mule-domain-config

org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.mulesoft.org/schema/mule/mongo/current/mule-mongo.xsd' 

Siehe die entsprechenden mule-Domain-config.xsd:

<?xml version="1.0" encoding="UTF-8"?> 
<mule-domain 
    xmlns="http://www.mulesoft.org/schema/mule/domain" 
    xmlns:mule="http://www.mulesoft.org/schema/mule/core" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo" 
    xmlns:http="http://www.mulesoft.org/schema/mule/http" 
    xsi:schemaLocation=" 
      http://www.mulesoft.org/schema/mule/domain http://www.mulesoft.org/schema/mule/domain/current/mule-domain.xsd 
      http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd 
      http://www.mulesoft.org/schema/mule/mongo http://www.mulesoft.org/schema/mule/mongo/current/mule-mongo.xsd 
      http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd"> 

    <!-- configure here resource to be shared within the domain --> 

    <context:property-placeholder location="${mule.env}.properties "/> 

    <mongo:config name="mongoconfig" host="${mongo.host}" port="${mongo.port}" database="${mongo.database}" doc:name="Mongo DB" connectTimeout="5000" connectionsPerHost="1" autoConnectRetry="true" threadsAllowedToBlockForConnectionMultiplier="50" username="${mongo.username}"> 
     <mongo:connection-pooling-profile maxActive="150" initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW" maxIdle="50" ></mongo:connection-pooling-profile> 
     <mule:reconnect frequency="1000"></mule:reconnect> 
    </mongo:config> 

    <http:listener-config name="HTTP_Listener_Configuration" host="${http.host}" port="${http.port}" doc:name="HTTP Listener Configuration"/> 

</mule-domain> 

Meine erste Idee war, dass ich um die mule-module-mongo Abhängigkeit der pom.xml hinzuzufügen. Das änderte nichts.

In den Mule-Projekten funktioniert die gleiche Konfiguration mit der gleichen Schema-Deklaration einwandfrei. Vermisse ich hier etwas?

Antwort

1

Das Problem ist, dass Mongo nicht als freigegebene Ressource unterstützt wird, so dass Sie seine Konfiguration nicht auf der Domänenebene definieren können.

Sie finden weitere Informationen darüber, welche Anschlüsse unterstützt werden here.

HTH

+0

Das ist das Problem! Danke afelisatti! Ich habe diese Seite nicht sorgfältig genug gelesen! – oltoko