Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5916

Saving global config with no JDBC connections gives NPE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • dbcharts-plugin
    • None
    • RHEL5.2, Java 1.6, Hudson 1.349, SCP plugin 1.6

    Description

      Trying to configure an SCP host:
      Hudson->Manage Hudson->Configure System->SCP repository hosts->Add
      fill in all fields except keyfile

      Click on Save
      Returns "Error: java.lang.NullPointerException"

      The values are not saved.

      Attachments

        Activity

          mindless Alan Harder added a comment -

          Please find the entire stack trace in your log and post that here. I tried saving without keyfile as you suggested and did not see any problem.
          Why did you file this under "deploy" instead of "scp"?

          mindless Alan Harder added a comment - Please find the entire stack trace in your log and post that here. I tried saving without keyfile as you suggested and did not see any problem. Why did you file this under "deploy" instead of "scp"?
          rayward rayward added a comment -

          Sory, I didn't see a selection for SCP in the Jira drop-down. Here are the log entries:

          Mar 15, 2010 12:50:10 PM hudson.plugins.dbcharts.DbChartPublisher$DescriptorImpl configure
          INFO: DescriptorImpl.configure:{}

          Mar 15, 2010 12:49:26 PM hudson.plugins.dbcharts.DbChartPublisher$DescriptorImpl getJDBCConnectionDescriptors
          INFO: getJDBCConnectionDescriptors(): custom=hudson.plugins.dbcharts.CustomJDBCConnection$CustomJDBCConnectionDescriptor@3316f2e6; mysql=hudson.plugins.dbcharts.MySQLJDBCConnection$MySQLJDBCConnectionDescriptor@27a4f43e

          I don't see what this has to do with charts. But these two entries occur each time I get the NPE, so this has to be related. Maybe only through the return path from Configure System to Manage Hudson in the presence of graphics errors.

          I am trying to display charts produced by the PMD plugin, and haven't gotten those working yet. I get the graphical error:
          Graphics N/A. Unable to access X. You need to run the web container in the headless mode. Add -Djava.awt.headless=true to VM.
          Even though looking in the Hudson system settings shows that's already set.

          rayward rayward added a comment - Sory, I didn't see a selection for SCP in the Jira drop-down. Here are the log entries: Mar 15, 2010 12:50:10 PM hudson.plugins.dbcharts.DbChartPublisher$DescriptorImpl configure INFO: DescriptorImpl.configure:{} Mar 15, 2010 12:49:26 PM hudson.plugins.dbcharts.DbChartPublisher$DescriptorImpl getJDBCConnectionDescriptors INFO: getJDBCConnectionDescriptors(): custom=hudson.plugins.dbcharts.CustomJDBCConnection$CustomJDBCConnectionDescriptor@3316f2e6; mysql=hudson.plugins.dbcharts.MySQLJDBCConnection$MySQLJDBCConnectionDescriptor@27a4f43e I don't see what this has to do with charts. But these two entries occur each time I get the NPE, so this has to be related. Maybe only through the return path from Configure System to Manage Hudson in the presence of graphics errors. I am trying to display charts produced by the PMD plugin, and haven't gotten those working yet. I get the graphical error: Graphics N/A. Unable to access X. You need to run the web container in the headless mode. Add -Djava.awt.headless=true to VM. Even though looking in the Hudson system settings shows that's already set.
          mindless Alan Harder added a comment - - edited

          Is that it for log entries? Not sure where to look if we can't find the full stack trace for the NPE.

          mindless Alan Harder added a comment - - edited Is that it for log entries? Not sure where to look if we can't find the full stack trace for the NPE.
          mindless Alan Harder added a comment -

          ok, I installed dbcharts and was able to reproduce the error (and you're right.. no full stack trace in the log). So this is a form field conflict between dbcharts and scp plugins.. gives me something to dig into.

          mindless Alan Harder added a comment - ok, I installed dbcharts and was able to reproduce the error (and you're right.. no full stack trace in the log). So this is a form field conflict between dbcharts and scp plugins.. gives me something to dig into.
          mindless Alan Harder added a comment -

          I don't think scp plugin is involved at all. Just install dbCharts plugin and save the global config w/o adding any JDBC connections gets this error.

          mindless Alan Harder added a comment - I don't think scp plugin is involved at all. Just install dbCharts plugin and save the global config w/o adding any JDBC connections gets this error.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/plugins/dbCharts/pom.xml
          trunk/hudson/plugins/dbCharts/src/main/java/hudson/plugins/dbcharts/Chart.java
          trunk/hudson/plugins/dbCharts/src/main/java/hudson/plugins/dbcharts/DbChartPublisher.java
          trunk/hudson/plugins/dbCharts/src/main/resources/hudson/plugins/dbcharts/DbChartPublisher/config.jelly
          trunk/hudson/plugins/dbCharts/src/main/resources/hudson/plugins/dbcharts/DbChartPublisher/global.jelly
          trunk/hudson/plugins/dbCharts/src/main/resources/index.jelly
          http://jenkins-ci.org/commit/28684
          Log:
          [FIXED JENKINS-5916] avoid NPE if global config is saved with no JDBC connections entered.
          Also changed log output to "fine" level, removed unused help links and added plugin desc.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/plugins/dbCharts/pom.xml trunk/hudson/plugins/dbCharts/src/main/java/hudson/plugins/dbcharts/Chart.java trunk/hudson/plugins/dbCharts/src/main/java/hudson/plugins/dbcharts/DbChartPublisher.java trunk/hudson/plugins/dbCharts/src/main/resources/hudson/plugins/dbcharts/DbChartPublisher/config.jelly trunk/hudson/plugins/dbCharts/src/main/resources/hudson/plugins/dbcharts/DbChartPublisher/global.jelly trunk/hudson/plugins/dbCharts/src/main/resources/index.jelly http://jenkins-ci.org/commit/28684 Log: [FIXED JENKINS-5916] avoid NPE if global config is saved with no JDBC connections entered. Also changed log output to "fine" level, removed unused help links and added plugin desc.
          rayward rayward added a comment -

          Thanks! Great job!

          rayward rayward added a comment - Thanks! Great job!

          People

            mindless Alan Harder
            rayward rayward
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: