Not 100% sure this is the place to post this, but here it goes:
I've had an issue for days and I can't find any information on this issue. I have searched this site the best I could and couldn't find anything that fixed my problem.
I have a project with multiple modules in it a core, data-services, and messaging. It's a stand alone java jar that is a topic subscriber for JMS. The main class is in Core, and the data-services handles database transactions, and messaging handles listening on a spring jms container for messages, validates, and passes the data on to data-services.
Data-services as a stand alone project works fine, builds fine, all tests works, etc. Messaging(with core) works fine without data services(with the passing off to data-services commented out of course) it connects to the active mq topic, waits, catches messages like it should and I just display them to the console to make sure I got what I wanted, etc. But when I put these three modules under the main project and build the main project through maven, which builds the projects in the following order:
[INFO] Reactor build order:
[INFO] NextGenSwakSubscriber
[INFO] Hibernate Data-Services
[INFO] JMS Messaging Services
[INFO] Core Jar Module
The build is fine, but when I start the app and spring starts up I get this error:
Now if I remove this dependency, it doesn't have this issue, well until it needs an activemq class in a later bean, then of course I get a classnotfound, but it looks like there is some issue with activeMQ and spring.Code:[cypress] - 2012-03-06 09:02:06,834 - FATAL [main] NextGenSwakSubscriber.startSpring(26) | Fatal error occored while attempting to start Spring and create beans. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:applicationContext-datasource.xml] Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:applicationContext-hibernate.xml] Offending resource: class path resource [applicationContext-datasource.xml]; nested exception is Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx] Offending resource: class path resource [applicationContext-hibernate.xml] at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:174) ... 30 more
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.4.1</version>
</dependency>
The xml it's blowing up on is:
Can anyone point me in the right direction on this? I am at a complete loss and I have deadlines rapidly approaching.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" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:tool="http://www.springframework.org/schema/tool" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans spring-beans-3.0.xsd http://www.springframework.org/schema/tx spring-tx-3.0.xsd http://www.springframework.org/schema/tool spring-tool-3.0.xsd http://www.springframework.org/schema/context spring-context-3.0.xsd"> <tx:annotation-driven/> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <import resource="classpath:applicationContext-data-services.xml" /> </beans>


Reply With Quote
.