2017-05-27 4 views
0

Es ist eine sehr einfache Spring Camel App. Mit CXF: Server und Maven: camel plugin. Ich kann Kamel Kontext mit Kamel nicht starten: irgendwie laufen.Kamel nicht mit Kamel starten: Run Maven Plug-in

auch, nicht sicher, nur geben Port von CXF: Server ist ausreichend.

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:cxf="http://camel.apache.org/schema/cxf" 
    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.xsd    http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd    http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> 
    <cxf:rsServer address=""/route" id="rsServer" serviceClass="org.naren.ResourceObject"/> 
    <bean class="org.naren.OrchestrationProcess" id="orchestrationProcess"/> 
    <bean class="org.naren.OrchestrationRoute" id="routeBuilder"/> 
    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> 
     <routeBuilder ref="routeBuilder"/> 
    </camelContext> 
</beans> 

POM:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>TEG.iCoE</groupId> 
    <artifactId>MSA</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <name>Orch</name> 
    <description>Orchestrator</description> 

    <properties> 
     <camel.version>2.14.1</camel.version> 
     <cxf.version>3.0.2</cxf.version> 
    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>org.apache.camel</groupId> 
      <artifactId>camel-cxf</artifactId> 
      <version>${camel.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.cxf</groupId> 
      <artifactId>cxf-rt-transports-http-jetty</artifactId> 
      <version>${cxf.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
      <version>1.6.4</version> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-log4j12</artifactId> 
      <version>1.6.4</version> 
     </dependency> 
    </dependencies> 

    <repositories> 
     <repository> 
      <id>fusesource.releases</id> 
      <name>FuseSource Release Repository</name> 
      <url>http://repository.jboss.org/nexus/content/repositories/fs-releases</url> 
      <releases> 
       <enabled>true</enabled> 
      </releases> 
      <snapshots> 
       <enabled>false</enabled> 
      </snapshots> 
     </repository> 
     <repository> 
      <id>fusesource-ea.releases</id> 
      <name>FuseSource EA Release Repository</name> 
      <url>http://repository.jboss.org/nexus/content/repositories/ea</url> 
      <releases> 
       <enabled>true</enabled> 
      </releases> 
      <snapshots> 
       <enabled>false</enabled> 
      </snapshots> 
     </repository> 
    </repositories> 
    <pluginRepositories> 
     <pluginRepository> 
      <id>fusesource.releases</id> 
      <name>FuseSource Release Repository</name> 
      <url>http://repository.jboss.org/nexus/content/repositories/fs-releases</url> 
      <releases> 
       <enabled>true</enabled> 
      </releases> 
      <snapshots> 
       <enabled>false</enabled> 
      </snapshots> 
     </pluginRepository> 
     <pluginRepository> 
      <id>fusesource-ea.releases</id> 
      <name>FuseSource EA Release Repository</name> 
      <url>http://repository.jboss.org/nexus/content/repositories/ea</url> 
      <releases> 
       <enabled>true</enabled> 
      </releases> 
      <snapshots> 
       <enabled>false</enabled> 
      </snapshots> 
     </pluginRepository> 
    </pluginRepositories> 



    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>2.3.2</version> 
       <configuration> 
        <source>1.7</source> 
        <target>1.7</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.camel</groupId> 
       <artifactId>camel-maven-plugin</artifactId> 
       <version>${camel.version}</version> 
       <configuration> 
        <applicationContextUri>src\main\resources\spring\*.xml</applicationContextUri> 
       </configuration> 

      </plugin> 
     </plugins> 

    </build> 

</project> 

Camel: laufen beginnt, druckt aber nur 3 Protokolle und cxf: Server-Port nie beginnt:

[INFO] --- camel-maven-plugin:2.14.1:run (default-cli) @ MSA --- 
[INFO] Using org.apache.camel.spring.Main to initiate a CamelContext 
[INFO] Starting Camel ... 
org.apache.camel.spring.Main.main() INFO [org.apache.camel.main.MainSupport] - Apache Camel 2.14.1 starting 
org.apache.camel.spring.Main.main() INFO [org.springframework.context.support.ClassPathXmlApplicationContext] - Refreshing org[email protected]833bfc: startup date [Sat May 27 13:43:20 IST 2017]; root of context hierarchy 
org.apache.camel.spring.Main.main() INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.s[email protected]e83d14: defining beans []; root of factory hierarchy 
+0

Vielleicht haben Sie nicht richtig konfiguriert Protokollierung, wie in der Datei log4j.properties –

Antwort

1

Bitte überprüfen Sie, ob Ihre Feder-Konfigurationsdatei in " src \ main \ resources \ META-INF \ spring "Ordner, dann entfernen" configuration "Tag von Camel-Maven-Plugin wie folgt:

 <plugin> 
      <groupId>org.apache.camel</groupId> 
      <artifactId>camel-maven-plugin</artifactId> 
      <version>${camel.version}</version> 
     </plugin> 

beachten ist, dass Eigentum in Ihrer Adresse „cxf: rsServer“ hat Fehler Syntax und muss wie folgt korrigiert werden:

address=""/route" ===> address="/route"