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

Bug 201819

Summary: Workbench crash on simple application profile - MalformedURLException: unknown protocol: c
Product: z_Archived Reporter: Kevin Day <eclipse_kevin>
Component: TPTPAssignee: Jonathan West <jgwest>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: acr, astubbs, ewchan, igor.alelekov, jcayne, jgwest, jimmy.pouliot, jkubasta, mgilman, nmehrega, per.bergland, sluiman, zorkonsnafoo-eclipse
Version: unspecifiedKeywords: plan
Target Milestone: ---Flags: jkubasta: review? (ewchan)
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460
Attachments:
Description Flags
Patched IAC plugin jar
none
Patch for Bug 201819 none

Description Kevin Day CLA 2007-08-30 19:28:44 EDT
Build ID: I20070621-1340

Steps To Reproduce:
Platform Win XP, Sun JVM 1.5_11 

Loaded Eclipse Europa EE from download, then used Europa Discovery to install all TPTP packages.

1. Create a clean workspace
2. Create a simple Hello World project and class with main()
3. Right click and choose Profile As -> Java Application

Workbench crashes with no error message.



More information:
.log file after crash shows:

!ENTRY org.eclipse.tptp.platform.iac.administrator 4 0 2007-08-30 16:09:23.701
!MESSAGE unknown protocol: c
!STACK 0
java.net.MalformedURLException: unknown protocol: c
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at org.eclipse.tptp.platform.iac.administrator.internal.common.AdminUtil.parseFile(AdminUtil.java:79)
	at org.eclipse.tptp.platform.iac.administrator.internal.common.AdminUtil.isConfigurationValid(AdminUtil.java:643)
	at org.eclipse.tptp.platform.iac.administrator.internal.startstop.AutoStartStop.startIAC(AutoStartStop.java:81)
	at org.eclipse.hyades.internal.execution.local.control.NodeImpl.connect(NodeImpl.java:283)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.insecureConnect(BaseConnectUtil.java:369)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:255)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:540)
	at org.eclipse.tptp.platform.common.ui.trace.internal.util.PDCoreUtil.profileConnect(PDCoreUtil.java:827)
	at org.eclipse.tptp.trace.ui.internal.launcher.deleg.application.PIDelegateHelper$JVMVersionDetector.run(PIDelegateHelper.java:473)
	at java.lang.Thread.run(Unknown Source)


If I had to guess, there's a drive letter based path (C:\something) winding up being passed to a URL processor and the colon is throwing things for a loop.

I've seen newsgroup posts referring to this same issue under JVM 1.6 as well - see http://dev.eclipse.org/newslists/news.eclipse.tptp/msg04534.html
Comment 1 Eugene Chan CLA 2007-08-31 10:48:38 EDT
Hi Joanna, This seems like a bug in the IAC configuration file generation/pasing.
Comment 2 Igor Alelekov CLA 2007-09-10 09:54:28 EDT
Hi Samson,
It seems this is the problem of parsing IAC configuration when Eclipse HOME_DIR has spaces.
Substitution of 'fileName' by 'new File(fileName)' in AdminUtil.java, 'builder.parse(fileName)' should resolve the problem.
See Jonathan's comment to the https://bugs.eclipse.org/bugs/show_bug.cgi?id=190699.

Crash of Eclipse is resolved by the #190699

Comment 3 Samson Wai CLA 2007-09-10 13:52:18 EDT
Hi Kevin. Can you tell us your Eclipse install path? Does it contain a space? Thanks.
Comment 4 Kevin Day CLA 2007-09-10 14:05:20 EDT
Yes - definitely contains a space:

C:\Program Files\eclipse

Comment 5 Samson Wai CLA 2007-09-10 15:38:05 EDT
Created attachment 78015 [details]
Patched IAC plugin jar
Comment 6 Samson Wai CLA 2007-09-10 15:41:30 EDT
Hi Kevin. I cannot reproduce the problem on my system using an installation path with spaces.

Anyway I have followed Igor's suggestion and rebuilt the IAC plugin. You can copy this jar into your Eclipse's "plugins" directory and back up the original one. Please let me know if the problem is resolved. Thanks.
Comment 7 Kevin Day CLA 2007-09-10 17:06:41 EDT
The patch prevents the crash (and performance is much better than when I tested with moving the Eclipse app directory to c:\eclipse) - thanks.

However I'm on to a new issue after launch of the profiler.  I'm not sure if you would prefer that I open a new bug for this or not - here's the detail - if you'd prefer that I roll this out to another bug, let me know.

Launch simple HelloWorld app (Profile As->Java Application)
Choose Java Profiling - pre JRE 1.5\Basic Memory Analysis
Click OK

Immediately, I get a 'Problem Occurred' dialog with the following details:

org/eclipse/tptp/platform/iac/administrator/internal/startstop/AutoStartStop


.log is not real helpful, but here's what I'm getting:

!ENTRY org.eclipse.hyades.trace.ui 4 0 2007-09-10 14:02:19.387
!MESSAGE org/eclipse/tptp/platform/iac/administrator/internal/startstop/AutoStartStop


