import jalview.analysis.SeqsetUtils;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
+import jalview.bin.Cache;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import jalview.gui.IProgressIndicator;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.WsParamSetI;
+import java.awt.Color;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import com.sun.xml.internal.ws.client.ClientTransportException;
+
import compbio.data.msa.SequenceAnnotation;
import compbio.data.sequence.FastaSequence;
+import compbio.data.sequence.Score;
import compbio.data.sequence.ScoreManager;
import compbio.metadata.Argument;
import compbio.metadata.ChunkHolder;
}
long progressId = -1;
+ int serverErrorsLeft = 3;
+
String rslt = "JOB NOT DEFINED";
StringBuffer msg=new StringBuffer();
try
return;
}
long cpos;
- ChunkHolder stats;
+ ChunkHolder stats = null;
do
{
cpos = rpos;
- try
+ boolean retry = false;
+ do
{
- stats = aaservice.pullExecStatistics(rslt, rpos);
- } catch (Exception x)
- {
-
- if (x.getMessage().contains(
- "Position in a file could not be negative!"))
+ try
{
- // squash index out of bounds exception- seems to happen for
- // disorder predictors which don't (apparently) produce any
- // progress information and JABA server throws an exception
- // because progress length is -1.
- stats = null;
- }
- else
+ stats = aaservice.pullExecStatistics(rslt, rpos);
+ } catch (Exception x)
{
- throw x;
+
+ if (x.getMessage().contains(
+ "Position in a file could not be negative!"))
+ {
+ // squash index out of bounds exception- seems to happen for
+ // disorder predictors which don't (apparently) produce any
+ // progress information and JABA server throws an exception
+ // because progress length is -1.
+ stats = null;
+ }
+ else
+ {
+ if (--serverErrorsLeft > 0)
+ {
+ retry = true;
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException q) {};
+ } else {
+ throw x;
+ }
+ }
}
- }
+ } while (retry);
if (stats != null)
{
System.out.print(stats.getChunk());
;
}
} while (!finished);
- try
+ if (serverErrorsLeft>0)
{
- Thread.sleep(200);
- } catch (InterruptedException x)
- {
- }
- ;
- scoremanager = aaservice.getAnnotation(rslt);
- if (scoremanager != null)
- {
- jalview.bin.Cache.log.debug("Updating result annotation from Job "+rslt+" at "+service.getUri());
- updateResultAnnotation(true);
+ try
+ {
+ Thread.sleep(200);
+ } catch (InterruptedException x)
+ {
+ }
+ ;
+ scoremanager = aaservice.getAnnotation(rslt);
+ if (scoremanager != null)
+ {
+ jalview.bin.Cache.log
+ .debug("Updating result annotation from Job " + rslt
+ + " at " + service.getUri());
+ updateResultAnnotation(true);
+ }
}
- } catch (JobSubmissionException x)
+ }
+
+ catch (JobSubmissionException x)
{
- System.err.println("submission error with "+getServiceActionText()+" :");
+ System.err.println("submission error with " + getServiceActionText()
+ + " :");
x.printStackTrace();
calcMan.workerCannotRun(this);
} catch (ResultNotAvailableException x)