I'd like to populate an array with Vector
s. The variable is declared as below:
private List<Object[]>[] group;
However, when I populate it with a Vector
, below exception is thrown:
java.lang.ArrayStoreException: java.util.Vector
at presentationtier.GraphMB.createTables(GraphMB.java:68)
at presentationtier.GraphMB.init(GraphMB.java:48)
How is this caused and how can I solve it?
public List<Object[]> getInv_AccountingError(String action){
EntityManagerFactory emf = null;
EntityManager em = null;
List<Object[]> list = new ArrayList<Object[]>();
try{
emf = Persistence.createEntityManagerFactory("Test");
em = emf.createEntityManager();
Query query = em.createNativeQuery("select k.* from "+action+" k");
list = query.getResultList();
I am getting a List of object array from the db and i loop around this method like call it n times to get a array of list then why vector is comming?