facebook

java.lang.IllegalArgumentException: URI scheme is not file

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #310832 Reply

    t.costermans
    Member

    I have created a very simple xml file:
    <?xml version=’1.0′ encoding=’UTF-8′?>
    <dataset xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:noNamespaceSchemaLocation=”file://fiso/dataset.xsd”>

    </dataset>

    I added an XSD file to the xml file for validation and code completion.

    I configured the following setting In MyEclipse> Window> preferences > MyEclipse Enterprise Workbench> Files and Editors > XML > XML catalog > User specified Entries
    Location: tarfacSVN/db/xsd/dataset.xsd
    URI: platform:/resource/tarfacSVN/db/xsd/dataset.xsd
    Key Type: Schema Location
    Key: file://fiso/dataset.xsd

    Every time I start to type something in the xml file follwing error is visible in the error log.
    From time to time I also receive a very annoying modal dialog with the same error.

    java.lang.IllegalArgumentException: URI scheme is not "file"
        at java.io.File.<init>(File.java:366)
        at com.genuitec.eclipse.j2eedt.uriresolver.SystemIDResolver.resolve(Unknown Source)
        at org.eclipse.wst.common.uriresolver.internal.ExtensibleURIResolver.resolve(ExtensibleURIResolver.java:68)
        at org.eclipse.wst.xml.ui.internal.hyperlink.XMLHyperlinkDetector.resolveURI(XMLHyperlinkDetector.java:555)
        at org.eclipse.wst.xml.ui.internal.hyperlink.XMLHyperlinkDetector.getURIString(XMLHyperlinkDetector.java:450)
        at org.eclipse.wst.xml.ui.internal.hyperlink.XMLHyperlinkDetector.detectHyperlinks(XMLHyperlinkDetector.java:121)
        at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:80)
        at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:265)
        at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:466)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:199)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
    

    Am I doing something wrong or is this a bug?
    Another co-worker has MyEclipse 5.1.1 installed and the XSD schema validation and code completion works for the provided file. He has configured the same settings as I have.

    Installation details:

    *** Date: 
    dinsdag 24 augustus 2010 13.08 u. CEST
    
    ** System properties:
    OS=WindowsXP
    OS version=5.1.0
    Java version=1.6.0_13
    
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 7.5
    Build id: 7.5-20090609
    
    
    *** Eclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 7.5
    Build id: 7.5-20090609
    
    
    
    
    Eclipse Plug-in Development Environment
    
    Version: 3.4.2.R342_v20090122-7T7U1E9imVKz-A8Vz-p_jRS
    Build id: M20080703-0800
    
    
    Eclipse Platform
    
    Version: 3.4.2.R342_v20090122-9I96EiWElHi8lheoJKJIvhM3JfVsYbRrgVIWL
    Build id: M20090211-1700
    
    
    Eclipse Graphical Editing Framework GEF
    
    Version: 3.4.2.v20090218-1145-67728084A56B4I233613552
    Build id: 200809101400
    
    
    Eclipse RCP
    
    Version: 3.4.200.R342_v20090122-989JESTEbig-SVaL8UJHcYBr4A63
    Build id: M20090211-1700
    
    
    Eclipse Java Development Tools
    
    Version: 3.4.2.r342_v20081217-7o7tEAoEEDWEm5HTrKn-svO4BbDI
    Build id: M20090211-1700
    
    
    
    
    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\Genuitec\MyEclipse 7.1\myeclipse.exe
    -name
    Myeclipse
    --launcher.library
    C:\Program Files\Genuitec\MyEclipse 7.1\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
    -startup
    C:\Program Files\Genuitec\MyEclipse 7.1\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
    -exitdata
    476c_40
    -clean
    -configuration
    configuration
    -vm
    C:\Program Files\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin\javaw.exe
    #310865 Reply

    t.costermans,
    I could not replicate this at my end. Can you list out the steps in detail to replicate your issue?
    Also, can you send us the screen shots showing us how you have set up your xml catalog?
    This will help us replicate the issue internally.

    #310939 Reply

    t.costermans
    Member

    Thx for the reply.

    Here are some screenshots.

    Screenshot of preference page:
    http://picasaweb.google.com/lh/photo/EFdO5zzx5EjT9soH5_RJVg?feat=directlink
    Screenshot of error message dialog :
    http://picasaweb.google.com/lh/photo/C_ksACcPbgZHJxRhpSovNg?feat=directlink
    I receive the error dialog after clicking into the file.

    Screenshots of error log viewer:
    http://picasaweb.google.com/lh/photo/2lnCgWjLUw5lECsRUl08cw?feat=directlink
    http://picasaweb.google.com/lh/photo/fd6DBADXFEV526raycgkiw?feat=directlink

    Can you list out the steps in detail to replicate your issue?
    1) After loading the source code in a new Eclipse workspace, I configure the XML catalog as shown in the screenshot (screenshot preference page)
    2) I create a new empty xml file. (Basic template -> create XML file from an XML template -> Use XML template -> Finish)
    3) The result is:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    4) I add manually

    <dataset xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:noNamespaceSchemaLocation=”file://fiso/dataset.xsd”>

    </dataset>

    After adding the code highlighted in bold I receive the error dialog.

    #311069 Reply

    Brian Fernandes
    Moderator

    t.costermans,

    I have a question -what is the file system path to the project in which you were trying this? I ask because there seems to be an oddity here, when we tried in a workspace which had spaces in the path, we could not reproduce the error, but could if the workspace had no spaces and wanted to know if the same was true for you as well.

    We were able to replicate this internally with the details you provided and I have filed a bug report for further investigation. We will try to fix this in the 9.0M1 release due mid month. Sorry for the inconvenience caused.

    #311139 Reply

    t.costermans
    Member

    Support-Brian,

    The path to the project is ‘C:\dev\eclipse\workspace\tarfacSVN’.

    Thx for identifying the bug. I will wait on the 9.0M1 release.

    #311218 Reply

    Brian Fernandes
    Moderator

    Tim,

    While investigating this issue, our developers noted that a URI like file://fiso/dataset.xsd is likely incorrect. In this URI, fiso is the “host” and Java will not accept it.

    URI uri = new URI("file://fiso/dataset.xsd");
    new File(uri);

    will throw an IllegalArgument exception stating “URI has an authority component”. These are not accepted for “file://” URIs – see constructor for java.io.File(URI).

    file:///fifo/dataset.xsd

    is accepted just fine though. If you use this URI (and map it in the catalog) it works fine and you do get auto completion suggestions from the referenced XSD.

    I’m wondering if this is what you actually needed. If not, can you explain what “fiso” in file://fiso/dataset.xsd references?

    #311226 Reply

    t.costermans
    Member

    Hi Support-Brian,

    Thx for point out the mistake. We have several files in our workspace containing the mistake.
    If I add an extra slash to the URI the code completion works.

    If you create a new xml file by copy paste a missing forward slash is overlooked pretty easy.

    #311227 Reply

    Brian Fernandes
    Moderator

    It sure is overlooked easily, I know from experience. Glad it’s working now, thanks for reporting back.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: java.lang.IllegalArgumentException: URI scheme is not file

You must be logged in to post in the forum log in