Access is denied exception when Terramenta 1.3.0 is run from within NetBeans 7.4

Issue #10 on hold
Bruce Schubert created an issue

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)

  1. Bruce Schubert reporter

    Another workaround

    Disable OSGI in Terramenta Maven project. Edit the pom.xml and set useOSGiDependencies to false

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>nbm-maven-plugin</artifactId>
                        <version>${nbm.plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <useOSGiDependencies>false</useOSGiDependencies>
                            <brandingToken>${brandingToken}</brandingToken>
                            <cluster>${brandingToken}</cluster>
                        </configuration>
                    </plugin>
    
  2. Chris Heidt

    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 :-(

  3. Chris Heidt

    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.

  4. yoadey

    As I had the same issue with another project and stumbled across this issue: disabling the "compile on save" option solves the problem, too

  5. Log in to comment