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 177158 - [68cat][compiler] Opened Project from 20091117xxxx Cannot Be Compiled
Summary: [68cat][compiler] Opened Project from 20091117xxxx Cannot Be Compiled
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Import Settings (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
: 167771 177157 177881 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-18 22:18 UTC by esmithbss
Modified: 2011-02-03 13:20 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE Log File (152.39 KB, application/octet-stream)
2009-11-18 22:18 UTC, esmithbss
Details
Logfile where the settings-import was done. (120.24 KB, application/octet-stream)
2009-11-23 02:26 UTC, stefan79
Details
Log-file after importing. (217.43 KB, application/octet-stream)
2009-11-23 02:27 UTC, stefan79
Details
Current Log-file (513.64 KB, application/octet-stream)
2009-11-23 02:27 UTC, stefan79
Details
The Config-Files (6.35 MB, application/octet-stream)
2009-11-24 00:18 UTC, stefan79
Details
Rar-File with before and after importing the build-properties-File. (1.63 KB, application/octet-stream)
2009-11-24 09:01 UTC, stefan79
Details
Rar-File (5.28 MB, application/octet-stream)
2009-11-25 07:18 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2009-11-18 22:18:53 UTC
Created attachment 91307 [details]
IDE Log File

[200911180645]
[jdk1.6.0u17]

When I open a project from 20091117xxxx in 200911180645, the first compilation attempt results in :

This property must point to 
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at 
<netbeans_installation>/java<version>/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
BUILD FAILED (total time: 0 seconds)
Comment 1 esmithbss 2009-11-18 22:29:33 UTC
It appears that the project uses 2 libraries that are identified as missing references in the Project tree, but not in the project properties.

The libraries are:

   * junit library (project contains reference to JUnit 3.8.2 library.

   * javaee-endorsed-api-6.0 (project doesn't show any reference to this library).
Comment 2 esmithbss 2009-11-18 23:19:19 UTC
It appears that this may be tied to importing options from the previous (20091117xxxx0 build).

After deleting the userdir and restarting NB, the errors indicate the custom libraries (the reasoning behind exporting/importing my settings) are missing.

This indicates the library import may not be working properly.
Comment 3 Dusan Balek 2009-11-19 03:46:48 UTC
Reassigning.
Comment 4 Tomas Zezula 2009-11-19 06:05:07 UTC
*** Bug 177157 has been marked as a duplicate of this bug. ***
Comment 5 Jiri Prox 2009-11-20 05:08:06 UTC
Can you please describe exactly what did you do, before the error occurred? I've tried to reproduce it but w/o any success.
Thnaks
Comment 6 esmithbss 2009-11-20 07:50:18 UTC
Here's what I did to generate/cause this issue:

1) Install NetBeans 6.8 (not the current nightly) using the default folder selection.

2) Create a Java Web project using existing sources in any version of NetBeans 6.8.

3) Make sure the Java Web Project is configured to use some of the built-in Libraries.  An easy one to use is the JUnit library.  In support of this, create a JUnit test within the project.

4) Make sure the project compiles cleanly.

5) Open the IDE options and make some minor, but noticeable changes (like change fonts and sizes).

6) Export the IDE Options.

7) Uninstall NB 6.8

8) Make sure the entire 6.8 environment (except for the exported options zip file) is removed so we start with a clean environment.  No NetBeans installation folder, no {userdir}/.netbeans folder.

9) Install the current nightly 6.8 using the default folder selection.

10) Import the IDE Options you exported from the previous version of NetBeans.

11) Open the project you created in step 2.

12) Choose to build your project (NOT CLEAN-AND-BUILD).


It appears that the import is bringing in links with the complete path to the previous installation so the libraries may not match up following the import.
Comment 7 stefan79 2009-11-23 02:24:52 UTC
Copy from NetCat68-Mailinglist:

Today I removed the old NB-Versions and my Userdir and installed the latest build (200911220201).
Then I imported my settings and restarted the IDE.
Now I get always the following errormessage: "junit_4" library could not be found.
 
I click on resolve, select the junit4.5 - Library, but this doesn´t help.
I have no "junit_4" - Library and I haven´t found any occurence in my userdir.
There´s on entry in project.properties:
javac.test.classpath=\
    ${build.classes.dir}:\
    ${javac.classpath}:\
    ${libs.junit_4.classpath}
 
There´s no Exception at logfile, but this Classpath-Entry looks a little bit strange:
....
event=PATHS_ADDED pathKind=BINARY_LIBRARY pathType=classpath/compile affected paths:
  "H:\develop;H:\lib\softline16.jar;H:\lib\tomcat6\jsp-api.jar;H:\lib\tomcat6\servlet-api.jar"
  "E:\Entwicklung65\build\classes;H:\develop;H:\lib\softline16.jar;H:\lib\tomcat6\jsp-api.jar;H:\lib\tomcat6\servlet-api.jar;E:\Entwicklung65\${libs.junit_4.classpath}"
....
 
The project.properties - file changed after restarting the IDE.
Comment 8 stefan79 2009-11-23 02:26:42 UTC
Created attachment 91501 [details]
Logfile where the settings-import was done.
Comment 9 stefan79 2009-11-23 02:27:05 UTC
Created attachment 91502 [details]
Log-file after importing.
Comment 10 stefan79 2009-11-23 02:27:28 UTC
Created attachment 91503 [details]
Current Log-file
Comment 11 Tomas Zezula 2009-11-23 10:30:33 UTC
I was not able to reproduce it with ant but there were 4 libraries which had wrong paths (Comet-GlassFish-v3, EclipseLink-GlassFish, Java-EE-GlassFish, restlib_gfv3ee6). These libraries contain an absolute URL to nb installation. When copied by export|import they point to deleted installation. Either the installer should convert them tom nbinst during export or it should fill a defect to owner of these libraries (j2ee probably).

