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 18455 - IOExeption thrown if nb user dir is imported
Summary: IOExeption thrown if nb user dir is imported
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: Other OpenVMS
: P2 blocker (vote)
Assignee: _ ttran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-07 14:26 UTC by Jan Pokorsky
Modified: 2009-11-07 13:34 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IOException stack trace (3.49 KB, text/plain)
2001-12-07 14:31 UTC, Jan Pokorsky
Details
patch for the broken import for OpenVMS platform (2.77 KB, patch)
2002-02-25 21:42 UTC, Isao Yanagimachi
Details | Diff
isao's patch converted to unified diff (5.32 KB, patch)
2002-02-28 14:07 UTC, _ ttran
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2001-12-07 14:26:56 UTC
1. start ide with empty userdir
2. choose import userdir

the attached exception is thrown.
Comment 1 Jan Pokorsky 2001-12-07 14:31:49 UTC
Created attachment 3734 [details]
IOException stack trace
Comment 2 Vitezslav Stejskal 2002-01-03 18:24:35 UTC
Upgrade from older version of IDE is done before the modules are 
loaded, that's why some attributes can be unaccessible (their value 
needs module specific class). Now, attributes are transfered as plain 
files and their values aren't resolved.

fixed in release33
Comment 3 Jan Zajicek 2002-01-04 11:36:29 UTC
Verified rev#1.11.4.1 of CopyUtil.
Comment 4 Isao Yanagimachi 2002-02-06 16:35:15 UTC
This fix breaks the Import operation on NB 3.3.1 OpenVMS.

Because of a file system restriction on OpenVMS, we
had to apply the patch so that  "_nbattrs." is used instead 
of ".nbattrs" for NB 3.2.1. However,with the changes in OpenVMS JVM, 
we now can afford to use ".nbattrs" on NB 3.3.1.

To apply this change, we added the OpenVMS specific code in 
org.openide.filesystems.DefaultAttributes which will rename 
the "_nbattrs." into ".nbattrs" (issue 18368). This change, however, 
became nullified in org.netbeans.core.upgrade.CopyUtil because of the 
AttrslessLocalFileSystem it introduced. 

The AttrslessLocalFileSystem overrides the LocalFileSystem's 
attribute operations which is what it is supposed to do. But at the 
same time, it also overrides the LocalFileSystem's intended list 
operations which use the DefaultAttributes. This ignores the code we 
put it to change "_nbattrs." into ".nbattrs", and causes a problem
during Import on NB 3.3.1 OpenVMS. 

This fix breaks the patch we made in the issue 18368. The patch we 
made in the issue 18368 also needs to be reflected to this issue 
18455 so that the OpenVMS specific .nbattrs conversion also happens 
here.

Is there any chance that NetBeans 3.3.2 be released with this fix in 
it ?

Thanks

Isao Yanagimachi
Compaq Computer Corporation


Comment 5 Vitezslav Stejskal 2002-02-07 11:22:15 UTC
I am sorry, but I don't understand how this fix breaks your patches. 
AttrslessLoaclFileSystem is used *only* when moving content of userdir 
used in previous version of IDE to the new one and it is done before 
starting anything else in IDE. The default filesystem which operates 
on imported userdir consists from o.o.f.LocalFileSystem(s) so patched 
version of DefaultAttributes is active.

What kind of problems do you experience while importing to 3.3.1?  
Comment 6 Isao Yanagimachi 2002-02-07 16:42:09 UTC
Hi, here is what I found.

In the org.netbeans.core.upgrade.CopyUtil.recursiveCopyWithFilter() 
method, the list of all the files (including the nbattr file) in the 
3.2.1 user directory is copied over to the new 3.3.1 user directory 
without any filtering. 

The problem is that 3.2.1 user directory contains the 
file "_nbattrs." on OpenVMS. This file is expected be renamed 
into ".nbattrs" through DefaultAttributes.

However since DefaultAttributes is not active during the import on NB 
3.3.1, recursiveCopyWithFilter() will attempt to copy the "_nbattrs." 
into the 3.3.1 user directory. This operation is bound to fail 
because of the "." at the end of the "_nbattrs.". This is because the 
FileObject will think that "_nbattrs." is a file without an 
extension, and try to find the "_nbattrs"  instead of "_nbattrs." 
upon the execution of the following code in the 
recursiveCopyWithFilter() :

  subTargetFo = FileUtil.copyFile (subSourceFo, dest, 
subSourceFo.getName ());

The code above will throw an exception because there is no "_nbattrs" 
in the directory. This problem did not occur on NB 3.3.0 because 
OpenVMS patch in DefaultAttributes renamed the "_nbattrs." 
into ".nbattrs".


Thanks

