Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Transformer serialize problem

 
Paulo Carvalho
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic