Bug 175260 - Failed to start IDE installed into path with two spaces
Failed to start IDE installed into path with two spaces
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Launchers&CLI
6.x
All All
: P2 (vote)
: 6.x
Assigned To: t_h
issues@platform
: SPACE_IN_PATH
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-23 09:05 UTC by Michael Nazarov
Modified: 2009-11-24 19:07 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Suggested continuation of fix (1.12 KB, patch)
2009-11-17 17:56 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nazarov 2009-10-23 09:05:12 UTC
There are two spaces <space><space> in path used for installation and
such path caused troubles.
Solaris output showed below, Linux shows same exception without stacktrace.
Run from file explorer has same result so this is not console problem.
Standalone non bundle installer affected as well.
On Windows platform it works fine.

bash-3.2$ ~/netbeans\ n\ \ 6.7.1/bin/netbeans 
Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/Main
Caused by: java.lang.ClassNotFoundException: org.netbeans.Main
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: org.netbeans.Main.  Program will exit.
Comment 1 Michael Nazarov 2009-10-23 10:05:30 UTC
What's the reason?
Comment 2 t_h 2009-10-23 10:09:47 UTC
Workaround (install into different path) exists => P2
Comment 3 Michael Nazarov 2009-10-23 10:19:22 UTC
This is NOT workaround. Workaround is answer for "how to install this path".
Comment 5 Michael Nazarov 2009-10-23 10:28:22 UTC
Thanks for link.

P1
crash or deadlock 	Reproducible, unavoidable crash


It reproducible and unavoidable for sure. "Do not use <something>"
is not workaround at all.
Comment 6 t_h 2009-10-23 14:47:34 UTC
Use different path is clearly valid workaround for the problem. Moreover, usage of two subsequent spaces in path is
obviously corner-case. Probably more P3 than P2.
Comment 7 t_h 2009-10-23 14:59:20 UTC
core-main #cc6eca4799d4
Comment 8 Jesse Glick 2009-11-17 17:25:48 UTC
Fix does not seem to work. While 6.7 died immediately:

Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/Main
Caused by: java.lang.ClassNotFoundException: org.netbeans.Main
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: org.netbeans.Main.  Program will exit.

6.8 with the attempted fix just dies soon after:

-------------------------------------------------------------------------------
>Log Session: Tuesday, November 17, 2009 7:21:15 PM EST
>System Info: 
  Product Version         = NetBeans Platform Dev (Build 091113-2affbb438743)
  Operating System        = Linux version 2.6.31-14-generic running on i386
  Java; VM; Vendor        = 1.6.0_17; Java HotSpot(TM) Client VM 14.3-b01; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_17-b04
  Java Home               = /space/jdk1.6.0_17/jre
  System Locale; Encoding = en_US (nb); UTF-8
  Home Directory          = /home/jglick
  Current Directory       = /tmp
  User Directory          = /tmp/testud09
  Installation            = /tmp/double  space  in  path/platform11
  Boot & Ext. Classpath   = /space/jdk1.6.0_17/jre/lib/resources.jar:/space/jdk1.6.0_17/jre/lib/rt.jar:/space/jdk1.6.0_17/jre/lib/sunrsasign.jar:/space/jdk1.6.0_17/jre/lib/jsse.jar:/space/jdk1.6.0_17/jre/lib/jce.jar:/space/jdk1.6.0_17/jre/lib/charsets.jar:/space/jdk1.6.0_17/jre/classes:/space/jdk1.6.0_17/jre/lib/ext/sunjce_provider.jar:/space/jdk1.6.0_17/jre/lib/ext/sunpkcs11.jar:/space/jdk1.6.0_17/jre/lib/ext/dnsns.jar:/space/jdk1.6.0_17/jre/lib/ext/localedata.jar
  Application Classpath   = /tmp/double  space  in  path/platform11/lib/boot.jar:/tmp/double  space  in  path/platform11/lib/org-openide-modules.jar:/tmp/double  space  in  path/platform11/lib/org-openide-util.jar:/space/jdk/lib/dt.jar:/space/jdk/lib/tools.jar
  Startup Classpath       = /tmp/double  space  in  path/platform11/core/org-openide-filesystems.jar:/tmp/double  space  in  path/platform11/core/core.jar
-------------------------------------------------------------------------------
WARNING [org.netbeans.core.startup.Main]
java.lang.NoClassDefFoundError: org.netbeans.license.AcceptLicense starting from org.netbeans.MainImpl$BootClassLoader@ec16a4 with possible defining loaders null and declared parents []
	at org.netbeans.core.startup.Main.getKlass(Main.java:364)
	at org.netbeans.core.startup.Main.access$000(Main.java:71)
	at org.netbeans.core.startup.Main$1LicenseHandler.run(Main.java:475)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 9 Jesse Glick 2009-11-17 17:56:49 UTC
Created attachment 91215 [details]
Suggested continuation of fix

With this added patch, things seem to work. Not sure that other things are not broken.
Comment 10 Antonin Nebuzelsky 2009-11-20 02:59:19 UTC
Jesse, thanks for the patch. Tomasi, take a look at that.

However, we are in high-resistance now, so I would agree with integration to 6.8 only if we are sure the fix is 100% safe and that the case of 2 spaces in installation path is really a P1 for some reason.

Setting TM to Next for now.

Can installer team comment on priority of this issue?
Comment 11 t_h 2009-11-20 03:26:35 UTC
IMHO no need to push this during HR.
Comment 12 Jesse Glick 2009-11-20 12:51:13 UTC
I would suggest that the impact of the bug be carefully evaluated, since we cannot later (6.8.1?) push an update to launchers if we change our mind. (Perhaps AU can now update platform/lib/nbexec, but I presume it cannot update bin/netbeans since that is not part of a cluster.)
Comment 13 dlipin 2009-11-21 22:16:52 UTC
I`d say that is the corner case though valid. I have feeling that have 2 spaces in path will be used by mistake rather than intentionally. Moreover, Linux/Solaris users typically does not uses spaces at all, or, at least, not as often as on Windows.

And, yes, Jesse is absolutely correct, bin/netbeans can`t be updated by AU at the moment. But due to rare occurrence of the bug I don`t think it is absolutely required to be fixed in 6.8.
Comment 14 t_h 2009-11-23 08:29:53 UTC
Jesse's patch integrated in core-main #b7bd22f6ea9c
Comment 15 Quality Engineering 2009-11-24 19:07:13 UTC
Integrated into 'main-golden', will be available in build *200911241400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b7bd22f6ea9c
User: Tomas Holy <t_h@netbeans.org>
Log: #175260: Failed to start IDE installed into path with two spaces


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo