URISyntaxException with Illegal Character in Path when Accessing a JIRA Page
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Symptoms
A JIRA page can't be accessed and throws 500 error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
2016-08-02 15:51:43,946 http-bio-443-exec-20 ERROR [o.a.c.c.C.[.[localhost].[/].[default]] Servlet.service() for servlet [default] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.net.URISyntaxException: Illegal character in path at index 0: /servicedesk/customer/user/login
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.checkChars(URI.java:3021)
at java.net.URI$Parser.parseHierarchical(URI.java:3105)
at java.net.URI$Parser.parse(URI.java:3063)
at java.net.URI.<init>(URI.java:588)
at com.atlassian.servicedesk.internal.rest.CustomerWebAuthenticationHandler.toResponse(CustomerWebAuthenticationHandler.scala:116)
at com.atlassian.servicedesk.internal.rest.CustomerWebAuthenticationHandler.toResponse(CustomerWebAuthenticationHandler.scala:34)
at com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:452)
... 5 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
... 95 filtered
at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply$mcV$sp(PortalContextSetter.scala:12)
at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11)
at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11)
at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:29)
at com.atlassian.servicedesk.internal.web.PortalContextSetter.doFilter(PortalContextSetter.scala:11)
... 49 filtered
at com.atlassian.servicedesk.project.internal.web.filters.NormaliseUrlFilter.doFilter(NormaliseUrlFilter.java:25)
... 51 filtered
at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply$mcV$sp(PortalContextSetter.scala:12)
at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11)
at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11)
at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:23)
at com.atlassian.servicedesk.internal.web.PortalContextSetter.doFilter(PortalContextSetter.scala:11)
... 51 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)
Diagnosis
Checking atlassian-jira.log, there're modified files:
1
2
3
4
___ Modifications ___________________________
Modified Files : secure/default.jsp, jira-application.properties, WEB-INF/web.xml, login.jsp, default.jsp, seraph-config.xml
Removed Files : None
Cause
In this specific case, seraph-config.xml is modified and an URI path is used with a white space at the beginning: " /servicedesk/customer/user/login"
.
This causes JIRA to throw "URISyntaxException: Illegal character in path at index 0"
when accessing the Customer Portal, because white space is an illegal character in a URI.
Solution
Resolution
Revert the changes to the modified files or ensure the custom URI doesn't have a white space in it.
Was this helpful?