activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Jordan <brett.jor...@velsys.com>
Subject embedded broker using Spring 2.0 broken!
Date Tue, 03 Apr 2007 04:36:03 GMT

In December I successfully ran up an embedded broker (while investigating
Lingo), defining it in Spring 2.0 config as in the example in:

http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

It doesn't work for me any more. I get a SAX exception (see below).
I can get around it by downloading the
activemq-core-4.1-incubator-SNAPSHOT.xsd file, storing it locally and
hacking it. My spring config starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:amq="http://activemq.org/config/1.0"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://activemq.org/config/1.0
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4.1-incubator-SNAPSHOT.xsd"
>
  
  <!--  lets create an embedded ActiveMQ Broker -->
  <amq:broker useJmx="false" persistent="false">
    <amq:transportConnectors>
      <amq:transportConnector uri="tcp://localhost:61616" />
    </amq:transportConnectors>
  </amq:broker>




Can someone confirm if there is a problem with the xsd file, or is there a
problem with the way it is being parsed. I tried using the latest xerces
parsers, but hit the same problem.



org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: The content of
element 'amq:transportConnector' is not complete. One of
'{"http://activemq.org/config/1.0":broker,
"http://activemq.org/config/1.0":brokerInfo,
"http://activemq.org/config/1.0":discoveryAgent,
"http://activemq.org/config/1.0":messageAuthorizationPolicy,
"http://activemq.org/config/1.0":server,
"http://activemq.org/config/1.0":taskRunnerFactory,
WC[##other:"http://activemq.org/config/1.0"]}' is expected.
	at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at
org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown
Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown
Source)
	at
org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown
Source)
	at
org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown
Source)
	at
org.apache.xerces.impl.xs.XMLSchemaValidator.processElementContent(Unknown
Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown
Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:196)
	at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:156)
	at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:142)
	at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:89)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
	at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
	at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
	at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
	at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
	at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
	at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:89)
	at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:74)

-- 
View this message in context: http://www.nabble.com/embedded-broker-using-Spring-2.0-broken%21-tf3509768s2354.html#a9803575
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message