This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197461 - write error during "Apply code changes" build from JavaSE Ant
Summary: write error during "Apply code changes" build from JavaSE Ant
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 18:38 UTC by err
Modified: 2011-04-20 08:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description err 2011-04-05 18:38:25 UTC
Pressing the button again and it works ok. This was happening consistently.
I have the file in question, GetChar.java in *two* editor windows; don't know if that matters. Restarted IDE and problem went away.

... while writing ....GetChar: C:...\build\classes\...\GetChar.class (Access is denied)
public class GetChar {

Not sure if this is a problem with compile-build or debugger.


Complete output:

init:
Deleting: C:\a\src\jvi-dev\nbvi\nbvi-suite\jvi-project\build\built-jar.properties
deps-jar:
Updating property file: C:\a\src\jvi-dev\nbvi\nbvi-suite\jvi-project\build\built-jar.properties
Compiling 1 source file to C:\a\src\jvi-dev\nbvi\nbvi-suite\jvi-project\build\classes
Note: com.raelity.jvi.core.GetChar$Init to be registered as a com.raelity.jvi.ViInitialization under jVi/init
C:\a\src\jvi-dev\jvi\src\com\raelity\jvi\core\GetChar.java:49: error while writing com.raelity.jvi.core.GetChar: C:\a\src\jvi-dev\nbvi\nbvi-suite\jvi-project\build\classes\com\raelity\jvi\core\GetChar.class (Access is denied)
public class GetChar {
1 error
C:\a\src\jvi-dev\nbvi\nbvi-suite\jvi-project\nbproject\build-impl.xml:626: The following error occurred while executing this line:
C:\a\src\jvi-dev\nbvi\nbvi-suite\jvi-project\nbproject\build-impl.xml:245: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 3 seconds)


Product Version: NetBeans Platform 7.0 RC1 (Build 201103280000)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Windows XP version 5.1 running on x86; Cp1252; en_US (test)
Userdir: C:\Documents and Settings\erra\.netbeans\7.0rc1
Comment 1 err 2011-04-05 19:02:50 UTC
To be clear, jvi-project is a POJ project not a module. (it gets "wrapped")
Comment 2 Tomas Zezula 2011-04-11 08:52:46 UTC
The javac is not able to replace the existing "com.raelity.jvi.core.GetChar" on Windows. Someone is holding the handle. Probably nothing to do with java/project which just starts the build script. Can you try to find out who holds the handle? The Process Monitor http://technet.microsoft.com/en-us/sysinternals/bb896645 is able to find it.
Comment 3 err 2011-04-11 15:51:34 UTC
(In reply to comment #2)
> The javac is not able to replace the existing "com.raelity.jvi.core.GetChar" on
> Windows. Someone is holding the handle.

Right, something in NetBeans (perhaps the debugger) or the debugg'd JVM, since a second press of the button works correctly. Since I'd never seen it before I wondered if having the two editor windows with GetChar.java opened might have somehow triggered two 'removes' of the class file that conflicted.

> Probably nothing to do with
> java/project which just starts the build script. Can you try to find out who
> holds the handle? The Process Monitor
> http://technet.microsoft.com/en-us/sysinternals/bb896645 is able to find it.
I should have done this (I use sysinternal process monitor), but in the heat of battle...

I can't reproduce, haven't tried that much. Hmm, wonder if an active breakpoint in the file. Anyway, if I see it again, I'll dig more thoroughly. Close if you wish.
Comment 4 Tomas Zezula 2011-04-11 17:17:20 UTC
OK, I will try to play with it for awhile and if I don't find a way how to reproduce I will close as WORKSFORME.
Comment 5 Tomas Zezula 2011-04-20 08:40:23 UTC
If it reappears please reopen.