Why did I get this error : java.lang.Exception: XMLEncoder: discarding statement Vector.add()? -


My Java program would look like this:

  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; (); ......}

// ============================== =========================================

Package feature; Import java.io * *; Import java.util. *; Import javax.jdo.annotations.IdGeneratorStrategy; Import javax.jdo.annotations.IdentityType; Import javax.jdo.annotations.PersistenceCapable; Import javax.jdo.annotations.Persistent; Import javax.jdo.annotations.PrimaryKey; @PersistenceCapable (identityType = IdentityType.APPLICATION) implements public square Contact_Info_Entry Serializable {@PrimaryKey @Persistent (valueStrategy = IdGeneratorStrategy.IDENTITY) public Long id; Public stable final long serial VERSIONUID = 26362862L; Public string Contact_Id = ""; FIRST_NAME = "", LAST_NAME = "", TRANSACT = "", Branch_Name = "", ADDRESS_l = "", Address_2 = "", City = "", state = "" zip = "", Country = ""; ...... public boolean B_1; Public vector & lt; String & gt; A_Vector = new vector & lt; String & gt; (); Public Contact_Info_Entry () {} public Contact_Info_Entry (string Any_aidi) {this.Other_Id = Other_Id; } ...... Public Zero Set ID (Long Value) {ID = Value; } Public Long IID () {Return ID; } Public Zero Set CONTEXT_Id (String Value) {Contact_Id = value; } Public string getContact_Id () {return Contact_Id; } Public Zero setFirst_Name (string value) {First_Name = value; } Public string getFirst_Name () {return First_Name; } Public Zero setLlast_Name (string value) {Last_Name = value; } Public string getLast_Name () {return Last_Name; } Public Zero setCompany_Name (string value) {Company_Name = value; } Public string getCompany_Name () {return Company_Name; } ......}

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

Maybe the answer is :?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -