glassfish
  1. glassfish
  2. GLASSFISH-16678

Add details to cluster creation failure SEVERE log message

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: future release
    • Component/s: configuration
    • Labels:
      None

      Description

      After running thousands of devtests I did a sanity check by grepping for SEVERE in the server log. I saw this:
      =================
      [#|2011-05-18T12:09:43.473-0700|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.config.support|_ThreadID=17;_ThreadName=Thread-1;|Exception while adding the new configuration : Constraints for this Cluster configuration have been violated: on property [ name ] violation reason [ Invalid cluster name. The name must start with a letter, number or underscore and may contain only letters, numbers, and these characters: hyphen, period, underscore, and semicolon. ]|#]

      =================

      What was the name of the cluster? That info must be right at the fingertips of the code that created this message. Why not include it?

        Activity

        Hide
        Byron Nevins added a comment -

        cli logfile shows that the test was a negative test and that the name was "%%":

        05/18/2011 12:09:43 EXIT: 1 asadmin --user admin --passwordfile D:\gf\v2\appserv-tests/config/adminpassword.txt --host localhost --port 4848 --echo=true --terse
        =true create-cluster %%

        Show
        Byron Nevins added a comment - cli logfile shows that the test was a negative test and that the name was "%%": 05/18/2011 12:09:43 EXIT: 1 asadmin --user admin --passwordfile D:\gf\v2\appserv-tests/config/adminpassword.txt --host localhost --port 4848 --echo=true --terse =true create-cluster %%
        Hide
        Tom Mueller added a comment -

        This message is produced using the bean validation (BV) API from within HK2. AFAIK, it is not possible to substitute in the invalid value from the message by just changing the message. To get this to work, either we need an enhancement to BV or we would need to change HK2 in some way to allow the invalid value to be substituted.

        A BV ConstraintViolation does have a getInvalidValue method (returns an Object) that could theoretically be used to insert the value. There just isn't any way to reference it from the message.

        Making this an RFE.

        Show
        Tom Mueller added a comment - This message is produced using the bean validation (BV) API from within HK2. AFAIK, it is not possible to substitute in the invalid value from the message by just changing the message. To get this to work, either we need an enhancement to BV or we would need to change HK2 in some way to allow the invalid value to be substituted. A BV ConstraintViolation does have a getInvalidValue method (returns an Object) that could theoretically be used to insert the value. There just isn't any way to reference it from the message. Making this an RFE.
        Hide
        Tom Mueller added a comment -

        A request has been submitted to the BV expert group to include the ability to get the offending value for use in messages. Hopefully this will be part of the BV spec that is part of Java EE 7. Until we have an implementation of that, we can't provide this feature.

        Marking this for a future release.

        Show
        Tom Mueller added a comment - A request has been submitted to the BV expert group to include the ability to get the offending value for use in messages. Hopefully this will be part of the BV spec that is part of Java EE 7. Until we have an implementation of that, we can't provide this feature. Marking this for a future release.

          People

          • Assignee:
            kumara
            Reporter:
            Byron Nevins
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: