[
http://jira.jboss.com/jira/browse/JBPM-556?page=all ]
Tom Baeyens closed JBPM-556.
----------------------------
Fix Version/s: (was: jBPM jPDL 3.2)
Resolution: Rejected
i think the previous comment shows how to do what you want. please reopen if you still
think this fix won't work for you.
Problems with Exception longer 4000 characters in AtcionLog
-----------------------------------------------------------
Key: JBPM-556
URL:
http://jira.jboss.com/jira/browse/JBPM-556
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.0.2, jBPM 3.1 beta 3
Reporter: Bernd Ruecker
Assigned To: Tom Baeyens
Original Estimate: 5 minutes
Remaining Estimate: 5 minutes
In the ActionLog
public void setException(Throwable exception) {
StringWriter stringWriter = new StringWriter();
exception.printStackTrace(new PrintWriter(stringWriter));
this.exception = stringWriter.toString();
}
a exception is thrown if the exception has more than 4000 characters (at least with
Oracle). This code can be fixed easyly:
public void setException(Throwable exception) {
StringWriter stringWriter = new StringWriter();
exception.printStackTrace(new PrintWriter(stringWriter));
String st = stringWriter.toString();
// perhaps can not write more tha 4000 chars to database field (e.g. Oracle)
if (st.length()>4000)
st = st.substring(0, 4000);
this.exception = st;
}
By the way, this is already done correctly in Timers (Timer.java) :-) Perhaps some
refactoring to centralize thi issue would be nice (for example a String
getExceptionAsString(Throwble t) helper-method).
if (t!=null) {
log.error("unhandled timer exception", t);
// this means an unhandled exception occurred in this timer
StringWriter sw = new StringWriter();
actionException.printStackTrace(new PrintWriter(sw));
exception = sw.toString();
if (exception.length()>4000) exception = exception.substring(0, 4000);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira