Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370120

Summary: jvm arguments added via start.ini and --exec are missing spaces
Product: [RT] Jetty Reporter: Thomas Becker <tbecker>
Component: serverAssignee: Joakim Erdfelt <joakim.erdfelt>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: gregw, jetty-inbox, jmohseni, joakim.erdfelt
Version: unspecified   
Target Milestone: 7.5.x   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=369349
Whiteboard:
Attachments:
Description Flags
proposed patch
none
proposed patch none

Description Thomas Becker CLA 2012-01-30 08:10:16 EST
Build Identifier: 

Using --exec in start.ini breaks the commandline as the spaces between the commandline arguments are missing in the current build.

The commits causing the bug:

commit 58c57a9ea0288acf80e52b85e35349811d88fb5a
commit 3df95d45c27c924c1f0e76c4c16a3f796ddf2470



Reproducible: Always
Comment 1 Thomas Becker CLA 2012-01-30 08:11:36 EST
Created attachment 210261 [details]
proposed patch
Comment 2 Thomas Becker CLA 2012-01-30 08:41:07 EST
Created attachment 210262 [details]
proposed patch

A new patch which reverts the changes which broke the build an adds a Unit Test for jvmArgs.
Comment 3 Joakim Erdfelt CLA 2012-01-30 11:19:19 EST
Patches applied and pushed into master.
Continuing testing of changes in various scenarios.
Comment 4 Joakim Erdfelt CLA 2012-01-30 11:22:51 EST
Early snapshots fixes of this can be found at 

https://oss.sonatype.org/content/repositories/jetty-snapshots/org/eclipse/jetty/jetty-start/7.6.1-SNAPSHOT/
Comment 5 Greg Wilkins CLA 2012-01-30 18:44:31 EST
I tested f02244fbf66e4778a316fa0c3d0e06555bf650e2
and with a fresh build on linux I moved jetty-distribution/target/distribution
to jetty-distribution/target/d\ ist

and got:

[607] java -jar start.jar --exec
Exception in thread "main" java.lang.NoClassDefFoundError: ist
Caused by: java.lang.ClassNotFoundException: ist
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: ist.  Program will exit.
Comment 6 Thomas Becker CLA 2012-01-31 03:12:26 EST
Greg, yes spaces still do not work. But that's another issue. 

This issue here is just about the missing spaces between jvm arguments and it's fixed by the patch attached. You can just commit it and close the issue. I think joakim aready committed the fix.
Comment 7 Johnny Mohseni CLA 2012-02-10 12:22:12 EST
Hi Thomas/Joakim.  I see below that 7.6.1 snapshot has the fix but any workaround for this bug on 8.x?  Any timeline for pushing out an official Jetty 8.x release package with this fix?  I am running Win7 64 bit using jetty-distribution-8.1.0.v20120127.
Comment 8 Thomas Becker CLA 2012-02-10 12:26:27 EST
Hi Johnny,

unfortunately there's no workaround for this bug. You can downgrade to an earlier release, don't use --exec with the current release or wait for the next release which will be coming shortly (most probably next week).
Sorry for the inconvenience.

It's only the v20120127 releases which are affected.

Cheers,
Thomas
Comment 9 Thomas Becker CLA 2012-02-10 12:27:55 EST
Or use a SNAPSHOT release as shown by Joakim above at your own risk (should be pretty safe though) until the next release.