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 48616 - Initial scanning of project classpath occurs repeatedly on OpenVMS
Summary: Initial scanning of project classpath occurs repeatedly on OpenVMS
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: Other OpenVMS
: P1 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks: 49312
  Show dependency tree
 
Reported: 2004-09-07 22:17 UTC by mgarrison
Modified: 2009-11-07 13:34 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch file for NbTopManager.java (1.31 KB, patch)
2004-09-20 20:28 UTC, Isao Yanagimachi
Details | Diff
Patch file for FileUtil.java (2.74 KB, patch)
2004-09-20 20:29 UTC, Isao Yanagimachi
Details | Diff
Patch file for NbInstaller.java (2.13 KB, patch)
2004-09-20 20:30 UTC, Isao Yanagimachi
Details | Diff
Patch file for NbClassPath.java (1.99 KB, patch)
2004-09-20 20:32 UTC, Isao Yanagimachi
Details | Diff
Patch file for FileScanner.java (1.33 KB, patch)
2004-09-20 20:33 UTC, Isao Yanagimachi
Details | Diff
Patch file for J2SEPlatformImpl.java (1.87 KB, patch)
2004-09-20 20:36 UTC, Isao Yanagimachi
Details | Diff
Patch of FileUtil (1.87 KB, patch)
2004-09-28 15:55 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mgarrison 2004-09-07 22:17:32 UTC
Not sure where to put this...so I chose core, 
feel free to move it where it actually belongs.

On OpenVMS, we are seeing the "Scanning Project 
Classpaths" message box repeatedly, and at 
unexpected times.  In addiotn, we see 
the "Initializing scanning...please wait" 
multiple times in the same session.

We are looking into the problem and will post 
more information as we have it.

Meg/Isao
Comment 1 Jaroslav Tulach 2004-09-09 09:49:09 UTC
I would start from javacore module that does the scanning, especially
when I was told that it does not use FileObject to access the files
just a plain java.io.File.
Comment 2 Tomas Hurka 2004-09-09 14:28:16 UTC
Please do post more information. I did not see it on other platforms. 
Comment 3 mgarrison 2004-09-09 21:38:48 UTC
Yes, we'll get back to you soon.  We believe it may have something 
to do with the case of the filespecs.  We've been seeing other 
problems related to this same phenomenon.  On VMS, the filespecs are 
case-insensitive.  And depending on how (or who) you ask for a 
fielspec, it may come back with some or all parts of it capitalized.

Meg 
Comment 4 Tomas Hurka 2004-09-10 08:22:09 UTC
I am sorry, but what is 'filespec'?
Comment 5 mgarrison 2004-09-10 12:59:48 UTC
Oh sorry, 'filespec' is shorthand for 'file specification'.  For 
example /efs/abc/foo.bar  

On VMS, this same file specification could be returned by a call to 
a member of the File class as "/efs/abc/foo.bar" or it might be 
returned as "/EFS$/abc/FOO.BAR" (or some other combination of upper 
and lower case).
Comment 6 Adam Sotona 2004-09-10 14:14:26 UTC
We had the same problem on Windows with J2ME Project type and
SonyEricsson emulator as platform providing bootclasspath.
Repeated scanning was caused by different URLs of classpath entries
provided by platform and URLs of classpath entries provided by project.
Some project classpath entries stayed in unresolved list and caused
never-ending scanning.
The root cause of this problem was usage of normalized files for
construction of platform classpath entries and files without
normalisation for construction of project classpath entries.
The difference was in UPPER/lower case in path.
The IDE once compares the entries by files (or FileObjects) and they
match and once by URLs and they don't match - and this is a bug.

I think that there can be similar or bigger file normalisation problem
on OpenVMS.
Comment 7 Isao Yanagimachi 2004-09-17 16:16:41 UTC
We have a fix for this. What cvs tag should we create a diff 
against ?

thanks

/Meg,Isao
Comment 8 Jan Becicka 2004-09-17 16:23:12 UTC
Great! Please do a diff against latest trunk. Thanks
Comment 9 Isao Yanagimachi 2004-09-20 20:26:28 UTC
Hi, We are submitting patches for this shortly.

/Isao,Meg
Comment 10 Isao Yanagimachi 2004-09-20 20:28:29 UTC
Created attachment 17766 [details]
Patch file for NbTopManager.java
Comment 11 Isao Yanagimachi 2004-09-20 20:29:36 UTC
Created attachment 17767 [details]
Patch file for FileUtil.java
Comment 12 Isao Yanagimachi 2004-09-20 20:30:57 UTC
Created attachment 17768 [details]
Patch file for NbInstaller.java
Comment 13 Isao Yanagimachi 2004-09-20 20:32:08 UTC
Created attachment 17769 [details]
Patch file for NbClassPath.java
Comment 14 Isao Yanagimachi 2004-09-20 20:33:46 UTC
Created attachment 17770 [details]
Patch file for FileScanner.java
Comment 15 Isao Yanagimachi 2004-09-20 20:36:00 UTC
Created attachment 17771 [details]
Patch file for J2SEPlatformImpl.java
Comment 16 Jan Becicka 2004-09-24 15:48:46 UTC
Tomasi, can you review path for FileScanner.java and reassign this
issue to other modules to let them review patches for their code? Thanks.
Comment 17 Martin Matula 2004-09-24 15:53:30 UTC
The patch for the FileScanner does need to be applied. It is in fact a
bug which is not directly related to using OpenVMS. It may cause
problems even on windows. I will apply it.
Comment 18 Martin Matula 2004-09-24 16:02:32 UTC
I applied the patch for FileScanner.java only partially, since .java
and .class extensions are case sensitive even on Windows (*.JAVA files
do not compile - Isao, please confirm it is the case also in OpenVMS),
so we do not use toLowerCase when matching them.

Checking in src/org/netbeans/modules/javacore/scanning/FileScanner.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileScanner.java,v
 <--  FileScanner.java
new revision: 1.8; previous revision: 1.7
done

Reassigning to core to fix NbTopManager and NbInstaller.
Comment 19 Isao Yanagimachi 2004-09-24 16:30:33 UTC
I agree, partial patch should be ok on OpenVMS as well.

thanks

/Isao
Comment 20 Tomas Zezula 2004-09-28 15:53:52 UTC
I've looked at the patch of FileUtil while integrating the issue
#49312 and I've found the following problems.
The patch adds new public methods which are Open VMS specific. These
methods will need to go to API review but it is too late fo NetBeans 4.0.
It would be better to remove them and use FileUtil.normalizeFile ()
and add switch into the normalizeFile method for Open VMS. See the
attached diff, (I am not sure if the attached diff works, I have no
Open VMS access).
The usage of normalizeVMSFilePath (path) will need to be replaced by
FileUtil.normalizeFile ().getAbsolutePath().
Similarly for the normalizeVMSFilePaths.
Comment 21 Tomas Zezula 2004-09-28 15:55:02 UTC
Created attachment 17903 [details]
Patch of FileUtil
Comment 22 Tomas Zezula 2004-09-29 07:55:52 UTC
Reassigning to get comments about changed diff.
Comment 23 Isao Yanagimachi 2004-09-29 15:56:51 UTC
Hi, thanks for looking into this issue and for your suggested 
solution.

We're worried that the patch you suggest will impact NetBeans 
performance on VMS since File.normalizeFileOnVMS() will do the 
directory scan *every* time File.normalizeFile gets called. 

We only need to normalize the class paths returned 
from "sun.boot.class.path", "java.ext.dirs" and "java.home" (because 
of a problem in the current version of our JVM).   So we have 
decided to workaround this problem by modifying the NetBeans 
launcher for VMS instead.   This will eliminate the need for the 
patches submitted to this issue, except for  FileScanner.diff.  The 
FileScanner patch is already applied to CVS as a bug fix for other 
platforms as well, and we have tested it on VMS and it works.


I will also update the patch for the issue 49312 so that 
File.normalizeFileOnVMS() won't get used.

Thanks again, and sorry we didnt get this in sooner.

/Isao


Comment 24 Tomas Zezula 2004-09-30 09:32:04 UTC
Fine, this would be the best solution at all. It will remove nearly
all OpenVMS specific patches.
Comment 25 _ ttran 2004-10-04 19:28:15 UTC
Yarda, can you please review the diff and apply it.  For the platform
parts at least
Comment 26 Jaroslav Tulach 2004-10-05 14:36:12 UTC
cvs ci -m "#48616: Applying patch by isao and tzezula to make
normalizeFile behave differently on Open VMS" src/org/openide/filesystems
cvs commit: Examining src/org/openide/filesystems
Checking in src/org/openide/filesystems/FileUtil.java;
/cvs/openide/src/org/openide/filesystems/FileUtil.java,v  <-- 
FileUtil.java
new revision: 1.117; previous revision: 1.116
Comment 27 Isao Yanagimachi 2004-10-05 14:50:33 UTC
Hi I explained on 2004-09-29 07:56 PDT to this issue that no patches 
except the FileScanner(which is already applied) are needed, and we 
are going to make changes in the launcher instead. Tomas also agreed.

Please undo the change. 

Please refer to the following comments on this issue:

Additional Comments From isao 2004-09-29 07:56 PDT
Additional Comments From Tomas Zezula 2004-09-30 01:32 PDT 


/isao
Comment 28 Jaroslav Tulach 2004-10-05 17:56:52 UTC
cvs ci -m "Reverting the previous patch as isao does not need it anymore"
cvs commit: Examining .
Checking in FileUtil.java;
/cvs/openide/src/org/openide/filesystems/FileUtil.java,v  <-- 
FileUtil.java
new revision: 1.118; previous revision: 1.117
Comment 29 Tomas Danek 2005-07-27 11:27:16 UTC
no further comments - closing.