If I create an XMLTableModel and invoke getRowCount the following
exception is generated when
I try to serialize the XMLTableModel.
java.io.NotSerializableException: org.dom4j.xpath.DefaultNamespaceContext
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
for example:
SAXReader reader = new SAXReader(DocumentFactory.getInstance());
Document document = reader.read( "personal-schema.xml" );
XMLTableDefinition definition = new XMLTableDefinition();
definition.setRowExpression( "/personnel/person" );
definition.addStringColumn( "Name", "name/given" );
XMLTableModel model = new XMLTableModel( definition, document );
model.getRowCount();
try {
FileOutputStream f = new FileOutputStream("tmp.tmp");
ObjectOutput s = new ObjectOutputStream(f);
s.writeObject(model);
s.flush();
} catch (Exception e) {
e.printStackTrace();
}
Am I correct assuming this is a bug in DefaultXPath or
DefaultNamespaceContext?
thanks,
bert
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user