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 2017902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T08:54:56+00:00 2026-05-17T08:54:56+00:00

I have a new web app that is packaged as a WAR as part

  • 0

I have a new web app that is packaged as a WAR as part of a multi-module Maven project. The applicationContext.xml for this WAR references beans that are imported from the “service” module, which in turn imports beans from the “dao” module. The import statement in applicationContext.xml looks like this:

<import resource="classpath*:service.xml" />

and the one inside the service.xml file looks like this:

<import resource="classpath*:dao.xml" />

Neither Spring STS, nor Eclipse show any warnings or errors in my bean files. I reference the imported beans all over the place. The Maven build works fine and the DAO integration tests all pass (they use the beans). I don’t have any service integration tests yet.

But when I start up the WAR in Jetty I get an error:

Error creating bean with name 'securityService' 
Cannot resolve reference to bean 'userDAO' while setting constructor argument

All of the imported bean XML files can be found inside their respective JAR files in the WEB-INF/lib directory. Indeed, the service bean that threw the error is itself defined inside the service.xml file inside the service module’s JAR file.

Apparently the service module can’t find the bean that it imported from the dao module. Obviously I don’t understand something…seems like this should this Just Work?

  • 1 1 Answer
  • 2 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-05-17T08:54:56+00:00Added an answer on May 17, 2026 at 8:54 am

    I enabled DEBUG logging for ‘org.springframework’ in order to see if I could learn anything. What I found were messages to the effect that the DAO beans had been created, but there was also a message about them having no name or id.

    I check the file, and they all did have an id. So what was it? I check the XML namespace and saw:

    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
    

    and noticed it was old (I am using Spring 3.0.2) and changed it to:

    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    

    Once I changed it, Spring instantly threw half a dozen errors regarding beans that were defined incorrectly (but never used apparently). Once I fixed those errors, everything Just Worked. I’ve since gone through the entire system checking Spring XML file namespace versions.

    Thanks to all for the help. Can’t believe I wasted a day on this stupidity!!

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

Sidebar

Related Questions

We have the following scenario with our project: A core web application packaged as
I have a web app that launches an URL in other windows/tabs. I would
I have a web app that lets users create groups. On the front page
I have a web app that is used on multiple continents. The underlying transaction
I am missing something obvious, but I'm not sure what. I have a single
I am missing something obvious, but I'm not sure what. I have a single
Howdy, I currently have my main activity in Android. It's called start activity. My
all, I have some problem installing my apk file in code. Wondering if anyone
I am thinking of designing a webbased frontend to a dataanalysis package. This is
I'm trying to parse some html using jsoup (1.3.3) in my android activity. When

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.