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 19342 - Import of 321 project with txt editor has problems with deserialization
Summary: Import of 321 project with txt editor has problems with deserialization
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All Windows 3.1/NT
: P2 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
: 18457 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-11 12:57 UTC by Milan Kubec
Modified: 2009-11-07 11:39 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception stack trace (10.73 KB, text/plain)
2002-01-11 12:59 UTC, Milan Kubec
Details
project dir (16.43 KB, application/octet-stream)
2002-01-11 13:05 UTC, Milan Kubec
Details
Yarda's idea&proposed patch. (1.84 KB, patch)
2002-01-15 16:29 UTC, Peter Zavadsky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2002-01-11 12:57:02 UTC
Import of project from release 321, where txt editor was openned throws IOE
saying that class serial UIDs are incompatible. Project and exceptions are attached.
Comment 1 Milan Kubec 2002-01-11 12:59:38 UTC
Created attachment 4108 [details]
exception stack trace
Comment 2 Milan Kubec 2002-01-11 13:05:34 UTC
Created attachment 4109 [details]
project dir
Comment 3 Jan Pokorsky 2002-01-11 14:49:59 UTC
It is an incompatibility in the text module.
Comment 4 Pavel Buzek 2002-01-11 14:52:19 UTC
see also:
http://www.netbeans.org/issues/show_bug.cgi?id=17618
we will preferably be compatible with 3.2.1 rather then 3.1 if we have 
to choose
Comment 5 Miloslav Metelka 2002-01-11 15:58:06 UTC
I think it's too late because if we change it to be compatible with
3.2.1 it will not be compatible with 3.3. What do you think?
Comment 6 Jaroslav Tulach 2002-01-14 17:46:11 UTC
Too bad. I guess there is not too much chances to read 3.2.1 version -
but that does not matter too much, it is just text editor window...

We should concentrate on not reporting the exception if possible.

The code will have to go to WindowSystem, because the exception is
reported by it and not by project module, as far as I can see - I am
thinking about catching the java.io.InvalidClassException and if the
invalid class has been info and the bean info is saying info.getValue
("ignoreClassException") then we could ignore the exception completely
and not report it to the user!?

Wh't da'ya thinka bout th'a?
Comment 7 Miloslav Metelka 2002-01-15 08:35:27 UTC
I agree. Thanks Yarda.
Comment 8 Jaroslav Tulach 2002-01-15 09:08:35 UTC
Another solution:

WindowManager does not report the exception by itself, but just throws
org.openide.util.io.SafeException (with good annotations) to the
system. Project module can investigate it and realize that
TxtEditorSupport is fine to fail!?
Comment 9 David Simonek 2002-01-15 12:22:09 UTC
Teda FUJ. I agree with the solution to catch and not report this
error, although it is ugly.
Marek, please take care of the implementation. But Marek will need
exact description of what he's supposed to do, Yarda and Mila please
help Marek, we (winsys guys) don't know background of this at all.
As this is *ugly* hack, I vote for placing it on one place (not spread
across winsys and projects) and document into the code when this hack
can be removed (4.0 probably).
Comment 10 Peter Zavadsky 2002-01-15 16:29:24 UTC
Created attachment 4178 [details]
Yarda's idea&proposed patch.
Comment 11 Peter Zavadsky 2002-01-15 17:17:47 UTC
I'd like to ask QA to test the patch on [release33] build, and if
successful, then approve it.

Note about solution:
It allows us to specify for deserializing class also other
serialVersionUID's which are compatible with current class then
the one computed or loaded thru the well-known field.

Explanation it's not in [main-trunk] yet:
As Yarda said, for [main-trunk] there is needed more general
(long-term) solution allowing also others in nice, easy maintainable
way to specify other compatible serialVersionUID's for some class
name. Something like what is done for packages in Utilities.translate.

For fixing of this issue, i.e. for 3.3.1 is enough just to hardcode
the one class with one more serialVersionUID (see the patch).

Thanks


Comment 12 eadams 2002-01-16 10:06:06 UTC
I approve.

This is an ugly hack and we must be sure to work on 
a more correct solution for the trunk.

Can someone file a bug against 3.4.
Comment 13 Jan Zajicek 2002-01-16 13:39:00 UTC
[QA] Patch verified in 3.3.1rc1.
Comment 14 Jan Chalupa 2002-01-16 13:44:20 UTC
Approved by QA.
Comment 15 Miloslav Metelka 2002-01-16 14:28:31 UTC
*** Issue 18457 has been marked as a duplicate of this issue. ***
Comment 16 Jan Zajicek 2002-01-16 14:53:02 UTC
Created new task to find more correct solution, see issue #19483.
Comment 17 Peter Zavadsky 2002-01-16 16:45:57 UTC
After rethinking put the fix in [main-trunk].

Fix:
openide/../util/io/NbInputStream.java [1.20]

So the finding for generic solution doesn't get forgotten, is the new
issue created (#19483) enough (see comment there). But up to the time,
there should be this issue fixed as well in trunk.
Comment 18 _ ttran 2002-01-17 14:04:41 UTC
peter, go integrate it into release33.

[You already set the "Target Milestone" to 3.3.1.  This should be done
only after the fix is integrated into release33 branch.  Until that
time the milestone should be "3.4"]
Comment 19 Peter Zavadsky 2002-01-17 14:18:57 UTC
Integrated into [release33], thanks.

Fix:
openide/../util/io/NbObjectInputStream.java [1.19.14.1]

Sorry, for too early change of the target milestone.
Comment 20 Jan Zajicek 2002-01-18 11:50:06 UTC
Verified in the build # 200201180727.
Comment 21 Quality Engineering 2003-07-01 15:16:51 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.