You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Ishan Bhatt (JIRA)" <ji...@apache.org> on 2018/07/10 04:37:00 UTC

[jira] [Updated] (AMBARI-23403) Upgrade throws NullPointerException when configuration type is not selected

     [ https://issues.apache.org/jira/browse/AMBARI-23403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ishan Bhatt updated AMBARI-23403:
---------------------------------
    Fix Version/s:     (was: 2.7.0)
                   2.7.1

> Upgrade throws NullPointerException when configuration type is not selected
> ---------------------------------------------------------------------------
>
>                 Key: AMBARI-23403
>                 URL: https://issues.apache.org/jira/browse/AMBARI-23403
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.6.0
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 2.7.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> {code}
> java.lang.NullPointerException
> at org.apache.ambari.server.state.UpgradeHelper.processConfigurationsIfRequired(UpgradeHelper.java:1032)
> at org.apache.ambari.server.state.UpgradeHelper.updateDesiredRepositoriesAndConfigs(UpgradeHelper.java:849)
> at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:118)
> at org.apache.ambari.server.serveraction.upgrades.UpdateDesiredRepositoryAction.updateDesiredRepositoryVersion(UpdateDesiredRepositoryAction.java:166)
> at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:128)
> at org.apache.ambari.server.serveraction.upgrades.UpdateDesiredRepositoryAction.execute(UpdateDesiredRepositoryAction.java:104)
> at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:550)
> at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:466)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> The main issue here is that if any configuration types in the "clusterconfig" table (in the ambari-server DB) happen to not be selected (no versions of that config type have "selected"= "1", then this NullPointerException is thrown.
> The Ambari Server Upgrade code should probably handle this exception case more gracefully, by adding a check for null in the {code}UpgradeHelper{code} class, and returning a more useful error message.  Perhaps the customer should get a message indicating the problem with the config types.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)