Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Spring 3.0.2 and Active MQ 5.4.1 Issues

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.4.1</version>
</dependency>

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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Mark
 
Jared Fucci
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone have any suggestions? Or any other information needed that will shed some light on this?
 
Jared Fucci
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic