This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Object Transformer serialize problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Object Transformer serialize problem" Watch "Object Transformer serialize problem" New topic
Author

Object Transformer serialize problem

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 57
Hello

I have a Java application which has a little method to serialize a javax.xml.transform.Transformer into a byte[].

Here is the method:



However, I am getting the following error:

java.io.NotSerializableException: net.sf.saxon.Controller
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at .processing.transform.cache.CacheTransformers.addTransformer(CacheTransformers.java:62)
....

How can I solve the problem? Is there any other way to serialize a javax.xml.transform.Transformer object?

Thanks
Regards
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Object Transformer serialize problem