🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #940

Re: On java.io.NotSerializableException: java.lang.Object

#940
From: John McGrath TeamB
Date: Mon, 08 Jul 2002 15:47
28 lines
2045 bytes
On Mon, 8 Jul 2002 15:45:51 +0800, Worm Online wrote:

> I met a problem on using ObjectStrem.writeObject(Object). 
> I have an jTextPane object, if the jTextPane object contains
> only english letters, the writeobject(obj) works well, if
> the jTextPane contains chinese letters, the writeObject(obj)
> throws an exception "java.io.NotSerializableException:
> java.lang.Object".

It looks like the presence of Chinese characters in the JTextPane 
results in a reference to an Object somewhere in the containment 
hierarchy of the JTextPane.  This is very likely a bug in the code 
for one of the support classes for JTextPane.

Serializing Swing components is not a good idea.  Sun ran into a 
lot of problems with it and now recommends against it.  They have 
added a new XML based mechanism in Java 1.4 to replace it.

Unfortunately, I do not have a good answer on how to fix this.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.17937befbecfabdc98b7fe@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!yellow.newsread.com!netaxs.com!newsread.com!priapus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed1.earthlink.net!newsfeed.earthlink.net!uunet!lax.uu.net!dfw.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3d2941ad_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,37aa6d68d3c616d
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-07-08 08:57:36 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: On java.io.NotSerializableException: java.lang.Object
Date: Mon, 8 Jul 2002 11:47:04 -0400
Message-ID: <MPG.17937befbecfabdc98b7fe@newsgroups.borland.com>
References: <3d2941ad_1@dnews>
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 1026143222 209.92.40.60 (8 Jul 2002 08:47:02 -0700)
Lines: 28
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!yellow.newsread.com!netaxs.com!newsread.com!priapus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed1.earthlink.net!newsfeed.earthlink.net!uunet!lax.uu.net!dfw.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews