0

When I call the below function I have the Internal error: anatlyzer.atl.analyser.AnalyserInternalError: java.util.concurrent.ExecutionException: java.lang.NullPointerException error. The try, catch and finally all run. How can I resolve it?

public void perform() {
    ExecutorService executor = Executors.newSingleThreadExecutor();
    Future<?> result = executor.submit(new Runnable() {         
        @Override
        public void run() {
            AnalyserContext.setErrorModel(errors);
            AnalyserContext.setTypingModel(typ);                
            AnalyserContext.setGlobalNamespace(mm);
            stage++;
            List<? extends Unit> units = trafo.allObjectsOf(Unit.class);
            for (Unit unit : units) {
                new ExtendTransformation(trafo, mm, unit).perform();
 ...        } });

    try {
        // wait;
        result.get();
    } catch (Exception e) {
        throw new AnalyserInternalError(e, stage);
    } finally {         
        executor.shutdown();
    }
}
B A
  • 71
  • 9
  • 1
    Your links is broken. This is why we don't want crucial parts of question to be only links. They should be placed in question itself. If it is too large then you probably didn't try to reduce it to [mcve]. – Pshemo Jul 14 '17 at 11:16
  • 1
    You're getting a `NullPointerException` somewhere inside the code you're trying to run. There may be more information that you've omitted from the stack trace, where it will say "Caused by". – Andy Turner Jul 14 '17 at 11:18
  • @AndyTurner I think my question is different than that question. It doesn't allow me to add additional code. That is caused by "Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report[FutureTask.java:122] at java.util.concurrent.FutureTask.get[FutureTask.java:192] at anatlyzer.atl.analyser.Analyser.perform[Analyser.java:122] ... 23 more ". The full error log is in this file: http://uupload.ir/view/12d7_a.txt – B A Jul 14 '17 at 11:29
  • @Pshemo Ok. I edited my question. – B A Jul 14 '17 at 11:47

0 Answers0