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

Atlassian JIRA | Pietro Schaff [Atlassian] | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  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 | 3 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 | 3 years ago | Pietro Schaff [Atlassian]
    java.lang.NumberFormatException: For input string: "Test Value" value="11201"> Test Value"
  3. 0

    NumberFormatException at function evaluateStatically in NumberLiteral

    GitHub | 3 years ago | janosch715
    java.lang.NumberFormatException: For input string: "18446744073709551615"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Rate limiting in WSO2 is not happening

    Stack Overflow | 7 months ago | siddhesh
    java.lang.NumberFormatException: For in put string: "0:0:0:0:0:0:0:1"
  6. 0

    CharsetEncodingFilter should check for XSS attacks

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

  1. jesse 1 times, last 2 months ago
  2. poroszd 1 times, last 3 months ago
  3. treefolk 1 times, last 5 months ago
  4. MoYapro 5 times, last 5 months ago
  5. Handemelindo 6 times, last 1 month ago
15 more registered users
18 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