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.
When I switch between a J2EE project and a "normal" project, the compiler output directory is lost from the compiler definition. Actually it seems that it is not updated, as it is always set to "Invalid target" so I'm assuming it is still "pointing" to the directory from the old project (after switching) The compiler output for the web project is set to WEB-INF/classes on a CVS filesystem The output directory for the "normal" project is set to a local directory outside a CVS filesystem This happens with the latest dev builds for 3.6 (January 18, 2004) Windows XP and W2K JDK 1.4.2_03
Radku is this related to your last modifications in AutomountSupport? If I switch to another project it takes some time the repository is updated, especially web FS comes with some delay. In some cases it cannot restore even open files located on a web FS. The switch ends up with DataObjectNotFoundException. In case you do not have any open file in the editor and you wait a while everything works fine inclusive of the compiler output directory.
I played with switching projects (even with webFS) and didn't find any problem - all filesystems were present. Files in editor were reopened except NPE that seems to be caused by problems inside j2ee (j2eeeserver) module. See attachement. Reassigned back for evaluation: if you can reproduce this bug then you can test with e.g. month old revision of AutomountSupport and then eventually reassign to me. Thanks.
Created attachment 12992 [details] NPE
You have to convert some mounted FS to web module in order to reproduce it. IMO there is nothing what the java module could do in the compiler setting to prevent this.
Fix: /cvs/core/src/org/netbeans/core/AutomountSupport.java new revision: 1.53; previous revision: 1.52 Jan, please could you verify it and add comment before I close it.
It works for me now.
Thanks. FIXED.
It still doesn't work for me. I have one project with a CVS based web app directory and one CVS based "normal" java directory This one has the compiler output set to WEB-INF/classes which is inside the CVS filesystem The other project does not have any CVS directories. Just one java source file system and one filesystem for the classes. When I switch back and forth between the two projects, the compiler output is always lost. No entries in ide.log though I recreated both projects from scratch with the current dev builds (to get the new CVS filesystems) but it still doesn't work.
Thommas, could you verify or reopen. thanks.
I tried with 3.6 daily build from March, 8 and the problem is still there. I started out with an empty User Dir. Created first Project: Mounted a CVS directory with my Java classes Mounted a CVS directory as a webapps directory -> it was regnoized as a web module and the WEB-INF/classes was auto-mounted. Then went into compiler options and selected WEB-INF/classes as the output directory (btw: why isn't this done automatically :-) Worked with the project Created the second Project (same setup as above, but different CVS directories obviously) Worked (compiled) with that project, closed NetBeans Reopened NetBeans, switch to first Project Go to compiler options, output directory read "Invalid target" This is with WinXP, JDK 1.4.2_03 and Win2K JDK 1.4.2_02
Yarda, please take over this issue. Thx
I am sorry, I was not able to reproduce the problem. I tried to follow your description and everything worked fine. I am not completely sure why the problem should be in core, and in order to track it down I have written small debug program that can help us find that. If you ever run into the same problem again, please execute the Main.java I am going to attach by internal execution and attach the output here. That will allow us to correctly categorize the problem and hopefully track it down.
Created attachment 13947 [details] Execute with internal execution
As I can reproduce this problem every time I change my projects, this isn't a problem. But when I open Main.java, I cannot compile it, because obviously I'm missing the netbeans libraries. I installed the NetBeans API support, but I still cannot compile it...
Btw. would it help, if I attached an archive with the contents of the two project directories from my userdir to this issue?
Re: compilation - please mount openide.jar into filesystems. It should be in in nbinstalldir/lib/openide.jar. Then you should compile. Btw. do not forget to set internal execution on the class. Re: content of directories - it might help, but I prefer to see the output of Main.java first
Here is the output: ================== output start ======================= in lookup: SL[/CompilerType/External Compilation class: class org.netbeans.modules.java.JavaExternalCompilerType its targetFSName: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/COL/repository/projects/opg/webapp:WEB-INF/classes its fs: null in lookup: SL[/CompilerType/Internal Compilation class: class org.netbeans.modules.java.gj.JavaCompilerType its targetFSName: null its fs: null in lookup: SL[/CompilerType/JikesCompiler class: class org.netbeans.modules.java.JavaExternalCompilerType its targetFSName: null its fs: null fs: SystemFileSystem instance: SystemFileSystem[org.netbeans.core.projects.SystemFileSystem@29ea31] fs: Mount/Javadoc/org-netbeans-modules-junit-junit-javadoc.xml instance: Mount/Javadoc/org-netbeans-modules-junit-junit-javadoc.xml[org.netbeans.modules.javadoc.search.environment.JavadocArchive@13d5f21] fs: Mount/Javadoc/org-netbeans-modules-web-core-resources-javadoc_jsp.xml instance: Mount/Javadoc/org-netbeans-modules-web-core-resources-javadoc_jsp.xml[org.netbeans.modules.javadoc.search.environment.JavadocArchive@30a895] fs: Mount/Javadoc/org-netbeans-modules-web-core-resources-javadoc_servlet.xml instance: Mount/Javadoc/org-netbeans-modules-web-core-resources-javadoc_servlet.xml[org.netbeans.modules.javadoc.search.environment.JavadocArchive@8be1c9] fs: Mount/Javadoc/org-netbeans-modules-xml-tools-resources-xml_apis.xml instance: Mount/Javadoc/org-netbeans-modules-xml-tools-resources-xml_apis.xml[org.netbeans.modules.javadoc.search.environment.JavadocArchive@1947647] fs: Mount/java/org-netbeans-modules-form-absolutelayout-library.xml instance: Mount/java/org-netbeans-modules-form-absolutelayout-library.xml[org.netbeans.modules.java.environment.LibraryArchive@1e14de0] fs: Mount/java/org-netbeans-modules-junit-junit-library.xml instance: Mount/java/org-netbeans-modules-junit-junit-library.xml[org.netbeans.modules.java.environment.LibraryArchive@bfb545] fs: Mount/java/org-netbeans-modules-junit-junit-testrunner.xml instance: Mount/java/org-netbeans-modules-junit-junit-testrunner.xml[org.netbeans.modules.java.environment.LibraryArchive@15cd9a] fs: Mount/java/org-netbeans-modules-web-core-resources-library-jsp.xml instance: Mount/java/org-netbeans-modules-web-core-resources-library-jsp.xml[org.netbeans.modules.java.environment.LibraryArchive@16d46d7] fs: Mount/java/org-netbeans-modules-web-core-resources-library-servlet.xml instance: Mount/java/org-netbeans-modules-web-core-resources-library-servlet.xml[org.netbeans.modules.java.environment.LibraryArchive@145d424] fs: c:\Programme\NetBeansDev\beans\TimerBean.jar instance: c:\Programme\NetBeansDev\beans\TimerBean.jar[org.netbeans.modules.usersguide.UGModule$GlobalJarFileSystem@16a8823] fs: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/LMS/src/java instance: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/LMS/src/java[org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem@811340] fs: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/LMS/src/projects/lms/webapp instance: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/LMS/src/projects/lms/webapp[org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem@d68841] fs: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/LMS/src/projects/lms/webapp:WEB-INF/classes instance: org.netbeans.modules.vcs.advanced.CommandLineVcsFileSystem C:/Projects/LMS/src/projects/lms/webapp:WEB-INF/classes[org.netbeans.modules.web.context.DelegatingFileSystemVcs@588ec0] fs: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\struts.jar instance: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\struts.jar[org.openide.filesystems.JarFileSystem@ef87ba] fs: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\activation.jar instance: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\activation.jar[org.openide.filesystems.JarFileSystem@1b7e189] fs: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\classes12.jar instance: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\classes12.jar[org.openide.filesystems.JarFileSystem@13825bf] fs: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\log4j-1.2.8.jar instance: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\log4j-1.2.8.jar[org.openide.filesystems.JarFileSystem@1365dcc] fs: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\mail.jar instance: C:\Projects\LMS\src\projects\lms\webapp\WEB-INF\lib\mail.jar[org.openide.filesystems.JarFileSystem@480e23] fs: c:/daten/netbeansdev/jakarta-tomcat-5.0.19_base/work/catalina/localhost/webapp instance: c:/daten/netbeansdev/jakarta-tomcat-5.0.19_base/work/catalina/localhost/webapp[org.openide.filesystems.LocalFileSystem@983fe1] fs: C:\Programme\NetBeansDev\lib\openide.jar instance: C:\Programme\NetBeansDev\lib\openide.jar[org.netbeans.core.ExJarFileSystem@84c71b] ================== output ends ======================= The first line is actually showing the problem: C:/Projects/COL/repository/projects/opg/webapp:WEB-INF/classes belongs to the project which was active before I switched, and is not mounted in the new project. The new project (LMS) should have C:/Projects/LMS/src/projects/lms/webapp:WEB-INF/classes as the output directory.
Good and bad. This is definitively not problem in automount support. It is either in java module or in filesystems. I will think about ways how to track it down. Meanwhile Thomas please verify that your compiler is project and not global. Tools/Options->Compilers/YourCompiler, and click on "<<" in top-middle position this shall expand three new columns, and your compiler should be in "Project" one.
Verifying the compiler options was actually the first thing I did.
So all the compilers are "project" ones. Ok. In such case please attach here the actual compiler settings files please. This is what I would do on my computer: $ cd youruserdir $ find . -name "*Java*Compiler*" ./system/Projects/First/system/Services/CompilerType/JavaExternalCompiler.settings ./system/Projects/Second/system/Services/CompilerType/JavaExternalCompiler.settings ./system/Services/CompilerType/JavaExternalCompiler.settings $ find . -name "*Java*Compiler*" | xargs zip Files39020.zip Another interesting information would be output with logging turned on. Please run with: runide.sh -J-Dorg.openide.loaders.FolderInstance.Services.CompilerType=-5 and attach the log file.
In the scenario you used to reproduce this problem you wrote: "Reopened NetBeans, switch to first Project" can you instead of it do "Reopened NetBeans, switch to Default(Empty) project, switch to first Project" and verify whether the problem appears in this case as well? In my opinion the problem should disappear. The other solution to your problem should be: In one of your projects, go to the Compiler Settings and create another instance of your compiler using copy,paste. Then delete the original one. Everything should work as before (as the compiler is there with the same settings), but the bug during switching of projects should not appear. Can you try it and let me know the result?
Copy & pasting the compiler node did the trick, now it works fine and the setting is remembered. I will attach the two compiler setttings files anyway, because I think it would be fine if you could track that down. As the two projects where created from scratch on an empty userdir. I saved my userdir before doing the changes, so I will attach the log file with the extended information as well
Created attachment 13950 [details] Compiler settings for the first project
Created attachment 13951 [details] Compiler settings for the other project
Created attachment 13952 [details] logfile
Both setting files contain reference to C:/Projects/COL/ which is not good. Btw. locations of the files were system/Projects/LMS/system/Services/CompilerType/ and system/Projects/COL/system/Services/CompilerType/, I guess. However I have no idea why they both refer to COL. The log file just shows that there is new version of JavaExternalCompiler read from the disk. I will try to provide some test case to proceed a bit further. Anyway: because I am still not able to reproduce and there is a workaround that works for you, I believe I can lower priority. That way release36 will not be blocked by this issue.
Created attachment 13957 [details] Please copy these files to java.jar to appropriate place and let me know whether the problem disappear
I tried the patch, and as far as I can tell, it fixes the problem I will also try it on my other computer at home, because there the problem is reproducable as well.
When switching projects, the filesystems in repository are being unmounted, which triggers the RepositoryListener R in JavaCompilerType which in turn fires property change that it changed. Which is in fact not true. There seems to be another possible problem in InstanceDataObject (it saves an object which is no longer valid for it, so the object gets saved into wrong project), but the root source of the problem is JavaCompilerType firing and thus requesting save when in fact there is no change. This problem is not webapp specific, it can happen for any compiler that has different target directory. Please fix it in java module. For example by having property of type String targetFSName and special property editor that will allow editing it in the way how current editor works. By doing this you will not need to fire changes if there is some change in the Repository.
Please, make issue evaluated. Thanks.
okay, i marked this as targeted for the next release, not 3.6
The whole project system was rewritten and uses ANT now, so the bug is not relevant in promoD. Closing as WONTFIX.