[
https://issues.apache.org/jira/browse/AMBARI-23403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420406#comment-16420406
]
Hudson commented on AMBARI-23403:
---------------------------------
FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #8951 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/8951/])
AMBARI-23403. Upgrade throws NullPointerException when configuration
(dlysnichenko:
[https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=ed7d2ace071fe0c6dc7ffa831dbb9faee4086980])
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
> 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)