Put it inside the <camelContext> element. It's from the same namespace.
On Thu, Sep 12, 2013 at 10:21 AM, vsmahesh <aneesh_...@yahoo.co.in> wrote: > Hi all, > > When I am using <dataFormats> in my route I am getting the error [INFO] > Finished at: Thu Sep 12 17:16:32 EEST 2013 > [INFO] Final Memory: 15M/111M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.camel:camel-maven-plugin:2.10.0.fuse-7 > 1-047:run (default-cli) on project mes-bw-energyconsumption-queue: null: > MojoExe > cutionException: InvocationTargetException: Line 41 in XML document from > file [D > :\Project\Mahesh\Workspace\mes-bw-energyconsumption-queue\target\classes\META-IN > F\spring\camel-route.xml] is invalid; nested exception is > org.xml.sax.SAXParseEx > ception: cvc-complex-type.2.4.a: Invalid content was found starting with > element > 'dataFormats'. One of > '{"http://www.springframework.org/schema/beans":import, " > http://www.springframework.org/schema/beans":alias, > "http://www.springframework. > org/schema/beans":bean, > WC[##other:"http://www.springframework.org/schema/beans" > ]}' is expected. -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > swit > ch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > > My route is like > > <dataFormats> > <jaxb id="input" prettyPrint="true" > contextPath="mes.id59.powerconsumption" > partClass=".id59.powerconsumption.Details" /> > > </dataFormats> > > <import resource="classpath:META-INF/spring/camel-cxf.xml" /> > > <camelContext xmlns="http://camel.apache.org/schema/spring"> > <route id="Route1_MES_Queue"> > <from uri="cxf:bean:PowerConsumptionEndpoint"/> > <marshal ref="input" /> > <to uri="activemq:queue:EC_InboundQueue"/> > </route> > > My pom is > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <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/maven-v4_0_0.xsd"> > > <modelVersion>4.0.0</modelVersion> > > > > <version>1.0.0</version> > <groupId>com.outotec</groupId> > <description>Creates a web service using the WSDL contract > first</description> > <packaging>bundle</packaging> > > > > > <properties> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > > <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> > > > </properties> > > <repositories> > > > > <repository> > <id>spring-release</id> > <url>http://maven.springframework.org/release</url> > </repository> > <repository> > <id>maven-us-nuxeo</id> > <url>https://maven-us.nuxeo.org/nexus/content/groups/public</url> > </repository> > > <repository> > <id>release.fusesource.org</id> > <name>FuseSource Release Repository</name> > > <url>http://repo.fusesource.com/nexus/content/repositories/releases</url> > <snapshots> > <enabled>false</enabled> > </snapshots> > <releases> > <enabled>true</enabled> > </releases> > </repository> > <repository> > <id>snapshot.fusesource.org</id> > <name>FuseSource Snapshot Repository</name> > > <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url> > <snapshots> > <enabled>true</enabled> > </snapshots> > <releases> > <enabled>false</enabled> > </releases> > </repository> > > <repository> > <id>fusesource</id> > <name>FuseSource Release Repository</name> > > <url>http://repo.fusesource.com/nexus/content/groups/public/</url> > <snapshots> > <enabled>false</enabled> > </snapshots> > <releases> > <enabled>true</enabled> > </releases> > </repository> > <repository> > <id>fusesource.ea</id> > <name>FuseSource Community Early Access Release > Repository</name> > > <url>http://repo.fusesource.com/nexus/content/groups/ea</url> > <snapshots> > <enabled>false</enabled> > </snapshots> > <releases> > <enabled>true</enabled> > </releases> > </repository> > <repository> > <id>jboss-public-repository-group</id> > <name>JBoss Public Repository Group</name> > > <url>http://repository.jboss.org/nexus/content/groups/public/</url> > <layout>default</layout> > <releases> > <enabled>true</enabled> > <updatePolicy>never</updatePolicy> > </releases> > <snapshots> > <enabled>true</enabled> > <updatePolicy>daily</updatePolicy> > </snapshots> > </repository> > </repositories> > > <pluginRepositories> > <pluginRepository> > <id>fusesource</id> > <name>FuseSource Release Repository</name> > > <url>http://repo.fusesource.com/nexus/content/groups/public/</url> > <snapshots> > <enabled>false</enabled> > </snapshots> > <releases> > <enabled>true</enabled> > </releases> > </pluginRepository> > <pluginRepository> > <id>fusesource.ea</id> > <name>FuseSource Community Early Access Release > Repository</name> > > <url>http://repo.fusesource.com/nexus/content/groups/ea</url> > <snapshots> > <enabled>false</enabled> > </snapshots> > <releases> > <enabled>true</enabled> > </releases> > </pluginRepository> > > > <pluginRepository> > <id>release.fusesource.org</id> > <name>FuseSource Release Repository</name> > > <url>http://repo.fusesource.com/nexus/content/repositories/releases</url> > <snapshots> > <enabled>false</enabled> > </snapshots> > <releases> > <enabled>true</enabled> > </releases> > </pluginRepository> > <pluginRepository> > <id>snapshot.fusesource.org</id> > <name>FuseSource Snapshot Repository</name> > > <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url> > <snapshots> > <enabled>true</enabled> > </snapshots> > <releases> > <enabled>false</enabled> > </releases> > </pluginRepository> > > > </pluginRepositories> > > > <dependencies> > > > > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-jms</artifactId> > <version>2.10.0.fuse-71-047</version> > </dependency> > <dependency> > <groupId>org.apache.activemq</groupId> > <artifactId>activemq-core</artifactId> > <version>5.7.0.fuse-71-047</version> > </dependency> > > <dependency> > <groupId>org.apache.activemq</groupId> > <artifactId>activemq-camel</artifactId> > <version>5.7.0.fuse-71-047</version> > </dependency> > > <dependency> > <groupId>org.apache.xbean</groupId> > <artifactId>xbean-spring</artifactId> > <version>3.12</version> > </dependency> > > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring-context</artifactId> > <version>3.0.7.RELEASE</version> > </dependency> > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-spring</artifactId> > <version>2.10.0.fuse-71-047</version> > </dependency> > > > > > <dependency> > <groupId>org.apache.activemq</groupId> > <artifactId>activemq-all</artifactId> > <version>5.7.0</version> > </dependency> > > > > > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-core</artifactId> > <version>2.10.0.fuse-71-047</version> > </dependency> > > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-cxf</artifactId> > <version>2.10.0.fuse-71-047</version> > </dependency> > > <dependency> > <groupId>log4j</groupId> > <artifactId>log4j</artifactId> > <version>1.2.16</version> > </dependency> > > > <dependency> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-api</artifactId> > <version>1.6.1</version> > </dependency> > <dependency> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-log4j12</artifactId> > <version>1.6.1</version> > </dependency> > > > <dependency> > <groupId>org.apache.cxf</groupId> > <artifactId>cxf-rt-transports-http-jetty</artifactId> > <version>2.6.0.fuse-71-047</version> > </dependency> > > <dependency> > <groupId>org.apache.camel</groupId> > <artifactId>camel-test-spring</artifactId> > <version>2.10.0.fuse-71-047</version> > <scope>test</scope> > </dependency> > > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.10</version> > <scope>test</scope> > </dependency> > > > > > > > > </dependencies> > > <build> > <plugins> > <plugin> > <groupId>org.apache.felix</groupId> > <artifactId>maven-bundle-plugin</artifactId> > <version>2.3.4</version> > <extensions>true</extensions> > <configuration> > > <instructions> > <Import-Package> > > org.apache.activemq.xbean, > > org.apache.camel.converter.jaxb, > > > org.apache.activemq.spring, > > org.apache.activemq.broker, > > org.apache.activemq.security, > > > org.apache.activemq.jaas, > > org.apache.activemq.util, > > org.apache.activemq.pool, > > org.apache.activemq.camel.component, > > org.apache.camel.component.jms,* > </Import-Package> > </instructions> > </configuration> > </plugin> > <plugin> > <groupId>org.apache.cxf</groupId> > <artifactId>cxf-codegen-plugin</artifactId> > <version>2.6.0.fuse-71-047</version> > <executions> > <execution> > <id>generate-sources</id> > > <phase>generate-sources</phase> > <configuration> > > <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> > <wsdlOptions> > <wsdlOption> > > <wsdl>${basedir}/src/main/resources/wsdl/SI_ID59_Powerconsumption_async_out.wsdl</wsdl> > > <extraargs> > > <extraarg>-impl</extraarg> > > </extraargs> > </wsdlOption> > </wsdlOptions> > </configuration> > <goals> > <goal>wsdl2java</goal> > </goals> > </execution> > </executions> > </plugin> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.5.1</version> > <configuration> > <source>1.6</source> > <target>1.6</target> > </configuration> > </plugin> > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-resources-plugin</artifactId> > <version>2.4.3</version> > </plugin> > > > > > > > > <plugin> > <groupId>org.apache.camel</groupId> > <artifactId>camel-maven-plugin</artifactId> > <version>2.10.0.fuse-71-047</version> > </plugin> > </plugins> > </build> > <artifactId>mes-bw-energyconsumption-queue</artifactId> > <name>MES - BW Energy Consumption </name> > <url>http://www.myorganization.org</url> > </project> > > I didnot add any seperate dependecy for dataFormats. > Kindly help me in resolving this issue. > > thanks > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Error-when-adding-dataFormats-in-camel-route-file-tp5739260.html > Sent from the Camel - Users mailing list archive at Nabble.com.