[jbosstools-issues] [JBoss JIRA] (JBIDE-22228) NPE when deploying to Openshift EAP

Viacheslav Kabanovich (JIRA) issues at jboss.org
Fri May 6 10:41:00 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-22228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202173#comment-13202173 ] 

Viacheslav Kabanovich commented on JBIDE-22228:
-----------------------------------------------

[~adietish], method OpenShiftServerUtils.getDeploymentConfig() after getting getConnection(attributes) checks it for null and just return null without much ado. So, the general logic of this method may be silently return null if connection is not found. But before that it calls getService(attributes) - and this method does not check connection for null which causes NPE, because getConnection(attributes) does return null when fails.
Should we add that check for null even if this issue is not reproduced any more? New issue may appear in future. Check connection == null should be consistent - either at every place in the chain of calls, or nowhere.

> NPE when deploying to Openshift EAP
> -----------------------------------
>
>                 Key: JBIDE-22228
>                 URL: https://issues.jboss.org/browse/JBIDE-22228
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.3.1.CR1
>         Environment: Windows 10
>            Reporter: Thomas Mäder
>            Assignee: Max Rydahl Andersen
>             Fix For: 4.4.x
>
>
> When I try to publish to an EAP in the CDK, I get a NullPointerException:
> {code}
> java.lang.NullPointerException
> 	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:309)
> 	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:298)
> 	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getDeploymentConfig(OpenShiftServerUtils.java:390)
> 	at org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController.launch(OpenShiftLaunchController.java:87)
> 	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:885)
> 	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
> 	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:731)
> 	at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3556)
> 	at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3492)
> 	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:311)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jbosstools-issues mailing list