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

Saving global config with no JDBC connections gives NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: dbcharts-plugin
    • Labels:
      None
    • Environment:
      RHEL5.2, Java 1.6, Hudson 1.349, SCP plugin 1.6
    • Similar Issues:

      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

          Hide
          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"?

          Show
          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"?
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          rayward rayward added a comment -

          Thanks! Great job!

          Show
          rayward rayward added a comment - Thanks! Great job!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: