You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "David Crossley (JIRA)" <ji...@apache.org> on 2006/08/25 16:31:22 UTC

[jira] Created: (FOR-924) forrest war fails with error in ForrestConfModule

forrest war fails with error in ForrestConfModule
-------------------------------------------------

                 Key: FOR-924
                 URL: http://issues.apache.org/jira/browse/FOR-924
             Project: Forrest
          Issue Type: Bug
          Components: Launch servlet WAR
    Affects Versions: 0.8-dev
            Reporter: David Crossley
             Fix For: 0.8-dev


With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
error log has this ...

------------
ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
java.lang.NullPointerException
        at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
        at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
        at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
...
------------

Perhaps this is related to recent changes in forrest properties system.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Created: (FOR-924) forrest war fails with error in ForrestConfModule

Posted by Thorsten Scherler <th...@apache.org>.
On Tue, 2006-09-19 at 11:27 +0200, Thorsten Scherler wrote:
> On Tue, 2006-09-19 at 11:51 +1000, David Crossley wrote:
> > Hi Thorsten, do you know something about this issue. 
> 
> Nupp, need to look into it.
> 
> > It appears to be
> > related to your changes to use the new properties system.
> > I have tried but cannot fix it.

Not so much the new properties system more the consequence from FOR-916
like Martin Stockhammer thinks.

Did you try his patch?

salu2

> 
> Will try to do it soon, but I reckon not before the weekend.
> 
> salu2
> 
> > 
> > -David
> > 
> > On Fri, Aug 25, 2006 at 07:31:22AM -0700, David Crossley (JIRA) wrote:
> > > forrest war fails with error in ForrestConfModule
> > > -------------------------------------------------
> > > 
> > >                  Key: FOR-924
> > >                  URL: http://issues.apache.org/jira/browse/FOR-924
> > >              Project: Forrest
> > >           Issue Type: Bug
> > >           Components: Launch servlet WAR
> > >     Affects Versions: 0.8-dev
> > >             Reporter: David Crossley
> > >              Fix For: 0.8-dev
> > > 
> > > 
> > > With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
> > > error log has this ...
> > > 
> > > ------------
> > > ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
> > > java.lang.NullPointerException
> > >         at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
> > >         at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
> > >         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> > > ...
> > > ------------
> > > 
> > > Perhaps this is related to recent changes in forrest properties system.
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [jira] Created: (FOR-924) forrest war fails with error in ForrestConfModule

Posted by Thorsten Scherler <th...@apache.org>.
On Tue, 2006-09-19 at 11:51 +1000, David Crossley wrote:
> Hi Thorsten, do you know something about this issue. 

Nupp, need to look into it.

> It appears to be
> related to your changes to use the new properties system.
> I have tried but cannot fix it.

Will try to do it soon, but I reckon not before the weekend.

salu2

> 
> -David
> 
> On Fri, Aug 25, 2006 at 07:31:22AM -0700, David Crossley (JIRA) wrote:
> > forrest war fails with error in ForrestConfModule
> > -------------------------------------------------
> > 
> >                  Key: FOR-924
> >                  URL: http://issues.apache.org/jira/browse/FOR-924
> >              Project: Forrest
> >           Issue Type: Bug
> >           Components: Launch servlet WAR
> >     Affects Versions: 0.8-dev
> >             Reporter: David Crossley
> >              Fix For: 0.8-dev
> > 
> > 
> > With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
> > error log has this ...
> > 
> > ------------
> > ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
> > java.lang.NullPointerException
> >         at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
> >         at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
> >         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> > ...
> > ------------
> > 
> > Perhaps this is related to recent changes in forrest properties system.
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [jira] Created: (FOR-924) forrest war fails with error in ForrestConfModule

Posted by David Crossley <cr...@apache.org>.
Hi Thorsten, do you know something about this issue. It appears to be
related to your changes to use the new properties system.
I have tried but cannot fix it.

-David

On Fri, Aug 25, 2006 at 07:31:22AM -0700, David Crossley (JIRA) wrote:
> forrest war fails with error in ForrestConfModule
> -------------------------------------------------
> 
>                  Key: FOR-924
>                  URL: http://issues.apache.org/jira/browse/FOR-924
>              Project: Forrest
>           Issue Type: Bug
>           Components: Launch servlet WAR
>     Affects Versions: 0.8-dev
>             Reporter: David Crossley
>              Fix For: 0.8-dev
> 
> 
> With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
> error log has this ...
> 
> ------------
> ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
> java.lang.NullPointerException
>         at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
>         at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
>         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> ...
> ------------
> 
> Perhaps this is related to recent changes in forrest properties system.

[jira] Closed: (FOR-924) forrest war fails with error in ForrestConfModule

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FOR-924?page=all ]

David Crossley closed FOR-924.
------------------------------


Confirmed. Thanks Martin.

> forrest war fails with error in ForrestConfModule
> -------------------------------------------------
>
>                 Key: FOR-924
>                 URL: http://issues.apache.org/jira/browse/FOR-924
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>    Affects Versions: 0.8-dev
>            Reporter: David Crossley
>             Fix For: 0.8-dev
>
>
> With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
> error log has this ...
> ------------
> ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
> java.lang.NullPointerException
>         at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
>         at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
>         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> ...
> ------------
> Perhaps this is related to recent changes in forrest properties system.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FOR-924) forrest war fails with error in ForrestConfModule

Posted by "Martin Stockhammer (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-924?page=comments#action_12435338 ] 
            
Martin Stockhammer commented on FOR-924:
----------------------------------------

By one of the last patches the import of forrest.properties file in ForrestConfModule.java was removed, because in "forrest run" startup they are set from ant as system properties. In Webapp-Modules there is no ant involved and forrest.properties is never read. 
This leads to the NullpointerException in ForrestConfUtils.aliasSkinProperties(). 
---------------------
        String skinName = props.getProperty("project.skin");
        if (skinName.equals("crust")) {   <<<<------ skinName is 'null'
            setSkinToUse(props, "krysalis-site");
--------------------
My suggestion is, to reinsert the code to import forrest.properties file in ForrestConfModule.java:

Index: E:/user/martins/devel/eclipse-ws/apache-forrest/main/java/org/apache/forrest/conf/ForrestConfModule.java
===================================================================
Index: E:/user/martins/devel/eclipse-ws/apache-forrest/main/java/org/apache/forrest/conf/ForrestConfModule.java
===================================================================
--- org/apache/forrest/conf/ForrestConfModule.java	(revision 447107)
+++ org/apache/forrest/conf/ForrestConfModule.java	(working copy)
@@ -175,6 +175,20 @@
             filteringProperties = loadXMLPropertiesFromURI(filteringProperties,
                     forrestPropertiesStringURI);
 
+            // get forrest.properties and load the values
+            forrestPropertiesStringURI = projectHome + SystemUtils.FILE_SEPARATOR
+                + "forrest.properties";        
+            filteringProperties = loadAntPropertiesFromURI(filteringProperties,
+                forrestPropertiesStringURI);
+
+        // get default-forrest.properties and load the values
+        String defaultForrestPropertiesStringURI = contextHome + SystemUtils.FILE_SEPARATOR
+                + "default-forrest.properties";
+        filteringProperties = loadAntPropertiesFromURI(filteringProperties,
+                defaultForrestPropertiesStringURI);
+
+            
+            
             // Load plugin default properties
             String strPluginList = filteringProperties
                     .getProperty("project.required.plugins");
@@ -309,5 +323,46 @@
     private final void debug(String debugString) {
         getLogger().debug(debugString);
     }
+    
+    /**
+     * @param antPropertiesStringURI
+     * @throws MalformedURLException
+     * @throws IOException
+     * @throws SourceNotFoundException
+     */
+    private AntProperties loadAntPropertiesFromURI(AntProperties precedingProperties,
+            String antPropertiesStringURI) throws MalformedURLException, IOException,
+            SourceNotFoundException {
 
+        Source source = null;
+        InputStream in = null;
+        try {
+            source = m_resolver.resolveURI(antPropertiesStringURI);
+            if (debugging())
+                debug("Searching for forrest.properties in" + source.getURI());
+            if (source.exists()){
+                in = source.getInputStream();
+                filteringProperties = new AntProperties(precedingProperties);
+                filteringProperties.load(in);
+
+                if (debugging())
+                    debug("Loaded:" + antPropertiesStringURI + filteringProperties.toString());
+            }
+
+        } finally {
+            if (source != null) {
+                m_resolver.release(source);
+            }
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+
+        return filteringProperties;
+    }
+
+
 }


> forrest war fails with error in ForrestConfModule
> -------------------------------------------------
>
>                 Key: FOR-924
>                 URL: http://issues.apache.org/jira/browse/FOR-924
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>    Affects Versions: 0.8-dev
>            Reporter: David Crossley
>             Fix For: 0.8-dev
>
>
> With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
> error log has this ...
> ------------
> ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
> java.lang.NullPointerException
>         at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
>         at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
>         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> ...
> ------------
> Perhaps this is related to recent changes in forrest properties system.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (FOR-924) forrest war fails with error in ForrestConfModule

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FOR-924?page=all ]

Thorsten Scherler resolved FOR-924.
-----------------------------------

    Resolution: Fixed

Should be fixed now. Can you please verify and then close this issue.
TIA

> forrest war fails with error in ForrestConfModule
> -------------------------------------------------
>
>                 Key: FOR-924
>                 URL: http://issues.apache.org/jira/browse/FOR-924
>             Project: Forrest
>          Issue Type: Bug
>          Components: Launch servlet WAR
>    Affects Versions: 0.8-dev
>            Reporter: David Crossley
>             Fix For: 0.8-dev
>
>
> With the current trunk (r436707) doing 'forrest war' and deploy to either full Jetty-4 or Tomcat-4
> error log has this ...
> ------------
> ERROR   (2006-08-26) 00:17.47:047   [core.manager] (Unknown-URI) Unknown-Thread/CoreServiceManager: Caught an exception trying to initialize the component handler.
> java.lang.NullPointerException
>         at org.apache.forrest.conf.ForrestConfUtils.aliasSkinProperties(ForrestConfUtils.java:100)
>         at org.apache.forrest.conf.ForrestConfModule.initialize(ForrestConfModule.java:194)
>         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> ...
> ------------
> Perhaps this is related to recent changes in forrest properties system.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira