Announcement Announcement Module
Collapse
No announcement yet.
Problem using ActiveMQ Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem using ActiveMQ

    Hi,
    I am trying to use Apache ActiveMQ.

    I created a Spring MVC template project and added the following dependency.

    Code:
    <dependency>
    	<groupId>org.apache.activemq</groupId>
    	<artifactId>activemq-core</artifactId>
    	<version>5.7.0</version>
    </dependency>
    But when all dependencies are loaded and when i run the project i get following errors.

    Code:
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanDefinitionStoreException: Line 4 in XML document from ServletContext resource [/WEB-INF/spring/root-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
    org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
    	at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
    	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
    	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:153)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:99)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:115)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:83)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:87)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:262)
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    I didn't change any of the codes anywhere. All others are default that the template gives.

    Why am i getting this? Where am i wrong?
    Please help.
    Thanks

  • #2
    This is simply badly-formed XML

    org.springframework.beans.factory.BeanDefinitionSt oreException: Line 4 in XML document from ServletContext resource [/WEB-INF/spring/root-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans",
    Double check the syntax in root-context.xml; if you can't figure out what's wrong, post it here.

    Comment


    • #3
      This is the content of root-context.xml
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
      	
      	<!-- Root Context: defines shared resources visible to all other web components -->
      		
      </beans>

      What can be wrong in the XML ? I didn't change anything in the XML.
      When i remove the above dependency, the App runs fine.
      Last edited by anuapmd; Jan 23rd, 2013, 08:05 AM.

      Comment

      Working...
      X