Anon Apex null pointer exception

Issue #1385 duplicate
Jonny Power created an issue

When attempting to run an anon apex script, I get the following error in IC2;

2019-08-06 10:06:40,805 [333435022]   WARN - .IlluminatedCloudExceptionUtil -  
java.lang.NullPointerException
    at com.illuminatedcloud.intellij.toolwindow.apex.AnonymousApexToolWindow$7.run(SourceFile:510)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:408)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
2019-08-06 10:06:56,944 [333451161]   WARN - .IlluminatedCloudExceptionUtil -  
java.lang.NullPointerException
    at com.illuminatedcloud.intellij.toolwindow.apex.AnonymousApexToolWindow$7.run(SourceFile:510)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:408)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

The script;

final Id tenderTypeId = 'm0654000000DPfTAAW';
final StageRequestV1 stageParams = new TPAY2.StageRequestV1(tenderTypeId);
final TPAY2.StageResponseV1 resp = (TPAY2.StageResponseV1) new TPAY2.StageServiceV1().stageTransaction(stageParams);
System.debug(resp.getStagedTransactionId());

Works from developer console in the org (image attached)

IntelliJ Help>About:

IntelliJ IDEA 2019.2 (Ultimate Edition) Build #IU-192.5728.98, built on July 22, 2019 Licensed to Traction on Demand Inc. / Jonny Power Subscription is active until November 16, 2019 Runtime version: 11.0.3+12-b304.10 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 8158M Cores: 4 Registry: git.explicit.commit.renames.prohibit.multiple.calls=false Non-Bundled Plugins: Dilbert, Jenkins Control Plugin, PlantUML integration, String Manipulation, com.duseev.intellij.preservelayout, com.intellij.jira, net.seesharpsoft.intellij.plugins.csv, com.illuminatedcloud2.intellij, org.sylfra.idea.plugins.linessorter

IC2: 2.0.7.4

Comments (1)

  1. Log in to comment