Isao Yanagimachi
Compaq Computer Corporation
Comment 7 mgarrison 2002-02-10 15:06:42 UTC
This problem is of great concern to us (Compaq).  We cannot release 
NetBeans 3.3.? on OpenVMS until we resolve this issue.  Is there a 
chance there will be a 3.3.2 release, or should we build our 
own "patched" version of NetBeans 3.3.1 to make available to our 
customers?  Note, building our own "patched version" something we 
would *really like to avoid*.

For our planning purposes, we need an answer to this question  
quickly.
Comment 8 _ ttran 2002-02-11 13:04:55 UTC
Meg and Isao,

this is a tricky issue.  One one hand, I understand this is a
significant problem for OpenVMS users, perhaps even showstopper.  On
the other hand, I am not sure if this fix alone would be enough to
qualify for another bug fix release.

I suggest you to open this issue on nbdev.  Technically it's not hard
to just fix this bug, make a new build and release it as 3.3.2 or
3.3.1_01.  However the decision touches a few important questions
regarding the way we run the NetBeans opensource project, mostly its
decision-making process.

[BTW, if we fix this bug, how confident do you guys at Compaq/OpenVMS
feel that there won't be any other showstopper found a day after 3.3.2
(or 3.3.1_01) is released?]
Comment 9 mgarrison 2002-02-11 14:33:47 UTC
Thanks for the quick answer Trung.

We feel pretty confident that another showstopper won't show up.  We 
neglected to test the project import function after 3.3.0...we won't 
make that mistake again!

Thanks for consideration, and I understand your comments about how 
the project is run, etc..   It's an interesting project management 
problem.  Clearly, OpenVMS does not have the customer base of, say, 
Windows. (We've had 200-300 downloads from our Compaq website) And, 
of course, if this problem was on Windows or Linux you would be 
making a 3.3.1_01.  But because this is an open source project, you 
want to be as inclusive as possible, but not to the detriment of the 
rest of the platforms.  Tough decision.

For us, we're just concerned with our customer's experience.  

I'll take this to nbdev...

Thanks,
Meg
Comment 10 _ ttran 2002-02-15 16:15:21 UTC
Vita, please fix this at least for CVS trunk
Comment 11 Isao Yanagimachi 2002-02-15 19:18:15 UTC
Hi,

  Currently we (OpenVMS NetBeans team) are working on a patch for
this problem. We will submit the patch once it is done.


Thanks

Isao Yanagimachi
Compaq Computer Corporation
Comment 12 mgarrison 2002-02-22 02:43:53 UTC
May I add the 3.3.2_CANDIDATE keyword to this bug?
Comment 13 Vitezslav Stejskal 2002-02-22 09:13:09 UTC
I think the procedure would be to submit patch, I will integrate it, 
run our tests and mark it as 3.3.2_CANDIDATE.
Comment 14 Vitezslav Stejskal 2002-02-25 11:21:15 UTC
Well, procedure was changed, marking as 3.3.2_CANDIDATE.
Comment 15 Isao Yanagimachi 2002-02-25 21:42:19 UTC
Created attachment 4816 [details]
patch for the broken import for OpenVMS platform
Comment 16 _ ttran 2002-02-28 14:05:11 UTC
I'll deal with the patch
Comment 17 _ ttran 2002-02-28 14:07:04 UTC
Created attachment 4861 [details]
isao's patch converted to unified diff
Comment 18 _ ttran 2002-02-28 14:12:12 UTC
Isao, please please please next time always use unified or context
diff to prepare the patch.  Something like

cd nb_all
cvs -u diff core openide > mypatch.diff

The default diff is human unreadable and is not safe for the patch
utility.  There is very nice write up about this on 

http://www.netbeans.org/contrib-patches.html
Comment 19 _ ttran 2002-02-28 14:20:31 UTC
Patch integrated into CVS trunk.  Target milestone currently set to
3.4, when we merge the fix into 3.3.2 it will be set to 3.3.2.

For obvious reasons I could not verify the fix :-)
Comment 20 Isao Yanagimachi 2002-02-28 14:45:16 UTC
Hi, Thank you for applying the patch, and my apologies for not using 
unified diff. 

Isao
Comment 21 Jan Chalupa 2002-04-10 10:46:20 UTC
This bug will not be fixed in the FFJ 4.0 release.
Comment 22 Isao Yanagimachi 2002-04-10 13:59:18 UTC
Hi, Could someone explain to me why this bug won't make it 
to FFJ 4.0 ?

Thanks

/Isao
Comment 23 Jan Chalupa 2002-04-10 18:29:17 UTC
FFJ will be not supported on OpenVMS, so this P2 bug is not applicable
to the FFJ 4.0 release. I'm changing the keyword to NOFFJ40 (read -
doesn't affect FFJ).

Please note that it still remains as a candidate for fixing in the
next bugfix release of NetBeans.
Comment 24 _ ttran 2002-04-17 16:47:46 UTC
patch integrated into orion_fcs branch
Comment 25 Quality Engineering 2003-07-01 15:50:50 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified.

Comment 26 Quality Engineering 2003-07-01 16:45:11 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.