| From: |
svn@magnolia.info |
| Subject: |
[16860] merging r16847, MAGNOLIA-2270 |
| Date: |
Wed, 16 Jul 2008 21:40:31 +0200 (CEST) |
| To: |
svn-list@magnolia.info |
|

 |
|
[16860] merging r16847, MAGNOLIA-2270
ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
-->
- Revision
- 16860
- Author
- fgiust
- Date
- 2008-07-16 21:40:31 +0200 (Wed, 16 Jul 2008)
Log Message
merging r16847, MAGNOLIA-2270
Modified Paths
Diff
Modified: magnolia/branches/magnolia-3.6-rc/magnolia-core/src/main/java/info/magnolia/cms/servlets/MgnlServletContextListener.java (16859 => 16860)
--- magnolia/branches/magnolia-3.6-rc/magnolia-core/src/main/java/info/magnolia/cms/servlets/MgnlServletContextListener.java 2008-07-16 19:38:20 UTC (rev 16859)
+++ magnolia/branches/magnolia-3.6-rc/magnolia-core/src/main/java/info/magnolia/cms/servlets/MgnlServletContextListener.java 2008-07-16 19:40:31 UTC (rev 16860)
@@ -208,8 +208,14 @@
String realPath = StringUtils.replace(context.getRealPath(StringUtils.EMPTY), "\\", "/"); //$NON-NLS-1$ //$NON-NLS-2$
realPath = StringUtils.removeEnd(realPath, "/");
if (realPath == null) {
+
+ // don't use new java.io.File("x").getParentFile().getAbsolutePath(), will throw a NPE for unexpanded war
+
// not great but better then npe that would come out otherwise
- throw new RuntimeException("Failed to initialize magnolia configuration. Error details: [ctx real path:" + context.getRealPath(StringUtils.EMPTY) + ", real dir:" + new java.io.File("x").getParentFile().getAbsolutePath() + " ]");
+ throw new RuntimeException(
+ "Failed to initialize magnolia configuration. Error details: [ctx real path:"
+ + context.getRealPath(StringUtils.EMPTY)
+ + "]. Magnolia needs to be run from an expanded webapp, please check your server configuration (maybe unpackWARs is set to false?).");
}
SystemProperty.setProperty(SystemProperty.MAGNOLIA_APP_ROOTDIR, realPath);
return realPath;
|
|