i have an issue with casting and conversion,
messages list is of Object class, each element of the list is an array of different types, so i need a way that will help me cast each element in the object component into array.
This is my portion of code.
String query = "SELECT m.MSG_CODE, m.MSG_TYPE, m.MSG_TITLE, m.MSG_CORE, me.IS_READ "
+ "FROM EBANKING.EBAN_MESSAGING m, EBANKING.EBAN_MESSAGING_ENDUSER me WHERE me.END_USER_CODE = "
+ userCode + " AND me.MSG_CODE = m.MSG_CODE";
List<Object> messages = ebankingPersistenceService.getResultNativeQuery(query);
List<EbanMessagingDto> notifications = new ArrayList<EbanMessagingDto>();
for (Object e : messages.toArray()) {
System.out.println(Array.getLength(e)+" ---------------- IS THE LENGTH");
System.out.println(Array.getLong(e, 0)+" ---------------- IS THE FIRST ELEMENT");
}
The last line causes always the IllegalArgumentException : Argument is not an array Yet it shows the length as 5 in the previous line.
Any help will be infinitely appreciated.
Thanks in advance.
See guys, e is an array. I have no idea what the going on.
