I am attempting to start a in-VM ActiveMQ broker as follows: final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); factory.setBrokerURL(_config.getActiveMQBrokerURL());
where the configuration method returns the following string: "vm://localhost?brokerConfig=xbean:file:conf/activemq.xml" and the file activemq.xml simply contains the default configuration: http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml I now attempt to create the JMS session: factory.createConnection() Which promptly throws the exception: 2013-10-03 02:28:27,287 [main] DEBUG org.apache.activemq.xbean.XBeanBrokerFactory (XBeanBrokerFactory.java:99) - Using URL [file:conf/activemq.xml] from file:conf/activemq.xml 2013-10-03 02:28:27,343 [main] DEBUG org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader (XmlBeanDefinitionReader.java:153) - Using JAXP implementation [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl@6387a6dd] 2013-10-03 02:28:27,350 [main] INFO org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader (XmlBeanDefinitionReader.java:158) - Loading XML bean definitions from URL [file:conf/activemq.xml] 2013-10-03 02:28:27,363 [main] ERROR org.apache.activemq.xbean.XBeanBrokerFactory (XBeanBrokerFactory.java:108) - Failed to load: URL [file:conf/activemq.xml], reason: Line 18 in XML document from URL [file:conf/activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document is invalid: no grammar found. org.springframework.beans.factory.BeanDefinitionStoreException: Line 18 in XML document from URL [file:conf/activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document is invalid: no grammar found. org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 7; Document is invalid: no grammar found. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) [snip] What? My POM file contains the following: <properties> <activemq.version>5.8.0</activemq.version> <xbean-spring.version>2.2</xbean-spring.version> <springframework.version>3.1.3.RELEASE</springframework.version> </properties> <dependencies> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>${activemq.version}</version> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-spring</artifactId> <version>${xbean-spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-asm</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${springframework.version}</version> </dependency> </dependencies> The only clue that I have with respect to this issue is a question on stack overflow titled: "Hibernate: Document is invalid: no grammar found", which suggests that I should have a DOCTYPE previous to the element. However, if this is the DEFAULT then why is it that passing a broker URL "vm://localhost" doesn't result in the same error message? Anyway, the real issue is that I get this exception and there doesn't seem to be any way I can figure out to fix it. If it is indeed missing a DOCTYPE element then what is it and why doesn't the configuration file already have one? Do I not have the correct POM dependencies? What other options do I have? -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-throws-SAXParseException-Document-is-invalid-no-grammer-found-tp4672245.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