To reporter: Can you please attach the part of the options.zip? The following folders (files) are needed: build.properties, config/org-netbeans-api-project-libraries/Libraries/*.xml

Thanks
Comment 12 stefan79 2009-11-24 00:18:30 UTC
Created attachment 91573 [details]
The Config-Files

The Rar-Files contains the following:
-) "config_before_import" (Folder)
   The Config after installing NB
-) "TestProjectBeforeImport"
   A Testproject before importing the settings
-) "ConfigForImport_6_8.zip"
   The Config I´ve imported
-) "config_after_import"
   Config-folder after importing the settings
-) "TestProjectAfterImport"
   A test-project after importing the settings.
Comment 13 Jiri Skrivanek 2009-11-24 05:53:32 UTC
Please, look at <your_userdir>/build.properties. If there are wrong paths, remove them and restart IDE. There were problems with build.properties but it should be fixed since build 200911050201 (see bug 166585). If you imported build.properties from older build, then you can have described problems. To confirm look at options.zip/build.properties. There should be only your custom properties.
Comment 14 stefan79 2009-11-24 09:01:40 UTC
Created attachment 91618 [details]
Rar-File with before and after importing the build-properties-File.

(In reply to comment #13)
> Please, look at <your_userdir>/build.properties. If there are wrong paths,
> remove them and restart IDE. 
There are no wrong paths.
There are many paths missing.

-) I´ve cleared my userdir and started NB
-) Then I copied the build.properties to "build_after_installing.properties"
   There are 76 lines
-) Then I imported my Config-File
  Now in build.properties are 24 lines.
  -> "build.properties"

I think the Import overwrites too much.
Comment 15 esmithbss 2009-11-24 09:04:08 UTC
I know the first time I exported the IDE settings and experienced this was on the 18th (using 200911180645) so either I didn't hit the bug 166585, or it re-appeared on the 18th.
Comment 16 stefan79 2009-11-24 09:41:24 UTC
I merged my two build.properties - Files (before and after the import) and now it works.
Comment 17 esmithbss 2009-11-24 09:43:19 UTC
I went in and manually copied my custom libraries over from the exported settings into the new config tree and that appears to have fixed it for me to.
Comment 18 stefan79 2009-11-25 01:31:28 UTC
This doesn´t works!
I´ve exported the settings from 200911230200 and imported the settings at the current build (200911241400).

The same problem again.

build.properties is overwritten and not merged.

--
Priority and Version changed, because I think Import and Export are main features and they should work.
Comment 19 Jiri Skrivanek 2009-11-25 05:07:20 UTC
Stefan79, you exported the settings from 200911230200. Could you tell me what is in export.zip/build.properties? And what is in 200911230200_install_dir/netbeans/etc/netbeans.import?
Comment 20 stefan79 2009-11-25 05:54:21 UTC
(In reply to comment #19)
> Stefan79, you exported the settings from 200911230200. Could you tell me what
> is in export.zip/build.properties? 
There´s only one line:
nbplatform.default.harness.dir=${nbplatform.default.netbeans.dest.dir}/harness

> And what is in
> 200911230200_install_dir/netbeans/etc/netbeans.import?
I´ve unistalled this version.
Comment 21 stefan79 2009-11-25 07:18:24 UTC
Created attachment 91673 [details]
Rar-File

I´ve tried it again with the current build.

Following folders are in the rar-file:
-) ExportSettings
   At this time everything worked.
   *) I exported the setting -> Settings_Current.zip
   *) config-Folder (Userdir)
   *) netbeans.import (programmfolder)
   *) build.properties (Userdir)

-) AfterUserdirClearing
   Then closed NB and cleared my Userdir.
   In this folder are the files after restarting the IDE.
   *) config-Folder (Userdir)
   *) build.properties (Userdir)
 

netbeans.import hasn´t changed since installation.
-) AfterImportAndRestarting
   *) config-Folder (Userdir)
   *) build.properties (Userdir)
Comment 22 Jiri Skrivanek 2009-11-26 02:30:55 UTC
OK, I expect that restart after import doesn't fix it, right?
Comment 23 Jiri Skrivanek 2009-11-26 06:38:54 UTC
Fixed in core-main #d35f452c4fde. Imported properties are merged to existing properties because build.properties can be broken if the file is overwritten. I will push it into release68 repository when QE verifies it in trunk.
Comment 24 Jiri Rechtacek 2009-11-26 07:08:51 UTC
The fix is fine.
Comment 25 Quality Engineering 2009-11-27 06:10:42 UTC
Integrated into 'main-golden', will be available in build *200911271400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d35f452c4fde
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #177158 - Merge imported properties to existing properties because build.properties can be broken if the file is overwritten. It is related to changes done in issue 166585.
Comment 26 Marian Mirilovic 2009-11-30 01:48:52 UTC
I am not able to reproduce mentioned problem in trunk ... Jirka, please proceed with integration into release68
Comment 27 Jiri Skrivanek 2009-11-30 02:42:19 UTC
release68 #d4f0f55e1494
Comment 28 Alexei Mokeev 2009-12-01 00:19:27 UTC
*** Bug 177881 has been marked as a duplicate of this bug. ***
Comment 29 Jiri Skrivanek 2009-12-02 00:40:47 UTC
*** Bug 167771 has been marked as a duplicate of this bug. ***
Comment 30 Hootch 2011-02-03 12:33:04 UTC
After a clean setup of NB6.9.1 failed the Junit Lib settings with the id "junit_4". NB doesn't know the setting about junit_4 oder junit (junit 3.5)
Comment 31 Antonin Nebuzelsky 2011-02-03 13:20:01 UTC
Please, file a separate issue. This one has been resolved.

Specify more concrete steps to reproduce in the new issue.