Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1287

weblogic: properties loading fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.2
    • 3.0.1
    • None
    • None

      From the dev list:

      I think I finally figured out what was happening here.

      If we take a look at the contextInitialized method of the PropertyInitializer class we'll start to see...

      public void contextInitialized(ServletContextEvent sce) {
      final ServletContext context = sce.getServletContext();

      loadBeanProperties();

      loadModuleProperties();
      ....

      When we call loadModuleProperties, we end up call ModuleRegistration.getInstance.getModuleDefinitions, and this calls ModuleRegistration.init() which calls readModuleDefinitions.

      Now readModuleDefinitions calls ClasspathResourceUtils.findResources.

      Here we check to see if we have a URLClassLoader. Apparently with WLS 9.2, we do not.

      So, we call Path.getAbsoluteFileSystemPath which eventually tries to get this property:

      SystemProperty.getProperty(SystemProperty.MAGNOLIA_APP_ROOTDIR);

      However, I found that this property has not been set.

      So, I tweaked the PropertyInitializer class to update the contextInitialized method to call initRootPath.

      However, this only sets the MAGNOLIA_APP_ROOTDIR property in the local instance, so I also added to the SystemPropety static instance while I was there.

      I see there is also a overloadWithSystemProperties method I could have used too. I'm not sure if this is the best way to fix it, or if I'm looking at all this right. However, the magnolia application now deploys successfully for me.

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              pbaerfuss Philipp Bärfuss
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: