Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3267

Confusing error message when tag file's attribute type is unknown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 8.0.0.Final
    • Web (Undertow)
    • None

      I have a JSP tag file that requires a "size" attribute:

      <%@ attribute name="size" required="true" type="Long" %>
      

      Because the type accidentally wasn't a FQN (it should have been a java.lang.Long), this error was generated:

      JBWEB004193: Unknown attribute type (size) for attribute Number
      

      The message doesn't make any sense. "size" isn't the attribute type and the attribute is not "Number". A possible fix:

      JBWEB004193: Unknown type (Number) was declared for attribute (size)
      

      PS: It's really important to talk about the "declaration" here because the tag file isn't mentioned at all in the exception. The Jasper compiler only reports the enclosing JSP, which makes it look like the problem is with the usage not the tag file itself.

              mjusko@redhat.com Marek Jusko
              paul.benedict Paul Benedict
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: