Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 151648 - Renaming a project using variable-based references gets red error marks
Renaming a project using variable-based references gets red error marks
Product: projects
Classification: Unclassified
Component: Ant Project
All Windows XP
: P2 (vote)
: 6.x
Assigned To: Milan Kubec
Depends on:
  Show dependency treegraph
Reported: 2008-10-28 23:12 UTC by giorgio42
Modified: 2013-01-15 16:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description giorgio42 2008-10-28 23:12:44 UTC
As already stated in IZ #150555, renaming a project that references a jar through the new variables mechanism
is marked as having errors after renaming because of wrong entries in nbproject/private/, like:

1) Create basic desktop application.
2) Reference for instance log4j-1.2.14.jar through a REPSOSITORY (or some other) variable.
3) Use org.apache.logj4.Logger in some class of the project.
4) Rename the project.

a) Project is decorated with an error badge, because it cannot find log4j-1.2.14.jar anymore.
b) Usages of any log4j class in Java files are marked as errors.

But: project compiles and runs, Java files using log4j still compile!

Comment 1 giorgio42 2008-10-28 23:15:12 UTC
It seems that the ant-based build ignores the settings in nbproject/private/, while the NB project
implementation takes them into account. Don't know whether this is a good thing...
Comment 2 Jan Becicka 2008-10-29 11:00:39 UTC
Please evaluate. Thanks
Comment 3 Tomas Zezula 2008-10-29 11:03:22 UTC
The fix should be part of the first 65 patch.
Comment 4 Tomas Zezula 2008-10-29 14:35:55 UTC
ReferenceHelper.fixReferences () causes this problem.
Comment 5 David Konecny 2008-10-30 01:44:11 UTC
Re. "ReferenceHelper.fixReferences()" - first time I've seen this method. I think the method should ignore all absolute
path or paths starting with a variable in It should try to update only relative paths pointing
outside of project folder (starting with "../") which otherwise would get broken by project copy/move.
Comment 6 Milan Kubec 2008-10-31 09:55:34 UTC
Comment 7 Milan Kubec 2008-10-31 10:01:39 UTC
Marking as fixed.
Comment 8 Quality Engineering 2008-10-31 16:31:16 UTC
Integrated into 'main-golden', will be available in build *200810311401* on (upload may still be in progress)
User: Milan Kubec <>
Log: #151648: references defined via properties won't be fixed in case the project is moved, copied, renamed
Comment 9 rbalada 2008-11-14 10:10:40 UTC
Please verify this issue so it can be included in NetBeans 6.5 Patch1
Comment 10 giorgio42 2008-11-14 22:24:47 UTC
I have tested this and it worked, but I got an intermittent exception (the dialog appeared and disappeared again almost
immediately), from the message.log:
SEVERE [org.openide.util.Exceptions]
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createDataImpl(
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$
        at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(
        at org.openide.filesystems.FileUtil.copyFileImpl(
        at org.openide.filesystems.FileObject.copy(
        at org.openide.filesystems.AbstractFileObject.copy(
        at org.openide.filesystems.FileUtil.copyFile(
        at org.openide.filesystems.FileUtil.copyFile(
[catch] at
        at org.openide.util.RequestProcessor$
        at org.openide.util.RequestProcessor$

Comment 11 Tomas Danek 2008-11-19 14:03:39 UTC
verified in Product Version: NetBeans IDE Dev (Build 200811181401)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Linux version 2.6.27-7-generic running on i386; UTF-8; en_US (nb)
Userdir: /tmp/ud
Comment 12 rbalada 2008-11-19 15:24:12 UTC
I've transplanted the changeset into release65_fixes repository as
Comment 13 Tomas Danek 2008-12-01 18:00:47 UTC
verified in 6.5 patch 1

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo