Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-17260

FieldValidationException: Not a valid URL should not log stack trace and should log offending issue

    XMLWordPrintable

Details

    Description

      Summary

      We have a custom field of type URL Field and some people have issues where that field is not filled in correctly. Every time (I am guessing its viewed), a huge stack trace is logged.

      Steps to Reproduce

      1. Create a URL Custom Field.
      2. Get an incorrect URL in there (either by updating the database or otherwise).
      3. View the issue.

      Expected Results

      The logs advise which issue the problem relates to.

      Actual Results

      The below exception is thrown:

      2009-05-05 16:32:32,668 http-8282-Processor39 WARN [issue.customfields.impl.AbstractSingleFieldType] Value stored in database is invalid 
      com.atlassian.jira.issue.customfields.impl.FieldValidationException: Not a valid URL 
              at com.atlassian.jira.issue.customfields.impl.URLCFType.getSingularObjectFromString(URLCFType.java:25) 
              at com.atlassian.jira.issue.customfields.impl.StringCFType.getObjectFromDbValue(StringCFType.java:25) 
              at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromIssue(AbstractSingleFieldType.java:87)
              at com.atlassian.jira.issue.fields.CustomFieldImpl.getValue(CustomFieldImpl.java:266) 
              at com.atlassian.jira.issue.fields.CustomFieldImpl.hasValue(CustomFieldImpl.java:969) 
              at sun.reflect.GeneratedMethodAccessor1289.invoke(Unknown Source) 
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
              at java.lang.reflect.Method.invoke(Method.java:597) 
      

      Notes

      When testing in 7.2 I was not able to reproduce the above exception, as the below is output:

      2016-09-23 12:41:40,390 http-nio-62189-exec-15 WARN admin 761x1093x1 1c3rfhr 172.22.48.96 /secure/AjaxIssueEditAction!default.jspa [c.a.j.i.customfields.impl.AbstractSingleFieldType] Issue WITI-75 has an invalid value '123.com' stored in the field 'URL Field'. Not a valid URL
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              2f4876f78753 David Hergert [Windstream]
              Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: