-2

Currently I'm working on pairing program in java using japir library. I want to write the public and private keys to a file. I'm able to write it but when reading from this file i'm getting

"java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: uk.ac.ic.doc.jpair.pairing.ComplexField"

Please help me to resolve this exception.

AVI
  • 5,516
  • 5
  • 29
  • 38
Amal AR
  • 7
  • 1
  • 1
    Edit blog and add Some Code With Error Log – Anand Dwivedi Jan 11 '16 at 04:47
  • You're probably using the wrong method to save your data ; it is likely that the library did not intend for you to use serialization to do that. But since you haven't provided any code, so we don't even know what you're trying to save, it's not possible to know or to answer your question. – Erwin Bolwidt Jan 11 '16 at 05:42
  • You're **not** able to write it. You got a similar `SerializationException` when writing which you seem to have ignored. – user207421 Jan 12 '16 at 02:52

1 Answers1

0

I don't think you are able to write it because in the exception, it said "writing aborted". Therefore, it must be stuck on writing.

Serializable is there so that you can write objects into a file. Since the JPair ComplexField class is not Serializable, you have to find some other way to write the keys to file. If you provide more code, I might be able to find the solution.

Hope this helps!

sguan
  • 1,039
  • 10
  • 26