ActiveMQ in Action 이라는 책의 예제소스를 실행중에 챕터4에 보시면 brokerB 를 실행하는 단계가 있습니다.
그런데 책에 나와있는 주소나 사이트에서 다운받은 소스로는 윈도우환경에서 아래와 같이 에러가 나며 실행이 안됩니다.

C:\apache-activemq-5.4.1>bin\activemq \ 

xbean:file:C:/amq-in-action-example-src/src/main/resources/org/apache/activemq/book/ch4/brokerB.xml

Java Runtime: Sun Microsystems Inc. 1.6.0_21 C:\Program Files\Java\jdk1.6.0_21\jre
Heap sizes: current=15872k free=14606k max=506816k
JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=C:\apache-activemq-5.4.1\bin\../conf;C:\apache-
activemq-5.4.1\bin\../conf; -Dactivemq.home=C:\apache-activemq-5.4.1\bin\.. -Dactivemq.base=C:\apache-activemq-5.4.1\bin\..
ACTIVEMQ_HOME: C:\apache-activemq-5.4.1\bin\..
ACTIVEMQ_BASE: C:\apache-activemq-5.4.1\bin\..
Loading message broker from: xbean:file:C:/amq-in-action-example-src/src/main/resources/org/apache/activemq/book/ch4/brokerB.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from URL [file:C:/amq-in-action-example-src/src/main/re
sources/org/apache/activemq/book/ch4/brokerB.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'broker'.

java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from URL [file:C:/amq-in-action-example-src/src/main/resources
/org/apache/activemq/book/ch4/brokerB.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'broker'.


The line that it is complaining about is Line12:

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="BrokerB" dataDirectory="${activemq.base}/data"> 


 이유는 brokerB.XML 파일이 잘못되서입니다.
http://code.google.com/p/activemq-in-action/downloads/list  에서 문제가 수정된 가장최신의 소스를 다운받으실수 있습니다. 

 
Posted by 빨강토끼
,