So far I found some answers here but I'll get everytime Errors that I cant convert from Object to String and so on for example I used now this idea:
I have that following List of Objects which is mapped with my Database:
List<OPBList> list123
now i tried this:
String[] arr = list123.toArray(new String[] {});
return arr;
heres m OPBList class:
@Entity
@Table(name = "T_OPB_LIST")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "AllOPBLists", query = "Select a from OPBList a")
})
public class OPBList implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic
@XmlAttribute
@XmlID
private Long id;
@Basic
private String company;
@Basic
private String country;
with some getter and setter methodes
and I get this Error :
HTTP Status 500 - java.lang.ArrayStoreException
Any Ideas how I can do that?