java.lang.NumberFormatException: For input string: "Test Value" value="11201"> Test Value"

Atlassian JIRA | Pietro Schaff [Atlassian] | 2 years ago
  1. 0

    h3. Steps to reproduce # Create a select custom field # In one of the options of this custom field, add a javascript/html customisation, such as: {code} <font size="1" color="red"><b>Test Value</b></font> {code} # Browse to the issue navigator # In the Basic search mode, select the custom field and the custom field value you created h3. Current behaviour A red internal server error message is presented (as shown in the attachments). In the logs you can find the following: {noformat} java.lang.NumberFormatException: For input string: "Test Value" value="11201"> Test Value" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Long.parseLong(Unknown Source) at java.lang.Long.parseLong(Unknown Source) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer$1.apply (MultiSelectCustomFieldSearchRenderer.java:51) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer$1.apply (MultiSelectCustomFieldSearchRenderer.java:47) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at java.util.AbstractCollection.addAll(Unknown Source) at java.util.HashSet.<init>(Unknown Source) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer.getSelectedOptions (MultiSelectCustomFieldSearchRenderer.java:217) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer.getInvalidOptions (MultiSelectCustomFieldSearchRenderer.java:168) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer.getViewHtml (MultiSelectCustomFieldSearchRenderer.java:140) at com.atlassian.jira.components.query.DefaultSearcherService.getValueResults(DefaultSearcherService .java:266) at com.atlassian.jira.components.query.DefaultSearcherService.getViewHtml(DefaultSearcherService.java :130) at com.atlassian.jira.components.query.QueryRendererValueAction.doDefault(QueryRendererValueAction.java :38) at sun.reflect.GeneratedMethodAccessor1654.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:438) at webwork.action.ActionSupport.execute(ActionSupport.java:157) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:87) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher .java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java :87) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.jira.web.filters.XContentTypeOptionsNoSniffFilter.doFilter(XContentTypeOptionsNoSniffFilter .java:22) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) {noformat} h3. Expected behaviour Render the custom field in Basic search as it does in Advanced search or when you use html/javascript without quotes or double quotes. h3. Workaround h4. Option 1: Search for the custom field in the "Advanced mode" instead of Basic. (i) You can also search for the custom field in Advanced and then switch back to Basic, which will then render the field properly. h3. Option 2: Change the value so you don't need to use quotes or double quotes, as in: - Instead of: {code} <font color="red"><b>Critical Defect</b></font> {code} - Use: {code} <font color=#FF0000><b>Test Value</b></font> {code}

    Atlassian JIRA | 2 years ago | Pietro Schaff [Atlassian]
    java.lang.NumberFormatException: For input string: "Test Value" value="11201"> Test Value"
  2. 0

    h3. Steps to reproduce # Create a select custom field # In one of the options of this custom field, add a javascript/html customisation, such as: {code} <font size="1" color="red"><b>Test Value</b></font> {code} # Browse to the issue navigator # In the Basic search mode, select the custom field and the custom field value you created h3. Current behaviour A red internal server error message is presented (as shown in the attachments). In the logs you can find the following: {noformat} java.lang.NumberFormatException: For input string: "Test Value" value="11201"> Test Value" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Long.parseLong(Unknown Source) at java.lang.Long.parseLong(Unknown Source) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer$1.apply (MultiSelectCustomFieldSearchRenderer.java:51) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer$1.apply (MultiSelectCustomFieldSearchRenderer.java:47) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at java.util.AbstractCollection.addAll(Unknown Source) at java.util.HashSet.<init>(Unknown Source) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer.getSelectedOptions (MultiSelectCustomFieldSearchRenderer.java:217) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer.getInvalidOptions (MultiSelectCustomFieldSearchRenderer.java:168) at com.atlassian.jira.issue.customfields.searchers.renderer.MultiSelectCustomFieldSearchRenderer.getViewHtml (MultiSelectCustomFieldSearchRenderer.java:140) at com.atlassian.jira.components.query.DefaultSearcherService.getValueResults(DefaultSearcherService .java:266) at com.atlassian.jira.components.query.DefaultSearcherService.getViewHtml(DefaultSearcherService.java :130) at com.atlassian.jira.components.query.QueryRendererValueAction.doDefault(QueryRendererValueAction.java :38) at sun.reflect.GeneratedMethodAccessor1654.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70) at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56) at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:438) at webwork.action.ActionSupport.execute(ActionSupport.java:157) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:87) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher .java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java :87) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.jira.web.filters.XContentTypeOptionsNoSniffFilter.doFilter(XContentTypeOptionsNoSniffFilter .java:22) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) {noformat} h3. Expected behaviour Render the custom field in Basic search as it does in Advanced search or when you use html/javascript without quotes or double quotes. h3. Workaround h4. Option 1: Search for the custom field in the "Advanced mode" instead of Basic. (i) You can also search for the custom field in Advanced and then switch back to Basic, which will then render the field properly. h3. Option 2: Change the value so you don't need to use quotes or double quotes, as in: - Instead of: {code} <font color="red"><b>Critical Defect</b></font> {code} - Use: {code} <font color=#FF0000><b>Test Value</b></font> {code}

    Atlassian JIRA | 2 years ago | Pietro Schaff [Atlassian]
    java.lang.NumberFormatException: For input string: "Test Value" value="11201"> Test Value"
  3. 0

    CharsetEncodingFilter should check for XSS attacks

    GitHub | 3 years ago | joseorsini
    com.dotmarketing.exception.DotRuntimeException: java.lang.NumberFormatException: For input string: "<script>alert('xss')</script>"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java exceptions when running tests

    GitHub | 3 years ago | mtkuntz
    java.lang.NumberFormatException: For input string: "*ERROR for mkuntz!* File `/home/mkuntz/twister/logs/pearl326_EP-1001_CLI.log` doesn't exist! Using master config `/home/mkuntz/twister/config/fwmconfig.xml` and suites config `/home/mkuntz/twister/config/testsuites.xml`"
  6. 0

    Task #14760 for dynmap v1.7.1-714 generated an exception

    GitHub | 4 years ago | fungreenfox
    java.lang.NumberFormatException: For input string: "1.36978587152E12"

  1. treefolk 1 times, last 1 week ago
  2. MoYapro 5 times, last 2 weeks ago
  3. Handemelindo 2 times, last 3 weeks ago
  4. marcbouvierdav 1 times, last 2 months ago
  5. tyson925 4 times, last 2 months ago
13 more registered users
17 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NumberFormatException

    For input string: "Test Value" value="11201"> Test Value"

    at java.lang.NumberFormatException.forInputString()
  2. Java RT
    Long.parseLong
    1. java.lang.NumberFormatException.forInputString(Unknown Source)
    2. java.lang.Long.parseLong(Unknown Source)
    3. java.lang.Long.parseLong(Unknown Source)
    3 frames