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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:34:12+00:00 2026-06-18T04:34:12+00:00

I inherited a Struts 1 app consisting of about eight separate packages all compiled

  • 0

I inherited a Struts 1 app consisting of about eight separate packages all compiled into the same app. I’ve been tasked with rewriting its ant build script. Previously it was copying all the config files separately into the /usr/local/tomcat/shared/classes dir, but our ops team has asked us to streamline things so the build script just creates a war file that can be dropped into tomcat.

I get an error when my ConfigurationManager class tries to load its config file. This file, config.xml, is currently being copied into WEB-INF before it’s warred up with the rest of the app. So when I look at the exploded war (ROOT) I do find /usr/local/tomcat/webapps/ROOT/WEB-INF/config.xml. Here is the relevant portion of ConfigurationManager:

private static final String BASE_CONFIG_FILE = "WEB-INF/config.xml";

private void loadConfigFiles() throws RCConfigurationException {
    try {
        log.error("classpath: " + System.getProperty("java.class.path"));

        ConfigurationFactory factory = new ConfigurationFactory();
        URL configURL = getClass().getResource(BASE_CONFIG_FILE);
        factory.setConfigurationURL(configURL);
        config = factory.getConfiguration();

    } catch (ConfigurationException e) {
        log.error("Exception loading configuration files.", e);
        throw new RCConfigurationException("Exception loading configuration files", e);
    }
}

The log.error() call outputs this:

13:16:10,561 ERROR ConfigurationManager:75 - classpath: /usr/local/tomcat/bin/bootstrap.jar

My localhost.2013-01-29.log shows this:

SEVERE: Exception starting filter GlobalRootManager
java.lang.ExceptionInInitializerError
    at com.rc.util.config.ConfigurationManager.getInstance(ConfigurationManager.java:66)
    at com.rc.commonbusinesswebapp.servlet.filter.GlobalRootManager.init(GlobalRootManager.java:42)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NullPointerException
    at org.apache.commons.configuration.ConfigurationFactory.setConfigurationURL(ConfigurationFactory.java:220)
    at com.rc.util.config.ConfigurationManager.loadConfigFiles(ConfigurationManager.java:79)
    at com.rc.util.config.ConfigurationManager.<init>(ConfigurationManager.java:55)
    at com.rc.util.config.ConfigurationManager.<init>(ConfigurationManager.java:26)
    at com.rc.util.config.ConfigurationManager$LazyHolder.<clinit>(ConfigurationManager.java:37)
    ... 29 more

I am spinning my wheels so I hope someone here can help me. Thanks.

  • 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-18T04:34:13+00:00Added an answer on June 18, 2026 at 4:34 am

    WEB-INF is not on a web app’s classpath.

    WEB-INF/classes is; one option would be to locate the file at the root of the classpath if you want to load the config file as a classpath resource.

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

Sidebar

Related Questions

I recently inherited an e-commerce app (Java/Struts) that I'm porting to Rails. The thing
I have recently inherited a J2EE Struts web app that was written back in
I inherited a Struts 1 app that heavily utilizes FilterChain and I don't understand
I inherited a legacy Java Servlet webapp I am slowly rewriting into something a
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
I've inherited a struts 1 web application where, in order to reduce the number
I inherited an Intraweb app that had a 2MB text file of memory leaks
I’ve been pondering about the C# and CIL type system today and I’ve started
We're converting an older Struts 1.x app from HTML4 to XHTML1.1. To force compliance

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.