camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <aska...@progress.com>
Subject Re: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'broker:broker'.
Date Thu, 04 Feb 2010 12:25:16 GMT

Hi,

Can you check to see if the namespace for the broker element has been
defined in the camel-context.xml

You might want to define "xmlns:broker=..." and offer up a schemaLocation
for it... Check out activemq examples in the camel distribution.

The exception is simply stating that your xml is broken and cannot be parsed
since the namespace cannot be resolved for "broker:broker"

Cheers,

Ashwin...


abahmane wrote:
> 
> I picked up a camel tutorial and i never get to run it succefully.
> I'm using Camel 2.1 and ActivMq 5.3.0
> 
> It always crashes with the error :
> 
> 
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
> wildcard is strict, but no declaration can be found for element
> 'broker:broker'.
> 
> Am i missing any  library ? 
> 
> Here is my maven file :
> 
> 
> 
> ***
> 
> <properties>
>  <camel-version>2.1.0</camel-version>
>  <activemq-version>5.3.0 </activemq-version>
>  <xbean-spring-version>3.6</xbean-spring-version>
>  </properties> 
>   
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>     
>   <!-- Core Camel support -->    
>   <dependency>
>     <groupId>org.apache.camel</groupId>
>     <artifactId>camel-core</artifactId>
>     <version>${camel-version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.camel</groupId>
>     <artifactId>camel-spring</artifactId>
>      <version>${camel-version}</version>
>   </dependency>
>    
>   <!-- ActiveMQ connectivity for Camel -->           
>   <dependency>
>     <groupId>org.apache.activemq</groupId>
>     <artifactId>activemq-camel</artifactId>
>     <version>${activemq-version}</version>
>   </dependency>
>    
>   <!-- Add support for JAXB marshaling -->
>   <dependency>
>     <groupId>org.apache.camel</groupId>
>     <artifactId>camel-jaxb</artifactId>
>     <version>${camel-version}</version>
>   </dependency>
>    
>   <!-- Add support for CSV marshaling -->   
>   <dependency>
>     <groupId>org.apache.camel</groupId>
>     <artifactId>camel-csv</artifactId>
>     <version>${camel-version}</version>
>  </dependency>
>    
>   <!-- Add support for HTTP -->
>   <dependency>
>     <groupId>org.apache.camel</groupId>
>     <artifactId>camel-jetty</artifactId>
>     <version>${camel-version}</version>
>   </dependency>
>  
>   <!-- Embedded ActiveMQ broker -->
>   <dependency>
>     <groupId>org.apache.activemq</groupId>
>     <artifactId>activemq-core</artifactId>
>     <version>${activemq-version}</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.xbean</groupId>
>     <artifactId>xbean-spring</artifactId>
>     <version>${xbean-spring-version}</version>
>   </dependency>
>   
>   </dependencies>
> *****
> 
> and the spring file :
> 
> ***************
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/spring"
> xmlns:broker="http://activemq.apache.org/schema/core" xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
>        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>        http://camel.apache.org/schema/spring
>        http://camel.apache.org/schema/spring/camel-spring-2.1.0.xsd
>        http://activemq.apache.org/schema/core
>        http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd">
>        
>       
>        
>  
>   <broker:broker useJmx="false" persistent="false" brokerName="localhost">
>     <broker:transportConnectors>
>       <broker:transportConnector uri="tcp://localhost:61616" />
>     </broker:transportConnectors>
>   </broker:broker>
>  
>   <bean id="jms"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>     <property name="brokerURL" value="tcp://localhost:61616" />
>   </bean>
>  
>   <bean id="normalizer" class="org.fusesource.camel.OrderNormalizer" />
>   <bean id="orderHelper" class="org.fusesource.camel.OrderHelper" />
>   
>   <camel:camelContext>
>    <camel:package>org.fusesource.camel</camel:package>
>     
>   </camel:camelContext>
>  
> </beans>
> 
> 
> ***************
> 
> 
> 
> Main class that crashes with the error : no declaration can be found for
> element 'broker:broker'.
> 
> 
> ***************
> 
> 
> public class SampleCamelServer {
> 
>     public static void main(String[] args) throws Exception {
>         Main.main("-ac", "camel-context.xml");
>     }
>     
> }
> ********************
> 
> I can open the file 
> http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
> 
> In a browser , so why can't  he found the element ?
> 
> 
> do u have any idea about this error ?
> 
> 
> I'm using jdk1.5 and MyEclipse 8
> 
> Thnx a lot.
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://old.nabble.com/cvc-complex-type.2.4.c%3A-The-matching-wildcard-is-strict%2C-but-no-declaration-can-be-found-for-element-%27broker%3Abroker%27.-tp27435578p27451927.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message