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 51118 - [40cat] Object Types are not persistant.
Summary: [40cat] Object Types are not persistant.
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: David Konecny
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2004-11-03 12:55 UTC by gugrim
Modified: 2008-12-22 20:41 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
loaders.ser including modified object types that cannot be read. (7.98 KB, application/octet-stream)
2004-11-09 00:04 UTC, Jan Chalupa
Details
message.log file with exceptions after restart (73.97 KB, text/plain)
2004-11-09 00:12 UTC, Jan Chalupa
Details
trunk patch (5.39 KB, patch)
2004-11-09 11:09 UTC, David Konecny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gugrim 2004-11-03 12:55:22 UTC
[ BUILD # : 200410311900 ]
[ JDK VERSION : J2SE 1.5.0 ]

If I associate an extension like "vm" to an object
type such as "Textual Objects", this has effect
only during the NetBeans session. Nothing is
written to my user directory. When I start
NetBeans the next time, the association is forgotten.
Comment 1 dmartin01 2004-11-04 21:04:57 UTC
I'm currently being driven nuts by this.  Every time I start 
Netbeans, I have to add "wsdl" and "wsdd" to the XML object type.

Shouldn't this have a high priority?  This is a pretty bad 
regression from previous versions of Netbeans.
Comment 2 Jan Chalupa 2004-11-09 00:01:47 UTC
True. Verified on custom build of 2004-11-05 sources w/ JDK 1.4.2_04.

I can see the modified object types serialized in the loaders.ser 
file (will attach). Not sure if they're written correctly though.

When the IDE tries to deserialize the object types, attempt to read 
the modified loader settings fails with exceptions (will attach log 
file fragment). Apparently, the object type's input and output 
formats are not compatible.

I think this should be fixed if possible as it may have other 
consequences. David, I'm not sure if this is yours. Feel free to re-
assign.
Comment 3 Jan Chalupa 2004-11-09 00:04:23 UTC
Created attachment 18790 [details]
loaders.ser including modified object types that cannot be read.
Comment 4 Jan Chalupa 2004-11-09 00:09:16 UTC
Modified object types serialized in the attached loaders.ser are:

Bitmap Objects: added 'bmp' and 'xxx' extensions
XML Objects: added 'wsdl' extension
Comment 5 Jan Chalupa 2004-11-09 00:12:09 UTC
Created attachment 18791 [details]
message.log file with exceptions after restart
Comment 6 David Konecny 2004-11-09 10:11:02 UTC
The fix should be trivial. I'm going to work on it.

There exist workaround: when customizing extensions of Object Type you
have to "touch" also Actions. For example add separator and
immediatelly remove it.
Comment 7 David Konecny 2004-11-09 11:06:37 UTC
Deserialization simply ignored fact that serialized list of actions
may be null.

Fixed in:
src/org/openide/loaders/DataLoader.java;
new revision: 1.6; previous revision: 1.5

Test added:
test/unit/src/org/openide/loaders/DataLoaderTest.java;
initial revision: 1.1
Comment 8 David Konecny 2004-11-09 11:09:01 UTC
Created attachment 18794 [details]
trunk patch
Comment 9 David Konecny 2004-11-09 11:12:31 UTC
Yarda, we talked about this. Could you please review the fix. Thanks.

Honza, once reviewed by Yarda I will go to reviewers to get the fix to
4.0 unless you tell me otherwise. As I mentioned there is a
workaround. On the other hand fix should be really safe.
Comment 10 Jan Chalupa 2004-11-09 12:14:13 UTC
Yes, please go ahead and follow the integration process for 4.0.
Comment 11 Jaroslav Tulach 2004-11-09 13:41:56 UTC
Ok. The problem was simulated and it is clear that after the fix the
problem is gone. Go from me.
Comment 12 David Konecny 2004-11-09 14:54:35 UTC
I was curious when this got broken and found that it is caused by this
recent change:

User: rkubacki
Date: 04/10/13 05:28:14
Modified: loaders/src/org/openide/loaders DataLoader.java
Log: no need to check compatibility with boston
<http://openide.netbeans.org/source/browse/openide/loaders/src/org/openide/loaders/DataLoader.java.diff?r1=1.4&r2=1.5>
Comment 13 David Konecny 2004-11-10 14:23:20 UTC
Integrated to release40:
src/org/openide/loaders/DataLoader.java;
new revision: 1.5.4.1; previous revision: 1.5
test/unit/src/org/openide/loaders/DataLoaderTest.java;
new revision: 1.1.2.1; previous revision: 1.1