I cannot figure out why I am not seeing an exception for trying to insert 20 characters into a 10byte oracle table field... I confirmed the bad (too large string) is in the object, and the database does show varchar2(10).
Here is the code (extra logic removed for simplicity)
boolean isSuccess = false;
arrMyObject
for(int i = 0; i < arrMyObject.length; i++) {
try {
MyObject myObject = arrMyObject[i];
em.persist(myObject);
return true;
} catch (Exception e) {
System.out.println("Error");
throw (e);
}
}
return false;
I am not receiving an Exception (expecting some ORA exception). Nothing is being printed out, and I am receiving a TRUE value in my calling method. Also, nothing gets inserted to the table, which IS expected. With valid data I confirmed insert works.
Whats going on?