Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-26407

Server adapter: fails with a NPE if there's no oc configured

XMLWordPrintable

    • devex #156 October 2018
    • 1

      steps:

      1. ASSERT: start with a workspace where's no preference that points to an oc binary
      2. ASSERT: have the connection NOT overriding the oc binary location
      3. EXEC: create a new application (ex. by using the nodejs-mongo-persistent template), have the project imported to your workspace and the server adapter created
      4. EXEC: start the server adapter

      Result:
      you get an error dialog reporting an NPE

      The following can be spotted in the Eclipse log:

      java.lang.NullPointerException
      	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1022)
      	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1017)
      	at com.openshift.restclient.OpenShiftContext.put(OpenShiftContext.java:51)
      	at org.jboss.tools.openshift.internal.core.ocbinary.OCBinaryOperation.run(OCBinaryOperation.java:27)
      	at org.jboss.tools.openshift.internal.core.portforwarding.PortForwardingUtils$1.visit(PortForwardingUtils.java:156)
      	at org.jboss.tools.openshift.internal.core.portforwarding.PortForwardingUtils$1.visit(PortForwardingUtils.java:1)
      	at com.openshift.internal.restclient.model.KubernetesResource.accept(KubernetesResource.java:94)
      	at org.jboss.tools.openshift.internal.core.portforwarding.PortForwardingUtils.startPortForwarding(PortForwardingUtils.java:148)
      	at org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController.startPortForwarding(OpenShiftLaunchController.java:402)
      	at org.jboss.tools.openshift.js.server.behaviour.OpenShiftNodejsLaunchController.access$0(OpenShiftNodejsLaunchController.java:1)
      	at org.jboss.tools.openshift.js.server.behaviour.OpenShiftNodejsLaunchController$1.onDebugChange(OpenShiftNodejsLaunchController.java:36)
      	at org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.toggleDebugger(OpenShiftDebugMode.java:252)
      	at org.jboss.tools.openshift.internal.core.server.debug.OpenShiftDebugMode.execute(OpenShiftDebugMode.java:186)
      	at org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController.updateOpenShift(OpenShiftLaunchController.java:147)
      	at org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController.launch(OpenShiftLaunchController.java:96)
      	at org.jboss.ide.eclipse.as.wtp.core.server.launch.ControllableServerLaunchConfiguration.launch(ControllableServerLaunchConfiguration.java:52)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:859)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:717)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:712)
      	at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3566)
      	at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3502)
      	at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:377)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
      

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: