Access is denied exception when Terramenta 1.3.0 is run from within NetBeans 7.4
Issue
An exception is thrown when "running" Terramenta from within NetBeans. The compiled app runs fine outside of NetBeans, but within NetBeans I get the following error during the startup:
INFO [org.netbeans.core.netigso.Netigso]: Can't process ..\..\..\terramenta-time\target\classes
java.io.FileNotFoundException: ..\..\..\terramenta-time\target\classes (Access is denied)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:117)
[catch] at org.netbeans.core.netigso.Netigso.findRecursivePkgs(Netigso.java:759)
Workaround
Per CH: It has to do with file permissions while netbeans has a module opened as a project. If you remove the module from the netbeans project list that error goes away. It’s not consistent though because sometimes I can leave them open without issue, so it must be a magic combination of events that triggers the issue.
Comments (4)
-
reporter -
unfortunately i cant use that approach since I use osgi bundles to avoid the need to create a nbm wrapper for 3rd party tools that will be used by multiple modules. Really what needs to happen is the NetBeans IDE needs to relinquish control of a bundle when running a platform app.
Sadly not fixable by the Terramenta team :-(
-
- changed status to on hold
Not much can be done at this point. I actually think the status should be 'wontfix' but i want to revisit it again before declaring that.
-
As I had the same issue with another project and stumbled across this issue: disabling the "compile on save" option solves the problem, too
- Log in to comment
Another workaround
Disable OSGI in Terramenta Maven project. Edit the pom.xml and set useOSGiDependencies to false