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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:05:44+00:00 2026-05-14T17:05:44+00:00

I have an ApplicationContext.xml file with the following node: <context:property-placeholder location=classpath:hibernate.properties, classpath:pathConfiguration.properties /> It

  • 0

I have an ApplicationContext.xml file with the following node:

<context:property-placeholder 
location="classpath:hibernate.properties, classpath:pathConfiguration.properties" />

It specifies that both properties files will be used by my application.

Inside pathConfiguration.properties, some paths are defined, such as:

PATH_ERROR=/xxx/yyy/error
PATH_SUCCESS=/xxx/yyy/success

A PathConfiguration bean has setters for each path.

The problem is: when some of those mandatory paths are not defined, no error is thrown. How and where should I handle this problem?

  • 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-05-14T17:05:44+00:00Added an answer on May 14, 2026 at 5:05 pm

    The standard behaviour of the PropertyPlaceholder that is configured via <context:property-placeholder ... /> throws an exception when a property cannot be resolved once it is required in some place as long as you do not configure it otherwise.

    For your case if you have a Bean that requires some properties like this, it will fail when the value cannot be resolved. For example like this:

    public class PropertiesAwareBean {
    
      @Value("${PATH_ERROR}")
      private String errorPath;
    
      String getErrorPath() {
        return errorPath;
      }
    
    }
    

    If you want to relax the PropertyPlaceholder and don’t make it throw an Exception when a property cannot be resolved you can configure the PropertyPlaceholder to ignore unresolvable properties like this <context:property-placeholder ignore-unresolvable="true" ... />.

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

Sidebar

Related Questions

I have a need to change the spring applicationContext.xml file that is used based
I have the following defined. @Autowired DaoType1<object1> someDao; @Autowired DaoType1<object1> someListDao; and in my
I find myself using two identical beans in my applicationContext.xml and my applicationContext-test.xml. I'd
I am working on a Spring MVC application in which I have recently been
I recently asked this question regarding pulling beans out of an applicationContext. The answer
I am using Spring MVC for my web application and I am using my
I am working with several Spring MVC web applications and I use the getter/setter
I am using Spring MVC for my web application and I am integrating Velocity
I'm fairly new to Tomcat and Java web development and am banging my head
I got a problem with my spring configuration when I run it in jetty.

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.