How do I replace Java's default deserialization with my own readObject call? -


Someone thought that using the default sorting methods of Java would be a good idea to store objects in the database in the Blob column. The structure of these objects is controlled by another group and they have changed the field type from bigdquell to long, but the data in our database remains the same. Now we can not read objects because this class causes class exceptions.

I tried to override it by typing my read object method, but it throws a stream-compressed expression because the default typing object was written by the method.

How do I treat my ReadObject call default to Java? Are there a certain number of bytes that I can leave to access my data?

If you want to read what is already in your database, their only option is to give them the class To change again, and to establish some awareness that you are relying on the definition of class because it was when the class was orderly. It can not be corrected by applying only your own readObject () call, and if the class is under someone else's control then you can not do it anyway.

If you are ready to throw away existing data then there are many other options to start with custom serialization, write replay () / readlev (), extractable, ... or a different mechanism such as XML .

But if you change things to the third party, they feel like you are always facing one kind of problems.

Either way BigDec for long sounds like a regressive step.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -