public void updateMethod(byte[] b) {
try {
JdoTemplate jdoTemplate = getJdoTemplate();
...update statements...
jdoTemplate.flush();
}
catch(DataAccessException dae) {
...msg is displayed in the page..
System.out.println ("DataAccessException...");
}
}
this method accepts a csv file and save the records in the db.
If there is an invalid record, the transaction is rolled back so no records were added.
DataAccessException is caught & a msg is displayed in the page.
However, a nested exception error is still printed in the console.
Why is a nested exception still appears or what causes it? and more importantly, how to stop error msg from being printed into the console..?
console:
DataAccessException...
org.springframework.orm.jdo.JdoResourceFailureExce ption: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.; nested exception is kodo.util.FatalDataStoreException: at......
at....


Reply With Quote