URISyntaxException with Illegal Character in Path when Accessing a JIRA Page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

A JIRA page can't be accessed and throws 500 error:

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:

    ___ 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.

Resolution

Revert the changes to the modified files or ensure the custom URI doesn't have a white space in it.

Last modified on Aug 5, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.