Project

Profile

Help

NotSerializableException

Added by Anonymous about 19 years ago

Legacy ID: #3156126 Legacy Poster: Martin Rügamer (mnruegam)

Hi, the following classes throw an NotSerializableException during stylesheet-compilation: net.sf.saxon.style.LiteralResultElement net.sf.saxon.om.FastStringBuffer net.sf.saxon.style.XSLWithParam I use something like: <xhtml:img width="{number($widthCount) * 16}" /> Thanks Martin


Replies (3)

Please register to reply

RE: NotSerializableException - Added by Anonymous about 19 years ago

Legacy ID: #3156464 Legacy Poster: Michael Kay (mhkay)

Thanks for reporting this. I've recently done some very extensive testing of stylesheet compilation and I think I've caught this one, but it would be useful if you can send me the stylesheet so I can check. Unfortunately it's very difficult to check that all the right classes are serializable except by testing lots of examples. Michael Kay

RE: NotSerializableException - Added by Anonymous about 19 years ago

Legacy ID: #3157265 Legacy Poster: Martin Rügamer (mnruegam)

Hi, we use over 800 stylesheets (with many xsl:imports) for rendering, so its not possible to send them to you. What I have done is a kind of a "testcase" by compiling all of them. Martin Rügamer

RE: NotSerializableException - Added by Anonymous about 19 years ago

Legacy ID: #3157681 Legacy Poster: Michael Kay (mhkay)

OK, understood. As I say, I've done some extensive testing recently so I hope the problems won't happen again. It's not really possible to fix the problems by patch, unfortunately. The problem is not so much that some classes are no serializable, as that the classes that are serialized in a compiled stylesheet are retaining some references to objects that it shouldn't be necessary to serialize. The most common reason for this happening is that after expressions are rewritten by the optimizer, some dead links are left to expressions that are no longer needed.

    (1-3/3)

    Please register to reply