com.atlassian.jira.issue.customfields.impl.FieldValidationException: Not a valid URL

Atlassian JIRA | Dave Laser [Atlassian] | 11 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary FieldValidationException on URL custom field with no default value after having a default value. h3. Environment * Jira 7.1 * Jira 6.4.7 and 6.4.13 h3. Steps to Reproduce # Install JIRA 7.1.x using default values. # Create a new custom field of type URL field. # Populate the custom field with a default value: https://support.atlassian.com but any link will work. # Remove the default value by clicking "Edit Default Value, removing the text and then clicking the "Set Default" button. # Then see this exception in the atlassian-jira.log. # Click create an issue and see two exceptions in the atlassian-jira.log. # Finish creating an issue and see two simular exceptions as above in the atlassian-jira.log. Before adding a default value, there are no rows in genericconfiguration. After adding the value then deleting it, there is a row in my test instance: {code:sql} 10500 | DefaultValue | 10903 | <string></string> {code} I have confirmed that these steps work to reproduce the issue in JIRA 6.4.7 and 6.4.13 as listed in [JRA-35222|https://jira.atlassian.com/browse/JRA-35222]. The missing step to reproduce this issue in JRA-35222 was to have a value set and then deleted. This issue has no known issues that it creates. The only affect known at this time is the logs. h3. Expected Results I would not expect to have these logs. h3. Actual Results The below exception is thrown in the atlassian-jira.log file for step 5: {noformat} 2016-06-08 14:18:13,738 http-nio-10712-exec-2 ERROR dlaser 858x178x1 8gt7vl 10.0.2.2 /secure/admin/ConfigureCustomField!default.jspa [c.a.j.i.customfields.impl.AbstractSingleFieldType] Incorrect formatted custom field stored as default com.atlassian.jira.issue.customfields.impl.FieldValidationException: Not a valid URL at com.atlassian.jira.issue.customfields.impl.URLCFType.getSingularObjectFromString(URLCFType.java:20) at com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:83) at com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:51) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getDefaultValue(AbstractSingleFieldType.java:161) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl$8.call(CustomFieldTypeModuleDescriptorImpl.java:281) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl$8.call(CustomFieldTypeModuleDescriptorImpl.java:277) at com.atlassian.ozymandias.SafePluginPointAccess.call(SafePluginPointAccess.java:187) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getSupplierValueOrHtmlErrorMessage(CustomFieldTypeModuleDescriptorImpl.java:372) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getDefaultViewHtml(CustomFieldTypeModuleDescriptorImpl.java:277) at com.atlassian.jira.issue.customfields.config.item.DefaultValueConfigItem.getViewHtml(DefaultValueConfigItem.java:23) at com.atlassian.jira.issue.fields.config.FieldConfigItemImpl.getViewHtml(FieldConfigItemImpl.java:24) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) at webwork.util.ValueStack.findValue(ValueStack.java:517) at webwork.util.ValueStack.findValue(ValueStack.java:216) at webwork.view.taglib.WebWorkBodyTagSupport.findValue(WebWorkBodyTagSupport.java:62) at webwork.view.taglib.BasicPropertyTag.doStartTag(BasicPropertyTag.java:54) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_ww_005fproperty_005f15(configurecustomfield_jsp.java:2521) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_ww_005fiterator_005f2(configurecustomfield_jsp.java:2005) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_ww_005fiterator_005f1(configurecustomfield_jsp.java:1953) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_ww_005fif_005f6(configurecustomfield_jsp.java:1916) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_page_005fapplyDecorator_005f1(configurecustomfield_jsp.java:1067) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_ww_005fiterator_005f0(configurecustomfield_jsp.java:974) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspx_meth_page_005fapplyDecorator_005f0(configurecustomfield_jsp.java:261) at jsp.secure.admin.views.customfields.configurecustomfield_jsp._jspService(configurecustomfield_jsp.java:112) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 18 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:37) ... 74 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 36 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 50 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59) ... 66 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 89 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) {noformat} The below exceptions are thrown in the atlassian-jira.log file for step 6 and 7: {noformat} 2016-06-08 14:18:37,805 http-nio-10712-exec-4 ERROR dlaser 858x197x1 8gt7vl 10.0.2.2 /secure/CreateIssue.jspa [c.a.j.i.customfields.impl.AbstractSingleFieldType] Incorrect formatted custom field stored as default com.atlassian.jira.issue.customfields.impl.FieldValidationException: Not a valid URL at com.atlassian.jira.issue.customfields.impl.URLCFType.getSingularObjectFromString(URLCFType.java:20) at com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:83) at com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:51) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getDefaultValue(AbstractSingleFieldType.java:161) at com.atlassian.jira.issue.fields.CustomFieldImpl.populateDefaults(CustomFieldImpl.java:565) at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.populateDefaults(FieldScreenRenderLayoutItemImpl.java:71) at com.atlassian.jira.web.action.issue.CreateIssue.populateFieldHolderWithDefaults(CreateIssue.java:243) at com.atlassian.jira.web.action.issue.CreateIssue.doExecute(CreateIssue.java:150) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 50 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59) ... 62 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 89 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 2016-06-08 14:18:38,116 http-nio-10712-exec-4 ERROR dlaser 858x197x1 8gt7vl 10.0.2.2 /secure/CreateIssue.jspa [c.a.j.i.customfields.impl.AbstractSingleFieldType] Incorrect formatted custom field stored as default com.atlassian.jira.issue.customfields.impl.FieldValidationException: Not a valid URL at com.atlassian.jira.issue.customfields.impl.URLCFType.getSingularObjectFromString(URLCFType.java:20) at com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:83) at com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:51) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getDefaultValue(AbstractSingleFieldType.java:161) at com.atlassian.jira.issue.customfields.config.item.DefaultValueConfigItem.getConfigurationObject(DefaultValueConfigItem.java:31) at com.atlassian.jira.issue.fields.config.FieldConfigItemImpl.getConfigurationObject(FieldConfigItemImpl.java:36) at com.atlassian.jira.issue.customfields.CustomFieldUtils.buildParams(CustomFieldUtils.java:404) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl$2.call(CustomFieldTypeModuleDescriptorImpl.java:177) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl$2.call(CustomFieldTypeModuleDescriptorImpl.java:172) at com.atlassian.ozymandias.SafePluginPointAccess.call(SafePluginPointAccess.java:187) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getSupplierValueOrHtmlErrorMessage(CustomFieldTypeModuleDescriptorImpl.java:372) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getEditHtml(CustomFieldTypeModuleDescriptorImpl.java:172) at com.atlassian.jira.issue.fields.CustomFieldImpl.getEditHtml(CustomFieldImpl.java:925) at com.atlassian.jira.issue.fields.CustomFieldImpl.getCreateHtml(CustomFieldImpl.java:911) at com.atlassian.jira.issue.fields.screen.AbstractFieldScreenLayoutItem.getCreateHtml(AbstractFieldScreenLayoutItem.java:68) at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.getCreateHtml(FieldScreenRenderLayoutItemImpl.java:42) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) at webwork.util.ValueStack.findValue(ValueStack.java:517) at webwork.util.ValueStack.findValue(ValueStack.java:216) at webwork.view.taglib.WebWorkBodyTagSupport.findValue(WebWorkBodyTagSupport.java:62) at webwork.view.taglib.BasicPropertyTag.doStartTag(BasicPropertyTag.java:54) at jsp.template.standard.issuefields_jsp._jspx_meth_ww_005fproperty_005f5(issuefields_jsp.java:790) at jsp.template.standard.issuefields_jsp._jspx_meth_ww_005fif_005f8(issuefields_jsp.java:762) at jsp.template.standard.issuefields_jsp._jspx_meth_ww_005fif_005f7(issuefields_jsp.java:729) at jsp.template.standard.issuefields_jsp._jspx_meth_ww_005fiterator_005f4(issuefields_jsp.java:696) at jsp.template.standard.issuefields_jsp._jspx_meth_ww_005fiterator_005f3(issuefields_jsp.java:655) at jsp.template.standard.issuefields_jsp._jspx_meth_ww_005felse_005f1(issuefields_jsp.java:618) at jsp.template.standard.issuefields_jsp._jspService(issuefields_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 25 filtered at webwork.view.taglib.IncludeTag.include(IncludeTag.java:64) at webwork.view.taglib.ui.ComponentTag.doEndTag(ComponentTag.java:269) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_ww_005fcomponent_005f0(createissue_002ddetails_jsp.java:1347) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_page_005fapplyDecorator_005f0(createissue_002ddetails_jsp.java:818) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_ui_005fparam_005f2(createissue_002ddetails_jsp.java:746) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_ui_005fsoy_005f2(createissue_002ddetails_jsp.java:706) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_ui_005fparam_005f1(createissue_002ddetails_jsp.java:664) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_ui_005fsoy_005f1(createissue_002ddetails_jsp.java:624) at jsp.secure.views.createissue_002ddetails_jsp._jspx_meth_ww_005fif_005f1(createissue_002ddetails_jsp.java:488) at jsp.secure.views.createissue_002ddetails_jsp._jspService(createissue_002ddetails_jsp.java:177) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 18 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:37) ... 74 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 36 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) ... 50 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59) ... 62 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 89 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) {noformat} h3.Workaround Delete the DefaultValue associated with the com.atlassian.jira.plugin.system.customfieldtypes:url from genericconfiguration. Then restart JIRA.

    Atlassian JIRA | 11 months ago | Dave Laser [Atlassian]
    com.atlassian.jira.issue.customfields.impl.FieldValidationException: Not a valid URL

    Root Cause Analysis

    1. com.atlassian.jira.issue.customfields.impl.FieldValidationException

      Not a valid URL

      at com.atlassian.jira.issue.customfields.impl.URLCFType.getSingularObjectFromString()
    2. com.atlassian.jira
      CreateIssue.doExecute
      1. com.atlassian.jira.issue.customfields.impl.URLCFType.getSingularObjectFromString(URLCFType.java:20)
      2. com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:83)
      3. com.atlassian.jira.issue.customfields.impl.GenericTextCFType.getObjectFromDbValue(GenericTextCFType.java:51)
      4. com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getDefaultValue(AbstractSingleFieldType.java:161)
      5. com.atlassian.jira.issue.fields.CustomFieldImpl.populateDefaults(CustomFieldImpl.java:565)
      6. com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.populateDefaults(FieldScreenRenderLayoutItemImpl.java:71)
      7. com.atlassian.jira.web.action.issue.CreateIssue.populateFieldHolderWithDefaults(CreateIssue.java:243)
      8. com.atlassian.jira.web.action.issue.CreateIssue.doExecute(CreateIssue.java:150)
      8 frames