Skip to content

error "URI is not hierarchical" + some 1st time user feedback #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
barrystaes opened this issue Sep 3, 2015 · 11 comments
Closed

error "URI is not hierarchical" + some 1st time user feedback #301

barrystaes opened this issue Sep 3, 2015 · 11 comments

Comments

@barrystaes
Copy link

Some feedback, and a problem i encountered while trying the plugin (and website with docs) for the first time.
(on Linux 32bit with eclipse Kepler already installed)

Now obviously its (more than) likely that these problems are just me and not the software. But sharing my experience might help improve the docs or in this case even result in relevant NIGHTLY feedback info.

Documentation on first use
Website docs have way to many short pages, please combine them because retrieving one sentence of documentation at a time gets tiresome.. i just want to scroll through and search the page text. After a lot of headscratching i found out that what i'd expect (given the menu options) to be at http://eclipse.baeyens.it/how_to.shtml#/c was instead on page http://eclipse.baeyens.it/how_to.shtml#/c

V2 install URL doesnt work
I would have never found Help > Install Software to install a plugin, and ultimately had to go for the NIGHTLY build, because the normal V2 wouldn't load anything within a few minutes or so (its hard to see if its busy or done)

Error when just making a new project
Creating a new project resulted seemed to work, but Finish gives a URI is not hierarchical error dialog. I have no idea how to troubleshoot that.. but /workspace/.metadata/.log says:
(Update: I got the same error when trying the latest V2 package for Win32 on Win64, see bottom)

!ENTRY it.baeyens.arduino.core 1 0 2015-09-04 01:27:46.397
!MESSAGE The folder /home/barry/.arduino15/packages does not contain any files.

And after this, clicking Finish again results in:

!ENTRY it.baeyens.core 4 0 2015-09-04 01:16:35.214
!MESSAGE Failed to create project Test6
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource '/Test6' already exists.
    at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:320)
    at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:307)
    at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:52)
    at org.eclipse.core.internal.resources.Project.create(Project.java:287)
    at org.eclipse.core.internal.resources.Project.create(Project.java:269)
    at it.baeyens.arduino.ui.NewArduinoSketchWizard.createProject(NewArduinoSketchWizard.java:228)
    at it.baeyens.arduino.ui.NewArduinoSketchWizard$2.execute(NewArduinoSketchWizard.java:182)
    at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
    at it.baeyens.arduino.ui.NewArduinoSketchWizard.performFinish(NewArduinoSketchWizard.java:189)
    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:628)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
    at org.eclipse.jface.window.Window.open(Window.java:802)
    at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    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:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
!SUBENTRY 1 org.eclipse.core.resources 4 374 2015-09-04 01:16:35.217
!MESSAGE Resource '/Test6' already exists.

Importing existing project
I'm going to try opening/importing an existing Arduino IDE project, but i wouldn't know where to start. I'd rather have the docs state that i cant. I do see "Create sketch" in the docs though, i'd expect it to be there.

So right now its not working for me :(
Update:

I ultimately descided to install the V2 product version (eclipse + plugin) and had some trouble getting serial communications going, (NullPointerException since Port was wrong, the dropdown being empty and the documentation mentioning i should not enter port confused me here)
and for some reason the Arduino "upload" toolbar buttons did not show up until i restarted a few times. But now it works, i was able to program my Arduino Due.

Its not clear to me how to enable the "build before upload" option mentioned briefly in the docs. Isn't "automatically rebuild" not enough?

Download links
Since rebuilding so slow on my laptop, i'm going
At http://eclipse.baeyens.it/download.php i was missing the Windows 64bit v2.3 download. If left out on purpose, please indicate whether to use the win32 v2.3 or a win64 nightly build.
I tried Win32 v2.3 and ultimately this resulted in the same error as i had on Linux with NIGHTLY: creating a new project would give me a "URI not hierarchical" error and no project to work with.

@jantje
Copy link
Member

jantje commented Sep 4, 2015

Hi
Thanks for the feedback. I'm sorry you had so much trouble getting things to work. You are right that when you know how to do things it is easy but when you are new it is so easy to get lost in the forest.
Being new to eclipse it is hard to understand what is going on.
Anyways. What I understand from your comments is
1: It is not always clear what is in the nightly and what is in the product.
2: You prefer long html pages to the short versions.
3: You got an error "URI is not hierarchical" in the nightly which I have never seen before.
4: It is not always clear where to find the information.
5: Compilation is slow on your laptop.

I accept all there remarks but there is little I can/want to do about it. Part of it is related to open software part of it is related to eclipse and part of it is related to the shortcommings of the arduino eclipse plugin community part of it is related to mistakes made in the past.

Practically I can not advice you on 32bit versus 64 bit on windows as I mainly run on Linux. Linux does not have the compatibility mode 32bit running on 64 bit os. It is unclear to me why you switched from Linux to windows in your description.

V2 windows 32 bit got lost in the mist of times. It was not a decision, it just happened.

I'll try to see whether I can reproduce the "URI is not hierarchical" error.

The problem with clicking finish again is "normal". Basically the project was created and I prefer having a wonky project where "something went wrong" to deleting the project when something goes wrong making it impossible to create a project when the "something goes wrong" is consistent.

V2 is getting really old. Basically due to lack of sponsoring it is hard to motivate me to make new versions. Basically right now the nightly is the way to go. I made a patreon account so it is visible what I get for all the work I put in the community. You will bump into it one day.

"build before upload", " the documentation mentioning i should not enter port confused me here" are both nightly only.

importing is a cdt and eclipse functionality (as such documented partly in the cdt documentation and partly in the eclipse documentation). It can be done in many ways. My preferred way is drag and drop. Note that you can link or copy. The chose is up to you depending on your setup.

!ENTRY it.baeyens.arduino.core 1 0 2015-09-04 01:27:46.397
!MESSAGE The folder /home/barry/.arduino15/packages does not contain any files.

means you have no packages installed on your system. Which is weird as you are talking about due which needs a package. It is a simple warning and normal if indeed no packages have been installed. It may be related to the "URI is not hierarchical" problem. Note that the boards manager support is brand new.

Best regards
Jantje

@barrystaes
Copy link
Author

Thanks for the quick response on my feedback.
That leaves the error i still get. Some new info on that:

URI is not hierarchical
I've seen the "URI is not hierarchical" error on both Linux and Windows. Latest Arduino IDE (!) with your NIGHTLY and V2.
Linux since works, but i dont remember how/why exactly, but i think because i used the V2 product download there.
As a last resort for Windows i just now tried the latest nightly http://eclipse.baeyens.it/download/product/win64.2015-09-03_02-06-01.tar.gz with the latest but pre-1.5.6 Arduino IDE http://arduino.cc/download.php?f=/arduino-1.5.5-r2-windows.zip and again, consistently the same error. Its Windows 10, if that matters. I noticed that a few times (not always) eclipse forgot the Arduino location. Running eclipse as administrater did not help.

V2 vs NIGHTLY
So V2 is deprecated, and NIGHTLY can be regarded as stable?
I suggest to at least mention that on these pages on V2, saving people new to this a lot of trouble;

Also, these URLs illustrate how the (otherwise rather simple) stable install info is scattered over several pages.

Why i tried Windows
At one point i tried Windows because i couldnt get it to work on Linux, but to no avail. Later when i got Linux working using the V2 product, i tried Windows again hoping that the faster hardware would help ease the frustration i ended up with. But again to no avail, so i'm working on my puny Linux laptop again.

@barrystaes barrystaes changed the title 1st time user feedback "URI is not hierarchical" error + some 1st time user feedback Sep 5, 2015
@barrystaes barrystaes changed the title "URI is not hierarchical" error + some 1st time user feedback error "URI is not hierarchical" + some 1st time user feedback Sep 5, 2015
@barrystaes
Copy link
Author

Ah, settings are stored in Eclipse workspace
About eclipse sometimes forgetting the Arduino path - i've now seen this occur on Linux also, and now think its because its stored in the workspace? Turns out it forgets every setting.. including the perspective, file types, and even down to the editor font size. I had no idea that eclipse works that way, sorry!

I routinely tried a new workspace because the docs said somewhere that i should not uncheck the "use default location" option when creating a new project, since its not supported by the plugin. Is this still relevant, or can it now create/use projects outside of the workspace?

I am still trying to create a new eclipse project but with my own (existing) source files..

@barrystaes
Copy link
Author

I put this out here so other new users can benefit from it. I'd appreciate a simple "open project" option very much, but i take thats the turf of eclipse:

Opening existing project
Another thing that i could not wrap my head around, is how to open an existing project in Eclipse. It turns out they can be imported, by choosing File > Import Files > General > Existing Projects

But all in all this tries moving your project inside the workspace folder, so you're not actually opening the other project, but creating a copy in a different location. To save things in VCS you'll have to copy files, or put a workspace folder inside your VCS apparently.

@jantje
Copy link
Member

jantje commented Sep 5, 2015

V2 vs NIGHTLY
So V2 is deprecated, and NIGHTLY can be regarded as stable?
I suggest to at least mention that on these pages on V2, saving people new to this a lot of trouble;

Currently the nightly is pretty stable as I'm working towards a new release. http://forum.arduino.cc/index.php?topic=79595.msg2366886#msg2366886. So it is not a general statement.
As you experienced there are still "unknown" problems.

Ah, settings are stored in Eclipse workspace
About eclipse sometimes forgetting the Arduino path - i've now seen this occur on Linux also, and now think its because its stored in the workspace? Turns out it forgets every setting.. including the perspective, file types, and even down to the editor font size. I had no idea that eclipse works that way, sorry!

Yes and that is intentionally. This allows to have a workspace for each arduino ide version you still use. Otherwise multiple eclipse installations would be needed.

"use default location"

You can uncheck it in the nightly. Though I do not really see why you would want to do so.
With the nightly you can create/use projects outside of the workspace. With last stable you can not.

But all in all this tries moving your project inside the workspace folder, so you're not actually opening the other project, but creating a copy in a different location. To save things in VCS you'll have to copy files, or put a workspace folder inside your VCS apparently.

Somewhere in the prosess you can say "link to files".

@jantje
Copy link
Member

jantje commented Sep 6, 2015

I removed the folder /home/jantje/.arduino15 from my system and created a sketch and all went fine.
I currently see no way how to reproduce this issue.
Can you try to get traces or so on this issue?

@barrystaes
Copy link
Author

Ok. I know of no log files expect the one with errors i quoted, but i'd like to try and provide a trace. :)

To trace this plugin error, do i need to build it myself from source, or can i just enable something in my current eclipse installation?

@jantje
Copy link
Member

jantje commented Sep 6, 2015

Normally errors come with a trace and if there is a trace it is also logged in the error log
See http://eclipse.baeyens.it/faq.shtml#/troubleshooting "How can I find out more of the problem at hand?"
You could try debugging. you can attach a debugger to a running eclipse but it is lots easier just to compile and debug. See the readme file on this page on how to do so https://github.com/jantje/arduino-eclipse-plugin
I have tried several scenario's to reproduce but I only get #302 which will need fixing before the release.

@jantje
Copy link
Member

jantje commented Sep 7, 2015

I found this is related to #302
Basically it works fin in a development/debug environment but not when the plugin is deployed as a jar file. I do not understand why the error is inconsistent "URI is not hierarchical" versus "setup corrupt"
I think I will disable this code for now and think for a good solution.

jantje added a commit that referenced this issue Sep 7, 2015
@jantje jantje mentioned this issue Sep 8, 2015
@barrystaes
Copy link
Author

Sorry for the late reply. I wanted to say i'll try to look into this wednesday, but it appears you've already cracked it! 👍 I no longer have a working Due at hand though, i let the magic smoke escape. ⚡ 💨 😱

If you'd like me to test the plugin by then, do let me know!

@jantje
Copy link
Member

jantje commented Sep 14, 2015

@jantje jantje closed this as completed Sep 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants