eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.96k stars 1.19k forks source link

File browser encounters "root ERROR Error when loading drives." #13232

Closed bfitzpat closed 5 years ago

bfitzpat commented 5 years ago

Description

We are attempting to add a new plugin to the Che extension registry (see https://github.com/eclipse/che-plugin-registry/issues/120) and ran into a strange error with our extension. We use a file dialog -- vscode.window.showOpenDialog (see https://github.com/camel-tooling/vscode-wsdl2rest/blob/5851297b8459d1ace95a22a6657b3a7b67e12736/src/extension.ts#L105) to retrieve the path to a local wsdl file in the workspace. When the dialog comes up, we see this in the console: ``` root ERROR Error when loading drives. PKK+/p

I am using a branch to test the new plugin entry. I add to the attributes:

  "attributes": {
    "plugins": "che-machine-exec-plugin:0.0.1,https://raw.githubusercontent.com/bfitzpat/che-plugin-registry/120-AddVSCodeWSDL2RestVSCodeExtension/plugins/camel-tooling.vscode-wsdl2rest:0.0.7",

Then, in the che.openshift.io instance, I am invoking the wsdl2rest activity with a local wsdl in the workspace (F1, type "wsdl2rest" and use the local file option).

image

The file dialog appears, but clicking the Open WSDL File button does nothing. You have to cancel out by hitting the x in the upper right.

image

Looking in the Chrome debug console, I see the ERROR while loading drives problem.

If we cancel out of the file dialog, we can continue with the extension and work all the way through to the point where we invoke the wsdl2rest utility under the covers. We see this as the output... It makes sense, because the value of the file url is coming back as undefined from the file browse dialog.

Executing Wsdl2Rest...
Retrieving document at 'file:/home/theia/undefined'.

Error executing command
javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'file:/home/theia/undefined'.: java.io.FileNotFoundException: This file was not found: file:/home/theia/undefined
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2291)
    at org.jboss.fuse.wsdl2rest.impl.WSDLProcessorImpl.process(WSDLProcessorImpl.java:98)
    at org.jboss.fuse.wsdl2rest.impl.Wsdl2Rest.process(Wsdl2Rest.java:79)
    at org.jboss.fuse.wsdl2rest.impl.Main.mainInternal(Main.java:60)
    at org.jboss.fuse.wsdl2rest.impl.Main.main(Main.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.io.FileNotFoundException: This file was not found: file:/home/theia/undefined
    at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(StringUtils.java:173)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2270)
    ... 12 more

Process finished. Return code 1.

OS and version:

Chrome browser on Windows, accessing Che instance on che.openshift.io

Diagnostics:

bfitzpat commented 5 years ago

Shifted Che plugin PR here - https://github.com/eclipse/che-plugin-registry/pull/136

bfitzpat commented 5 years ago

Testing today with the v3 version and the latest theia used on che.openshift.io, this is no longer an issue. I'm going to go ahead and close it