Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8742403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:29:38+00:00 2026-06-13T11:29:38+00:00

Basically I have a multi module application: data business web-app in the web-app part

  • 0

Basically I have a multi module application:

data
business
web-app

in the web-app part there is web.xml
with this configuration for loading different applicationContext.xml configuration files:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:META-INF/spring/applicationContext.xml</param-value>
</context-param>

[…]

<!-- Handles Spring requests -->
<servlet>
    <servlet-name>empp-v2-web</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>WEB-INF/spring/webmvc-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

my other two modules have each an META-INF/spring/applicationContext.xml.
in webmvc-config.xml I do a component scan only for classes with @Controller annotation, meanwhile in the applicationContext I scan for everything in the base package except controllers.

the problem is that when I try to autowire a bean in a controller I get always a NoSuchBeanDefinitionException.
This happens running the application as an exploded project with “Add and Remove” on the server configured in eclipse. If I do a maven build and deploy manually the application on the same server, the application works and the beans are autowired.
Does m2eclipse need some special configuration?
To me it seems that the applicationContext.xml are not loaded in this case.
How can verify that m2eclipse is coping resource files in the correct place?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:29:39+00:00Added an answer on June 13, 2026 at 11:29 am

    Seems there is some issue with m2eclipse and loading multiple application-context in the classpath. The only solution for me was to put everything spring configuration inside the main web application application-context. This solution solution works both in a packaged EAR and also as exploded application run inside eclipse.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I have a multi-module project consisting of 5 different modules. One of the
In our multi-tier business application we have ObservableCollections of Self-Tracking Entities that are returned
This is a multi-part question. I have a table similar to: CREATE TABLE sales_data
I have implemented a java program . This is basically a multi threaded service
Basically i have multi threads that adds data into a queue via SQLite. I
see basically i have one multi-thread application in which i want to see the
I have a multi-dimensional array, which basically consists of one sub-array for each year.
I basically have three tables, posts, images and postimages (this simply contains the ids
I basically have the same question as this guy .. The example in the
I have a form that (amongst other things) contains 2 multi-select listboxes. Basically you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.