[jira] [Closed] (UIMA-5529) DUCC: Serialization of AnalysisEngineProcessException fails in JP

2017-08-11 Thread Jerry Cwiklik (JIRA)

 [ 
https://issues.apache.org/jira/browse/UIMA-5529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jerry Cwiklik closed UIMA-5529.
---
Resolution: Fixed

fixed version assignment

> DUCC: Serialization of AnalysisEngineProcessException fails in JP
> -
>
> Key: UIMA-5529
> URL: https://issues.apache.org/jira/browse/UIMA-5529
> Project: UIMA
>  Issue Type: Bug
>  Components: DUCC
>Reporter: Jerry Cwiklik
>Assignee: Jerry Cwiklik
> Fix For: 2.2.1-Ducc
>
>
> If AE process() fails, the JP tries to serialize the exception before sending 
> it to the JD. The AE throws a UIMA core AnalysisEngineProcessException which 
> fails to serialize with:
> java.io.NotSerializableException: sun.misc.Launcher$AppClassLoader
> It turns out that this is caused by changes made to the 
> InternationalizedException class as described in JIRA 
> https://issues.apache.org/jira/browse/UIMA-4793
> The fix discussed in the JIRA broke serialization of uima exceptions. The 
> InternationalizedException  class contains a member variable of type 
> ClassLoader which is not Serializable. 
> For Ducc, the fix is to avoid Object serialization of the 
> AnalysisEngineProcessException and use this instead:
> StringWriter sw = new StringWriter();
> t.printStackTrace(new PrintWriter(sw));
> serializedCause =  sw.toString();
> where t = AnalysisEngineProcessException 
> The entire stack trace is captured as a String then wrapped in a java 
> RuntimeException and sent to the JD for logging. 
> Also, add a new job to the DUCC_HOME/example/simple 1-error.job which forces 
> AE to throw an error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (UIMA-5529) DUCC: Serialization of AnalysisEngineProcessException fails in JP

2017-08-10 Thread Jerry Cwiklik (JIRA)

 [ 
https://issues.apache.org/jira/browse/UIMA-5529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jerry Cwiklik closed UIMA-5529.
---
Resolution: Fixed

Modified to first attempt serialization as java Object if that fails fallback 
to stringify the Exception from process() and wrap it with RuntimeException 
which is subsequently sent to the client.
Added support for a switch which will always stringify the exception for cases 
when a client does not have user classpath to successfully deserialize 
AnalysisEngineProcessException and classes extended from that.

> DUCC: Serialization of AnalysisEngineProcessException fails in JP
> -
>
> Key: UIMA-5529
> URL: https://issues.apache.org/jira/browse/UIMA-5529
> Project: UIMA
>  Issue Type: Bug
>  Components: DUCC
>Reporter: Jerry Cwiklik
>Assignee: Jerry Cwiklik
> Fix For: 2.1.0-Ducc
>
>
> If AE process() fails, the JP tries to serialize the exception before sending 
> it to the JD. The AE throws a UIMA core AnalysisEngineProcessException which 
> fails to serialize with:
> java.io.NotSerializableException: sun.misc.Launcher$AppClassLoader
> It turns out that this is caused by changes made to the 
> InternationalizedException class as described in JIRA 
> https://issues.apache.org/jira/browse/UIMA-4793
> The fix discussed in the JIRA broke serialization of uima exceptions. The 
> InternationalizedException  class contains a member variable of type 
> ClassLoader which is not Serializable. 
> For Ducc, the fix is to avoid Object serialization of the 
> AnalysisEngineProcessException and use this instead:
> StringWriter sw = new StringWriter();
> t.printStackTrace(new PrintWriter(sw));
> serializedCause =  sw.toString();
> where t = AnalysisEngineProcessException 
> The entire stack trace is captured as a String then wrapped in a java 
> RuntimeException and sent to the JD for logging. 
> Also, add a new job to the DUCC_HOME/example/simple 1-error.job which forces 
> AE to throw an error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)