Continuum
  1. Continuum
  2. CONTINUUM-1886

NPE when deleting a project group when ReleaseOutputDirectory is not defined

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.1
    • Component/s: Core system
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      java.lang.NullPointerException
      	at org.apache.maven.continuum.configuration.DefaultConfigurationService.setReleaseOutputDirectory(DefaultConfigurationService.java:263)
      	at org.apache.maven.continuum.configuration.DefaultConfigurationService.getReleaseOutputDirectory(DefaultConfigurationService.java:253)
      	at org.apache.maven.continuum.configuration.DefaultConfigurationService.getReleaseOutputDirectory(DefaultConfigurationService.java:317)
      	at org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:813)
      	at org.apache.maven.continuum.DefaultContinuum.removeProjectGroup(DefaultContinuum.java:346)
      	at org.apache.maven.continuum.web.action.ProjectGroupAction.remove(ProjectGroupAction.java:283)
      

        Issue Links

          Activity

          Hide
          Olivier Lamy added a comment -

          configuring the value fix the issue. But we could redirect the user to the configuration page if releaseOutputDirectory is empty as it looks mandatory here or we have to be NPE free in DefaultConfigurationService.

          Show
          Olivier Lamy added a comment - configuring the value fix the issue. But we could redirect the user to the configuration page if releaseOutputDirectory is empty as it looks mandatory here or we have to be NPE free in DefaultConfigurationService.
          Hide
          Wendy Smoak added a comment -

          In theory, a releaseOutputDirectory shouldn't be required – not everyone uses the release feature of Continuum and they shouldn't be forced to care about it.

          However, as it apparently is required, sending them to the configuration screen as we do on startup is better than throwing NPEs.

          Show
          Wendy Smoak added a comment - In theory, a releaseOutputDirectory shouldn't be required – not everyone uses the release feature of Continuum and they shouldn't be forced to care about it. However, as it apparently is required, sending them to the configuration screen as we do on startup is better than throwing NPEs.
          Hide
          Luc Willems added a comment -

          Hi,
          indeed if they don't use it they should not care about it. but if they do or will use it later,the can't configure it because configuration link is also broken with same NPE

          in my case, i have upgraded my 1.1 instalation to 1.2 , no configuration screen was shown after startup and i can't set this configuration
          because of NPE.

          Show
          Luc Willems added a comment - Hi, indeed if they don't use it they should not care about it. but if they do or will use it later,the can't configure it because configuration link is also broken with same NPE in my case, i have upgraded my 1.1 instalation to 1.2 , no configuration screen was shown after startup and i can't set this configuration because of NPE.
          Hide
          Wendy Smoak added a comment -

          As a workaround, you should be able to set the value for the release output directory in the conf/continuum.xml file. (Shut down, edit the file, then start.) Here's an example file:

          <?xml version="1.0" encoding="UTF-8"?>
          <continuum-configuration>
            <baseUrl>http://localhost:8080/continuum</baseUrl>
            <buildOutputDirectory>/path/to/build-output-directory</buildOutputDirectory>
            <workingDirectory>/path/to/working-directory</workingDirectory>
            <releaseOutputDirectory>/path/to/release-output-directory</releaseOutputDirectory>
          </continuum-configuration>
          
          Show
          Wendy Smoak added a comment - As a workaround, you should be able to set the value for the release output directory in the conf/continuum.xml file. (Shut down, edit the file, then start.) Here's an example file: <?xml version="1.0" encoding="UTF-8"?> <continuum-configuration> <baseUrl>http://localhost:8080/continuum</baseUrl> <buildOutputDirectory>/path/to/build-output-directory</buildOutputDirectory> <workingDirectory>/path/to/working-directory</workingDirectory> <releaseOutputDirectory>/path/to/release-output-directory</releaseOutputDirectory> </continuum-configuration>
          Hide
          Luc Willems added a comment -

          I got is fixed by insert the value manually in my mysql database.

          update SYSTEMCONFIGURATION set RELEASE_OUTPUT_DIRECTORY='/data/continuum/release' where SYSTEMCONFIGURATION_ID=1;

          don't know how this would workout for other backends like derby.

          Show
          Luc Willems added a comment - I got is fixed by insert the value manually in my mysql database. update SYSTEMCONFIGURATION set RELEASE_OUTPUT_DIRECTORY='/data/continuum/release' where SYSTEMCONFIGURATION_ID=1; don't know how this would workout for other backends like derby.
          Hide
          Maria Catherine Tan added a comment -

          Fixed in revisions 698083 and 698087.

          • releaseOutputDirectory is now optional
          • will only require the user to set the releaseOutputDirectory if he/she clicked the release button
          Show
          Maria Catherine Tan added a comment - Fixed in revisions 698083 and 698087. releaseOutputDirectory is now optional will only require the user to set the releaseOutputDirectory if he/she clicked the release button

            People

            • Assignee:
              Maria Catherine Tan
              Reporter:
              Olivier Lamy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: