Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 872277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:45:44+00:00 2026-05-15T10:45:44+00:00

My Java program look like this : public class Biz_Manager { static Contact_Info_Setting Customer_Contact_Info_Panel;

  • 0

My Java program look like this :

  public class Biz_Manager
  {
    static Contact_Info_Setting Customer_Contact_Info_Panel;
    static XMLEncoder XML_Encoder;
    ......

    void Get_Customer_Agent_Shipping_Company_And_Shipping_Agent_Net_Worth_Info()
    {
      try
      {
        XML_Encoder=new XMLEncoder(new BufferedOutputStream(new FileOutputStream(Customer_Contact_Info_Panel.Contact_Info_File_Path)));
        XML_Encoder.writeObject(Customer_Contact_Info_Panel.Contacts_Vector);
      }
      catch (Exception e) { e.printStackTrace(); }
      finally
      {
        if (XML_Encoder!=null)
        {
          XML_Encoder.close();   // <== Error here , line : 9459
          XML_Encoder=null;
        }
      }
    }
  }

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

public class Contact_Info_Setting extends JPanel implements ActionListener,KeyListener,ItemListener
{
  public static final long serialVersionUID=26362862L;
  ......
  Vector<Contact_Info_Entry> Contacts_Vector=new Vector<Contact_Info_Entry>();
  ......
}

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

package Utility;

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)
public class Contact_Info_Entry implements Serializable
{
  @PrimaryKey
  @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
  public Long Id;
  public static final long serialVersionUID=26362862L;
  public String Contact_Id="",First_Name="",Last_Name="",Company_Name="",Branch_Name="",Address_1="",Address_2="",City="",State="",Zip="",Country="";
  ......
  public boolean B_1;
  public Vector<String> A_Vector=new Vector<String>();

  public Contact_Info_Entry() { }
  public Contact_Info_Entry(String Other_Id) { this.Other_Id=Other_Id; }
  ......
  public void setId(Long value) { Id=value; }
  public Long getId() { return Id; }

  public void setContact_Id(String value) { Contact_Id=value; }
  public String getContact_Id() { return Contact_Id; }

  public void setFirst_Name(String value) { First_Name=value; }
  public String getFirst_Name() { return First_Name; }

  public void setLast_Name(String value) { Last_Name=value; }
  public String getLast_Name() { return Last_Name; }

  public void setCompany_Name(String value) { Company_Name=value; }
  public String getCompany_Name() { return Company_Name; }
  ......
}

I got this error message :

java.lang.Exception: XMLEncoder: discarding statement Vector.add(Contact_Info_Entry);
Continuing …
java.lang.Exception: XMLEncoder: discarding statement Vector.add(Contact_Info_Entry);
Continuing …
java.lang.Exception: XMLEncoder: discarding statement Vector.add(Contact_Info_Entry);
Continuing …
java.lang.Exception: XMLEncoder: discarding statement Vector.add(Contact_Info_Entry);
Continuing …
Exception in thread “Thread-8” java.lang.NullPointerException
at java.beans.XMLEncoder.outputStatement(XMLEncoder.java:611)
at java.beans.XMLEncoder.outputValue(XMLEncoder.java:552)
at java.beans.XMLEncoder.outputStatement(XMLEncoder.java:682)
at java.beans.XMLEncoder.outputStatement(XMLEncoder.java:687)
at java.beans.XMLEncoder.outputValue(XMLEncoder.java:552)
at java.beans.XMLEncoder.flush(XMLEncoder.java:398)
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:9459)

Seems it can’t deal with vector, why ? Anything wrong ? How to fix it ?

Frank

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:45:45+00:00Added an answer on May 15, 2026 at 10:45 am

    Maybe the answer is there : https://bugs.java.com/bugdatabase/view_bug;jsessionid=36649bcae69963754fe1bd095030?bug_id=4671142

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In languages like Java, you can declare a class without a modifier so it
I'd like to write a Java program that takes arbitrary data and stores it
I have this Java class in a Jar file included as a dependency of
I look at a lot of small Java programs. It would be convenient if
I have written a java program generates lots of files (say txt files) in
In a java program, I create a file with File temp = new File(temp);
A simple java program to input the name of student and find the average
I have a small Java program that reads list of IPs from text file
In a java program, I am getting some data with each value being assigned
I have a java program that performs 5 different tasks. When I run the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.