cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: [M10N] cocoon-webapp
Date Sun, 08 Jan 2006 19:29:49 GMT

Daniel Fagerstrom wrote:

> 
> So, we have to wait for some more features for the Jetty plugin. I made
> ./cocoon.sh use the webapp from mvn war:inplace so that we have
> something that is easy to use.

Putting in an extra null check seems to get us a bit further, but i'm
not sure how valid a servlet environment is that doesn't provide
javax.servlet.context.tempdir.

---
cocoon-core/src/main/java/org/apache/cocoon/servlet/CocoonServlet.java
    (revision 367024)
+++
cocoon-core/src/main/java/org/apache/cocoon/servlet/CocoonServlet.java
    (working copy)
@@ -653,7 +653,8 @@
             SettingsHelper.fill(settings, this.config);
             if ( settings.getWorkDirectory() == null ) {
                 final File workDir =
(File)this.config.getServletContext().getAttribute("javax.servlet.context.tempdir");
-                settings.setWorkDirectory(workDir.getAbsolutePath());
+                if (workDir != null)
+                    settings.setWorkDirectory(workDir.getAbsolutePath());
             }
             if ( settings.getLoggingConfiguration() == null ) {
                 settings.setLoggingConfiguration("/WEB-INF/logkit.xconf");


With this change i get :

java.lang.NoClassDefFoundError: mx4j/log/Log
        at
javax.management.MBeanServerFactory.getLogger(MBeanServerFactory.java:34)
        at
javax.management.MBeanServerFactory.findMBeanServer(MBeanServerFactory.java:105)
        at
org.apache.cocoon.util.JMXUtils.getInitialMBeanServer(JMXUtils.java:357)


Can we tell mx4j to somehow redirect its logging to log4j or
commons-logging ?


Jorg


Mime
View raw message