Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#60664 - netbeans 9.0-3 dosn't allow to create projects nor installing plugins

Attached to Project: Community Packages
Opened by Pablo Andres Dealbera (pablo1107) - Thursday, 01 November 2018, 01:51 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 18 November 2018, 05:11 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
After upgrading from netbeans 9.0-1 all plugins I had installed disappear and I couldn't create new projects (throw exception). When installing plugins and restarting the IDE, the IDE doesn't start on it's own and when I lauch it manually it didn't install any plugin.

Downgrade to netbeans 9.0-1 using pacman -U solved it to me. But I want to report if anyone is able to find out what's going on.

Additional info:
* package version(s)
* config and/or log files etc.

Line notified by netbeans as an error after trying to create a new project:
superclass access check failed: class org.netbeans.lib.nbjavac.services.NBMessager (in unnamed module @0x18970180) cannot access class com.sun.tools.javadoc.main.Messager (in module jdk.javadoc) because module jdk.javadoc does not export com.sun.tools.javadoc.main to unnamed module @0x18970180


Steps to reproduce:
Install netbeans, run, nothing else. I deleted all config files and /usr/etc/netbeans.* files and reinstalled from fresh and still same issue.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 18 November 2018, 05:11 GMT
Reason for closing:  Fixed
Comment by Santiago Torres (sangy) - Thursday, 01 November 2018, 15:43 GMT
Hi Pablo. Sorry to hear about this issue. Do you mind sharing your version of openjdk?
Comment by Pablo Andres Dealbera (pablo1107) - Thursday, 01 November 2018, 17:26 GMT
Don't worry about it. As I said in the report, the problem is solved for me with 9.0-1, but I did the report in the case of another user encountering the same issue as me.

The version of openjdk I have installed is jdk10-openjdk 10.0.2.u13-1.
Comment by Santiago Torres (sangy) - Thursday, 01 November 2018, 20:07 GMT
Ok, let me try to reproduce. I don't think there should've been any changes from -1 to -3 to break this way, but I'll dig into it and try to issue a fix asap.

Thanks for reporting!
Comment by Pablo Andres Dealbera (pablo1107) - Thursday, 01 November 2018, 20:17 GMT
Thank you for checking it out. Just FYI I use Arch without any DE, just AwesomeWM. The weirdest thing is when it messes up the home folder when it launched as if the working directory was .netbeans folder.

The only thing I found so far is this post in SO.
https://stackoverflow.com/questions/52918925/problem-with-netbeans-9-0-on-manjaro-linux

Which point to anothee bug reported here:
https://bugs.archlinux.org/task/60533

Also in that post they hint as maybe is a bad path variables that runs netbeans in a wrong folder. So maybe is my system only? If I can give you some logs let me know and I upload them.
Comment by Srđan Tot (srki_82) - Friday, 02 November 2018, 22:29 GMT
I have the same problem. It may be linked to etc files path change. In 9.0-1 they are copied to /usr/etc/ but on 9.0-2 (the same bug is present in 9.0-2 and 9.0-3) all etc files are copied to /usr/lib/netbeans/etc/.
Comment by Josh Bowman (jkb) - Sunday, 04 November 2018, 04:15 GMT
I also think the moved etc files are related. With a fresh install of 9.0-3 on a system that has never had netbeans installed, when I first run /usr/bin/netbeans, it doesn't create the user directory at ~/.netbeans/9.0. If I create that myself, it is ignored. (I'm also running without a DE; just i3.)

The startup script at /usr/bin/netbeans seems to try to follow symlinks to find the $basedir where it will find the packaged etc/netbeans.conf. But /usr/bin/netbeans is not a symlink, so $basedir is calculated as /usr. And 9.0-3 has no /usr/etc/netbeans.conf. Since that is not loaded, the ${netbeans_default_userdir} is not set.

For now, I can work around this by editing /usr/bin/netbeans to set the correct $basedir. At line 41, after the code that finds basedir, I added:
basedir=/usr/lib/netbeans

Things seem to be working better with this. I can now add a custom ~/.netbeans/9.0/etc/netbeans.conf to specify startup options in the netbeans_default_options variable.
Comment by Pablo Andres Dealbera (pablo1107) - Sunday, 04 November 2018, 07:31 GMT
Thanks for the in depth explanation. Tomorrow I'll try to update the package and apply that workaround. Any idea how to notify this to the developers or the maintainer of the package? This only occurs on Arch based distros?
Comment by Santiago Torres (sangy) - Sunday, 04 November 2018, 16:11 GMT
Hi,

I've been trying to reproduce the issue but I can't seem to make it happen. This was on two machines, one with Xmonad and another one with Gnome. Let me try to install a minimal setup with a clean installation of the package to see what it may be.

Either way, the comments you guys are raising make sense, as netbeans 9 has been incredibly tricky with the way it computes paths to its own support files.

Sorry this is taking long, please rest assured I'm trying to provide a solution asap :)

Thanks,
-Santiago.
Comment by Santiago Torres (sangy) - Sunday, 04 November 2018, 21:33 GMT
Hi,

I've been trying to reproduce to no avail, however I think that moving the files back to /usr/etc/* works on my side too, so that's probably for the best. Could you try the version (-4) that'll be released to testing soon and tell me if it works?

Thanks!
Comment by Srđan Tot (srki_82) - Monday, 05 November 2018, 20:10 GMT
Works like a charm :)
Comment by Shelby Hendrickx (shleppy) - Tuesday, 06 November 2018, 14:57 GMT
Hi,

I also have the same problem, and the fix seems to work for me.
I have another issue though, where netbeans seems to install/unpack directly to ~/.
I don't believe this is intentional.

Thanks
Comment by Pablo Andres Dealbera (pablo1107) - Tuesday, 06 November 2018, 15:12 GMT
No, is not intentional. As Josh described early it's because /use/bin/netbeans try to follow symlinks and failed. If you go to line 41 of /usr/bin/netbeans and add a basedir=/usr/lib/netbeans it works as intended and the config files go to ~/.netbeans as it should.
Comment by Santiago Torres (sangy) - Tuesday, 06 November 2018, 16:40 GMT
Ok,

I'll move this to community now. The other fix seems to be an issue with the way upstream handles the basedir. I can backport the patch, but I'll probably work with them to have a more sensible approach to the startup script.
Comment by Srđan Tot (srki_82) - Tuesday, 06 November 2018, 16:43 GMT
9.0-4 solves both problems (creating projects and config directory lication). If you happen to start 9.0-2 or 9.0-3 just delete netbeans folders from your home directory. As of 9.0-4 all config files are properly saved to ~/.netbeans directory.

Loading...