[MAGNOLIA-1075] startup problems: application path with spaces breakes initialization Created: 22/Sep/06  Updated: 23/Jan/13  Resolved: 13/Dec/06

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: 3.0 RC2
Fix Version/s: 3.0 RC4

Type: Bug Priority: Critical
Reporter: Philipp Bärfuss Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-1268 Spaces in installation path make init... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If you install magnolia on a windows machine on a path which has spaces in the name the initialization breaks.

Since you normaly install on C:\Program Files\ this is critical



 Comments   
Comment by Giancarlo Berner [ 22/Sep/06 ]

I thought of that in first place, that's why my Jetty path to /webapps is C:\jetty-6.0.0\webapps\mga, with no spaces. I just changed to Tomcat to exclude that Jetty is the problem.
So I get the same error even though I have NO spaces in the path. Therefore it is still a "Blocker".

Comment by Magnolia International [ 12/Oct/06 ]

This now works. We were using java.net.URI to get the module root when registering a module, and spaces are invalid in URIs. Now using a simpler mechanism to get this path.

Giancarlo: I don't think this is related to the errors you had with jetty in MAGNOLIA-1055. If you're still unable to start under jetty, please open another report, and/or comment on MAGNOLIA-1055.

Comment by Anthony Ogier [ 12/Oct/06 ]

Is it okay with the 4 couples of tomcat 5.0 / 5.5 and JDK 1.4.2 / 1.5 ?

Comment by Magnolia International [ 12/Oct/06 ]

As far as I can tell yes. I checked with both JDKs, but only on tomcat 5.0.28 and OSX at the moment. The error I had was pretty much explicitely due to the space character being invalid in a java.net.URI so this is definitely fixed. Now, there might be other issues more specific to windows, maybe. I'll test this asap, but in the mean time, try it if you get a chance If there are other issues, please file another bug report with details and logs.

Comment by Cristina Belderrain [ 12/Dec/06 ]

Greg, as you know, I've observed this error happening on December 11. Unfortunately, I haven't kept a copy of the logs and they've been wiped out when I reinstalled Tomcat. So I'll try to leave here the config data you need:

Which version of Magnolia: 3.0.1 CE
Your operating system: XP Pro (localized to Brazilian Portuguese)
Memory size: 1 GB
Amount of memory allocated to java: 512 MB
Tomcat version: 5.5.20
Tomcat folder before: C:\Tomcat 5.5
Tomcat folder after: C:\Tomcat-5.5.20
JVM used by Tomcat is in folder: jre1.5.0_09/bin/client
JAVA_HOME points to folder: jdk1.5.0_09/bin

The space character was replaced by %20 in the logs... This gave me the first hint to what could be happening.

Hope this helps,

Cristina

Comment by Magnolia International [ 12/Dec/06 ]

Hmm, reproduced the error on windows

Comment by Magnolia International [ 12/Dec/06 ]

Here's an interesting bit of logs:
WARN info.magnolia.cms.util.ClasspathResourcesUtil ClasspathResourcesUtil.java(collectFiles:131) 12.12.2006 15:45:23 missing file: C:\tomcat%205.5.20\webapps
\magnoliaPublic\WEB-INF\lib\magnolia-module-workflow-3.0.1.jar
WARN info.magnolia.cms.util.ClasspathResourcesUtil ClasspathResourcesUtil.java(collectFiles:131) 12.12.2006 15:45:23 missing file: C:\tomcat%205.5.20\webapps
\magnoliaPublic\WEB-INF\lib\magnolia-taglib-cms-3.0.1.jar
WARN info.magnolia.cms.util.ClasspathResourcesUtil ClasspathResourcesUtil.java(collectFiles:131) 12.12.2006 15:45:23 missing file: C:\tomcat%205.5.20\webapps
\magnoliaPublic\WEB-INF\lib\magnolia-taglib-utility-3.0.1.jar
WARN info.magnolia.cms.util.ClasspathResourcesUtil ClasspathResourcesUtil.java(collectFiles:131) 12.12.2006 15:45:23 missing file: C:\tomcat%205.5.20\webapps
\magnoliaPublic\WEB-INF\lib\mail-1.4.jar

Comment by Magnolia International [ 12/Dec/06 ]

I've just deployed a fresh snapshot of magnolia-core on our maven repository. Fixes the issue for me: could you please try it and tell me if it works for you? Thanks !

http://svn.magnolia.info/maven/snapshots/info/magnolia/magnolia-core/3.0.2-SNAPSHOT/magnolia-core-3.0.2-20061212.160846-1.jar

(just replace WEB-INF/lib/magnolia-core-3.0.1.jar by this one in both your author and public instance and restart)

Comment by Magnolia International [ 12/Dec/06 ]

Note that this specific issue is related to URLClassLoader returning encoded URLs, and URL.getFile() not decoding the paths. So we do the decoding manually.
Tomcat 5.0 doesnt seem to trigger this problem, while Tomcat5.5 does.

Tomcat 5.5 and Tomcat 5.0 both use a org.apache.catalina.loader.WebappClassLoader which is subclass of java.net.URLClassLoader, so I can only assume the implementation of the former somehow changed between those versions.

Comment by Cristina Belderrain [ 13/Dec/06 ]

Greg, I've downloaded the latest magnolia-core from the Maven repository and tried it on another Tomcat install (C:\Tomcat 5.5.20, with a space between Tomcat and 5.5.20). Magnolia 3.0.1 CE worked as expected within the Firefox browser .

Thank you,

Cristina

Comment by Magnolia International [ 13/Dec/06 ]

I've opened (and fixed) MAGNOLIA-1268 to address specifically this latest issue.

Generated at Mon Feb 12 03:23:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.