File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Spring 3.0.2 and Active MQ 5.4.1 Issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring 3.0.2 and Active MQ 5.4.1 Issues" Watch "Spring 3.0.2 and Active MQ 5.4.1 Issues" New topic

Spring 3.0.2 and Active MQ 5.4.1 Issues

Jared Fucci

Joined: Mar 06, 2012
Posts: 6
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.


The xml it's blowing up on is:

Here is the main pom on the parent project if that will help, atleast give an idea of the versions I am using and what frameworks:

Can anyone point me in the right direction on this? I am at a complete loss and I have deadlines rapidly approaching.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Why is Spring 2.5.6 in your classpath dependency lines 88-99 in your pom file

Also I didn't see a spring-tx dependency in your pom file.

One other thing that I always do with my xml is I don't put in the version number of the xsd.

so I do

Spring will just find the most recent xsd from the jar files and use that version. So that is why I didn't see the spring-tx jar file in your pom file.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Jared Fucci

Joined: Mar 06, 2012
Posts: 6
Thanks for the response and sorry, I should have looked at that code better before posting. Those were some attempts to try to fix it, thinking older versions of things activemq might work better with or something. And I removed spring.tx because some other dependency brings it in as well and I thought there might be an issue with that. I made the changes you suggested in the POM file shown below, and I couldn't do the XSDs without a version because it failed to find them. I actually have the xsd files in the project because of a security issue here at work. So I know I have the right versions, so I just changed those back, but I left your other changes, and I get the exact same error

Jared Fucci

Joined: Mar 06, 2012
Posts: 6
Anyone have any suggestions? Or any other information needed that will shed some light on this?
Jared Fucci

Joined: Mar 06, 2012
Posts: 6
I think I see what the problem might be related to. The way this project is building with maven, it's making multiple files with the same name in the META_INF folder(i.e. spring.schemas, spring.handlers, etc) It looks like these contain the schema locations and the handler locations. It looks like when spring starts, it checks for spring.handlers and spring.schemas and maps them, but it looks like it's just grabbing the first one it sees and continues on.

Is it supposed to make multiple .schema and .handler files and spring should look through all of them? or should something be combining these into 1 file?
I agree. Here's the link:
subject: Spring 3.0.2 and Active MQ 5.4.1 Issues
It's not a secret anymore!