The above happens regardless of the monitors that I have selected.

Am I running into a dependency issue?

Thanks,

- K
Comment 8 Navid Mehregani CLA 2007-09-11 10:41:23 EDT
(In reply to comment #2)
> Hi Samson,
> It seems this is the problem of parsing IAC configuration when Eclipse HOME_DIR
> has spaces.
> Substitution of 'fileName' by 'new File(fileName)' in AdminUtil.java,
> 'builder.parse(fileName)' should resolve the problem.
> See Jonathan's comment to the
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=190699.
> 
> Crash of Eclipse is resolved by the #190699
> 

As far as I remember, config generation shouldn't crash with spaces in the file path.  I specifically tested for this using JUnits (see ConfigGeneratorTest.java).  

If you think there are cases where this JUnit fails to test, please modify it as needed.
Comment 9 Jonathan West CLA 2007-09-11 10:51:55 EDT
(In reply to comment #8)
> (In reply to comment #2)
> > Hi Samson,
> > It seems this is the problem of parsing IAC configuration when Eclipse HOME_DIR
> > has spaces.
> > Substitution of 'fileName' by 'new File(fileName)' in AdminUtil.java,
> > 'builder.parse(fileName)' should resolve the problem.
> > See Jonathan's comment to the
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=190699.
> > 
> > Crash of Eclipse is resolved by the #190699
> > 
> As far as I remember, config generation shouldn't crash with spaces in the file
> path.  I specifically tested for this using JUnits (see
> ConfigGeneratorTest.java).  
> If you think there are cases where this JUnit fails to test, please modify it
> as needed.

Hey Navid... the comment I made applies to the Sun 1.6 JVM on Vista. I tested it on tptpvista.... when I pass a Windows path in, the Malformed URL exception occurs. It does occur on IBM JVM 1.5 w/ Win XP, so this would seem to be an issue where the JVM's implementation of URIs differs. The JUnit tests would therefore only be testing the platform they were run on. 

I've not tested any other JVM/OS combinations, but it would surprise me if it were limited to Vista and Sun 1.6 alone. 
Comment 10 Navid Mehregani CLA 2007-09-12 16:58:57 EDT
(In reply to comment #9)
> 
> Hey Navid... the comment I made applies to the Sun 1.6 JVM on Vista. I tested
> it on tptpvista.... when I pass a Windows path in, the Malformed URL exception
> occurs. It does occur on IBM JVM 1.5 w/ Win XP, so this would seem to be an
> issue where the JVM's implementation of URIs differs. The JUnit tests would
> therefore only be testing the platform they were run on. 
> 
> I've not tested any other JVM/OS combinations, but it would surprise me if it
> were limited to Vista and Sun 1.6 alone. 
> 

I see.  I ran the JUnits on JVM 1.4/1.5 on Windows XP and they both passed.  Not sure about JVM 1.6 on Vista though.  It is possible that a different URI implementation on JVM 1.6 could cause this problem.
Comment 11 Jonathan West CLA 2007-09-12 17:05:35 EDT
That was my read of the situation... and I don't blame you... Java is supposed to be cross-platform! ;)

And, sorry, my previous message should have read "It does not occur on IBM JRE 1.5 w/ Win XP". You are correct here. IBM JRE 1.5 works fine (hence the oddness of this one)
Comment 12 MD CLA 2007-09-20 04:16:32 EDT
I've run into the same original problem, with eclipse in "Program Files" with a space as well. 

The attached patch seems to have resolved this problem, but I've run into the same problem as described in comment 7 and was never unable to run a profiler. It continued to complain about being unable to connect to the IAC. The log contained the following stack trace among other things:

-----------
!ENTRY org.eclipse.ui 4 0 2007-09-20 09:19:38.875
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/tptp/platform/iac/administrator/internal/startstop/AutoStartStop
	at org.eclipse.hyades.internal.execution.local.control.NodeImpl.connect(NodeImpl.java:283)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.insecureConnect(BaseConnectUtil.java:369)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:255)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:540)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:201)
	at org.eclipse.hyades.trace.ui.HyadesUtil.testConnection(HyadesUtil.java:600)
	at org.eclipse.hyades.trace.ui.internal.core.TraceHostUI$1.run(TraceHostUI.java:511)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.hyades.trace.ui.internal.core.TraceHostUI.testConnection(TraceHostUI.java:494)
	at org.eclipse.hyades.trace.ui.internal.core.TraceHostUI.widgetSelected(TraceHostUI.java:704)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
-----------

Additionally, the update system seems to have been broken by the patch (or mishandling of it on my part). I've suddenly lost all default update sites and the list of packages under Software Updates -> Manage Configuration became empty. Note that what I did was just replacing the jar file in eclipse's "plugin" subdir (deleting the version with another date in the name and putting in this version instead). Maybe this is where I went wrong.

After I reverted to the original JAR file, the update center became operational again and the missing update sites were back.
Comment 13 Asaf Yaffe CLA 2007-10-02 09:01:06 EDT
*** Bug 203618 has been marked as a duplicate of this bug. ***
Comment 14 Kevin Day CLA 2007-10-02 11:17:19 EDT
I can confirm that this patch breaks the update system.

Also, we still can't actually get a profile to work.  Samson - as assignee on this issue, do you want me to open another bug per comment #7 and #12, or do you want us to handle that in the current bug?
Comment 15 Jim Hanlon CLA 2007-10-09 10:53:16 EDT
I am seeing this same problem on Windows XP / SP2 fully update system running Sun JDK1.6.0_02. Eclipse package is latest "Europa Fall" install with all TPTP modules added though update. Eclipse is installed into 'C:\Program Files\Eclipse\eclipse-europa'.
Comment 16 Navid Mehregani CLA 2007-10-11 10:53:35 EDT
(In reply to comment #15)
> I am seeing this same problem on Windows XP / SP2 fully update system running
> Sun JDK1.6.0_02. Eclipse package is latest "Europa Fall" install with all TPTP
> modules added though update. Eclipse is installed into 'C:\Program
> Files\Eclipse\eclipse-europa'.
> 

I thought TPTP doesn't currently support JDK 1.6.  Has our support statement for JDK 1.6 changed?
Comment 17 jkubasta CLA 2007-10-24 18:41:09 EDT
Retargeting to 4.5 where Java 1.6 will be supported
Comment 18 Paul Slauenwhite CLA 2007-12-19 07:45:33 EST
If this Bugzilla is planed to be completed in 4.5, please add the plan keyword.  Otherwise, please target to future.

In addition, if this Bugzilla is committed to be completed in 4.5, please change the priority to P1.
Comment 19 KP CLA 2007-12-28 08:15:48 EST
(In reply to comment #15)
> I am seeing this same problem on Windows XP / SP2 fully update system running
> Sun JDK1.6.0_02. Eclipse package is latest "Europa Fall" install with all TPTP
> modules added though update. Eclipse is installed into 'C:\Program
> Files\Eclipse\eclipse-europa'.
> 

Same problem here indeed... almost same config (albeit eclipse is installed in "c:\Program Files\eclipse". Shame any possible support issues with Java6 aren't better documented...
Comment 20 Harm Sluiman CLA 2008-01-11 08:22:10 EST
This seems like more than a "normal" problem and even though the fix appears scheduled to be integrated in the next two weeks, I wouldn't want a last moment prioritization to let this slit any further.
Comment 21 Jonathan West CLA 2008-01-11 10:21:01 EST
Created attachment 86675 [details]
Patch for Bug 201819
Comment 22 jkubasta CLA 2008-01-11 11:37:04 EST
Eugene, would you please review the patch?
Comment 23 Igor Alelekov CLA 2008-01-11 12:31:27 EST
(In reply to comment #22)
> Eugene, would you please review the patch?

Joanna, IMHO the patch is good.
Comment 24 Antony Stubbs CLA 2008-01-21 21:03:36 EST
I also have the same crash problem. I have jdk1.6 installed, but my java home is pointing to 1.5. My eclipse is installed in "C:\eclipse 3.3 jee"
I also got the following error:
!ENTRY org.eclipse.tptp.platform.iac.administrator 4 0 2008-01-22 14:35:03.046
!MESSAGE unknown protocol: c
!STACK 0
java.net.MalformedURLException: unknown protocol: c
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at org.eclipse.tptp.platform.iac.administrator.internal.common.AdminUtil.parseFile(AdminUtil.java:79)
	at org.eclipse.tptp.platform.iac.administrator.internal.common.AdminUtil.isConfigurationValid(AdminUtil.java:643)
	at org.eclipse.tptp.platform.iac.administrator.internal.startstop.AutoStartStop.startIAC(AutoStartStop.java:81)
	at org.eclipse.hyades.internal.execution.local.control.NodeImpl.connect(NodeImpl.java:283)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.insecureConnect(BaseConnectUtil.java:369)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:255)
	at org.eclipse.hyades.security.internal.util.BaseConnectUtil.connect(BaseConnectUtil.java:540)
	at org.eclipse.tptp.platform.common.ui.trace.internal.util.PDCoreUtil.profileConnect(PDCoreUtil.java:827)
	at org.eclipse.tptp.trace.ui.internal.launcher.deleg.application.PIDelegateHelper$JVMVersionDetector.run(PIDelegateHelper.java:474)
	at java.lang.Thread.run(Unknown Source)


Changing eclipse install path to "C:\eclipse3.3jee" avoids the crash.
Comment 25 Joel Cayne CLA 2008-01-29 10:19:38 EST
Patch "Patch for Bug 201819" checked into HEAD.
Comment 26 jkubasta CLA 2008-01-29 10:31:30 EST
Resolving as patch is committed
Comment 27 Eugene Chan CLA 2008-03-13 09:37:29 EDT
*** Bug 220340 has been marked as a duplicate of this bug. ***
Comment 28 Paul Slauenwhite CLA 2009-06-30 13:48:12 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 29 Paul Slauenwhite CLA 2009-06-30 13:50:38 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.