Why did I get this error : java.lang.Exception: XMLEncoder: discarding statement Vector.add()? -
My Java program would look like this: // ================================= ====================================== // ============================== ========================================= I got this error message: java.lang.Exception: XMLEncoder: forsaken statement Vector.add (Contact_Info_Entry); Continued ... java.lang.Exception: XMLEncoder: discarding statement Vector.add (Contact_Info_Entry); Continued ... java.lang.Exception: XMLEncoder: discarding statement Vector.add (Contact_Info_Entry); Continued ... java.lang.Exception: XMLEncoder: discarding statement Vector.add (Contact_Info_Entry); Continuing ... java.beans.XMLEncoder.outputStatement (XMlencoder.java:611) java.beans.XMLEncoder.outputValue (XMlencoder.java.552) in thread "thread -8" exception Java JavaScript to java.lang.NullPointerException On java java.beans.XMLEncoder.outputValue (XMlencoder.java) beans java.beans.XMLEncoder.outputStatement (XMlencoder.java:687) on 52 Java.beans.XMLEncoder.flush. Xmlencoder OutputStatement (Xmalecoder.Java: 682) (XMlencoder.java:398) looks at java.beans.XMLEncoder.close (XMlencoder.java:429) at Biz_Manager.Get_Customer_Agent_Shipping_Company_And_Shipping_Agent_Net_Worth_Info (Biz_Manager.java:945 9) that it can not cope with the vector is, why? Is something wrong? How to fix it Frank
public class Biz_Manager {static Contact_Info_Setting Customer_Contact_Info_Panel; Fixed XMLEncoder XML_Encoder; ...... zero Get_Customer_Agent_Shipping_Company_And_Shipping_Agent_Net_Worth_Info () {XML_Encoder = new XMLEncoder (New BufferedOutputStream (new FileOutputStream (Customer_Contact_Info_Panel.Contact_Info_File_Path))) try {; XML_Encoder.writeObject (Customer_Contact_Info_Panel.Contacts_Vector); } Hold (exception e) {e.printStackTrace (); } Finally {if (XML_Encoder! = Null) {XML_Encoder.close (); // & lt; == Error here, line: 9 45 9 XML_Encoder = null; }}}}
Public category Contact_Info_Setting offers extension JPanel ActionListener, KeyListener, ItemListener {public static last long serialVersionUID = 26362862L; ...... vector & lt; Contact_Info_Entry & gt; Contacts_Vector = new vector & lt; Contact_Info_Entry & gt; (); ......}
Maybe the answer is :?
Comments
Post a Comment