Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2463

error creating diagnostics instance of tc server

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0.M1
    • Component/s: SERVER
    • Labels:

      Description

      If the user uses a stock STS and attempts to create a "diagnostics" instance via the New Server Wizard, then a dialog will come up that there was an error, instructing the user to look at permissions.

      If you run the instance creation script from the command line, you see:
      create failed. A value for the property 'diagnostics.jdbc.driverClassName' is required but was not provided. A value can be provided using --property diagnostics.jdbc.driverClassName=<value>

      Now, one might say that the user should know enough to edit the configuration-prompts.properties file in $installDir/diagnostics/conf, but the error message should lead them to consider the possibility that the config file needs editing.

        Activity

        Hide
        Tomasz Zarna added a comment -

        The msg on the error dialog is definitely misleading. The good news is that the true reason why the instance wasn't created can be found in the Details section (see screenshot). Nevertheless, it is well hidden, and changing that should be the first step to fix this bug.

        Show
        Tomasz Zarna added a comment - The msg on the error dialog is definitely misleading. The good news is that the true reason why the instance wasn't created can be found in the Details section (see screenshot). Nevertheless, it is well hidden, and changing that should be the first step to fix this bug.
        Hide
        Tomasz Zarna added a comment -

        The reason why ErrorDialog displays our multi line msg in a single line is that it takes the msg from the provided Status and adds it to org.eclipse.swt.widgets.List, which ignores EOL chars. This could be either fixed in the ErrorDialog (JFace) or on our side by providing a customization to that dialog. Since the former is unlikely to happen (see similar bug 72488 marked as invalid) I would opt for the latter.

        Show
        Tomasz Zarna added a comment - The reason why ErrorDialog displays our multi line msg in a single line is that it takes the msg from the provided Status and adds it to org.eclipse.swt.widgets.List, which ignores EOL chars. This could be either fixed in the ErrorDialog (JFace) or on our side by providing a customization to that dialog. Since the former is unlikely to happen (see similar bug 72488 marked as invalid) I would opt for the latter.
        Show
        Tomasz Zarna added a comment - - edited This is how would the fixed dialog look like . I quickly hacked the ErrorDialog .
        Hide
        Tomasz Zarna added a comment - - edited

        While waiting for a response on the ErrorDialog improvement, I thought that one way of improving this on our side could be parsing configuration-prompts.properties files of selected templates and asking the user to provide input for props that don't have default values. Actually we could display all the props and populate some of them with the defaults if available. The <template>/configuration-prompts.properties and <template>/conf/server-fragment.xml (with the defaults) seem to contain all the info we need. As the result we would add a bunch of --property <template>.<property-name>=<value> to the instance creation script. Just like it is suggested in the msg in the command line.

        Show
        Tomasz Zarna added a comment - - edited While waiting for a response on the ErrorDialog improvement , I thought that one way of improving this on our side could be parsing configuration-prompts.properties files of selected templates and asking the user to provide input for props that don't have default values. Actually we could display all the props and populate some of them with the defaults if available. The <template>/configuration-prompts.properties and <template>/conf/server-fragment.xml (with the defaults) seem to contain all the info we need. As the result we would add a bunch of --property <template>.<property-name>=<value> to the instance creation script. Just like it is suggested in the msg in the command line.
        Hide
        Tomasz Zarna added a comment -

        Fixed with 10a5a89d18f379c267b378e4ff959d4e8338ad27.

        For each template that requires input from the user a new page will be
        added to the wizard. Until a missing value is entered the wizard cannot
        be completed.

        Show
        Tomasz Zarna added a comment - Fixed with 10a5a89d18f379c267b378e4ff959d4e8338ad27 . For each template that requires input from the user a new page will be added to the wizard. Until a missing value is entered the wizard cannot be completed.

          People

          • Assignee:
            Tomasz Zarna
            Reporter:
            Kaitlin Sherwood (c)
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: