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.

 

Shane

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 11:27 AM
To: [email protected]
Subject: Re: [magnolia-dev] magnolia on weblogic 9.2

 

I was looking at the source today and I am at least a little more aware
of what's going on.

 

It appears that this happens when all the xml config files are to be
gathered.

 

1)     File dir = new
File(Path.getAbsoluteFileSystemPath("WEB-INF/lib"));
ClassPathResourcesUtil (88)

2)     return new File(Path.getAppRootDir(), path).getAbsolutePath();
Path (122)

3)     return new
File(SystemProperty.getProperty(SystemProperty.MAGNOLIA_APP_ROOTDIR));
Path (122)

 

It looks as though the SytemProperty.getProperty call here is returning
a null value. At what point is the MAGNOLIA_APP_ROOTDIR property
(magnolia.app.rootdir) set? Perhaps when using weblogic this property is
not being set?

 

Shane

 

________________________________

From: Shane Johnson 
Sent: Tuesday, December 19, 2006 5:50 PM
To: '[email protected]'
Subject: RE: [magnolia-dev] magnolia on weblogic 9.2

 

Ok. Ok. I guess adding some required info would be a good idea.

 

Magnolia 3.1 (the self installing jar)

Windows XP

Weblogic Server 9.2

 

Initially I dropped the magnoliaAuthor folder in the autodeploy
directory. However, I received the exception shown below. Then I decided
to manually deploy the author app from the installed location under
'Program Files'. It didn't work that way either, but yes there would
have been a space in the path.

 

So, right now I'm just wondering how to get it going from the autodeploy
directory.

 

Shane

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 5:44 PM
To: [email protected]
Subject: Re: [magnolia-dev] magnolia on weblogic 9.2

 

 

On 20 Dec 2006, at 00:44, Shane Johnson wrote:

         

        I am trying to deploy the authoring app of magnolia to weblogic
server 9.2, but I haven't had any luck. I'll copy the stacktrace below.
It appears that something is breaking when trying to get the root app
directory as a File. Is this a weblogic thing? I am just trying a basic
deployment, nothing advanced.

         

 

Which version/release/packaging of Magnolia? What OS? Is there any space
character in the path to the webapp directory? <grin>

 

 

-g

 

         

         

        Thanks, Shane

         

        <Dec 19, 2006 5:20:11 PM CST> <Warning> <Deployer> <BEA-149078>
<Stack trace for message 149004

        weblogic.application.ModuleException:

                at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:8
94)

                at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:336)

                at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateD
river.java:204)

                at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriv
er.java:26)

                at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDr
iver.java:60)

                Truncated. see log file for complete stacktrace

        java.lang.NullPointerException

                at java.io.File.<init>(File.java:194)

                at
info.magnolia.cms.core.Path.getAppRootDir(Path.java:111)

                at
info.magnolia.cms.core.Path.getAbsoluteFileSystemPath(Path.java:122)

                at
info.magnolia.cms.util.ClasspathResourcesUtil.findResources(ClasspathRes
ourcesUtil.java:88)

                at
info.magnolia.cms.beans.config.ModuleRegistration.readModuleDefinitions(
ModuleRegistration.java:156)

                Truncated. see log file for complete stacktrace

        > 

         

         

 

 

Reply via email to