Community
Participate
Working Groups
Build Identifier: jetty-7.2.2.v20101205 tried many builds up to last 8.x milestone) When putting a dash in the path preceded by a space and --exec option is enabled in the .ini file (or the command Line) the VM will fail to start citing an unknown argument "-". The problem was reliably reproduced with multiple builds starting from 7.2.2 all the way to the last nightly build of 8. Possibly earlier builds are failing as well though I have not tried them). Now knowing the problem it is quite easy to find a workaround however since spaces in paths should normally be supported this problem incurred a long and frustrating troubleshooting experience. I am flagging this as critical because the whole system simply does not start, however the workaround is very simple... just remove the spaces in the path. The problem was reliably reproduced on different windows system (XP, 7, 7x64 2008, 2008r2) both with 32 and 64 bits VM (all in the 6 range from Oracle). the following question on SO describes the problem http://stackoverflow.com/questions/8255563/jetty-cannot-start-unable-to-create-the-virtual-machine-when-i-add-the-exec/8259148#8259148 Reproducible: Always Steps to Reproduce: 1. Get a Jetty build (any from 7.2.2) 2. expand the archive in a folder and edit the name such that it contains a space followed by a dash (ex "jetty-7.2.2.v20101205 - prod"). 3. Edit the ini file and enable the --exec option 4. make sure you have a war (the test war delivered with the archive will do) 5. start jetty (java -jar start.jar) 6. failed The procedure was reliably applied to multiple builds and the defective behavior was reproduced every times.
It can be fixed by tokenizing the commandline options in Main.java into a String[] and calling Runtime.exec(String[], ...) instead of Runtime.exec(String,...). The latter tokenizes by spaces and that's why the CMDL breaks. However having spaces and dashes combined in a directory path is a very bad idea and can have other side effects as well. So I'd just say we don't support spaces+dashes in directory names.
marking enhancement, a patch will make it get reviewed and implemented faster, otherwise we'll add it to the 'todo' list
I haven't looked at the code (yet) as I need to urgently find out why --exec is not working properly anymore. But just not to forget it, I'd like to check if this change by Joakim probably fixed this as well: commit 3df95d45c27c924c1f0e76c4c16a3f796ddf2470 Author: Joakim Erdfelt <joakim.erdfelt@gmail.com> 2012-01-20 19:27:38 Committer: Joakim Erdfelt <joakim.erdfelt@gmail.com> 2012-01-20 19:27:38 Parent: 58c57a9ea0288acf80e52b85e35349811d88fb5a (367635: report errors) Child: bc5ac3622aa39b6e60b96ab24b0fb11c09535172 (369349 replace quotes with a space escape method) Branches: origin/central-orbit-repo, origin/master, master, origin/HEAD
Created attachment 210361 [details] proposed patch fix for --dry-run attached
Comment on attachment 210361 [details] proposed patch attached to the wrong issue
Just tested it, this one is fixed together with the patch provided for: https://bugs.eclipse.org/bugs/show_bug.cgi?id=369349 --exec works fine in a directory called "jetty\ space\ \ -\ space/"
Closing this as fixed/duplicate. Although https://bugs.eclipse.org/bugs/show_bug.cgi?id=369349 needs to be committed first.