Adding Github DVCS Account fails with "String exceeds 255 characters"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

JIRA fails to add a Github DVCS Account and throws the below error:

2018-07-24 12:38:34,552 https-jsse-nio-443-exec-16 ERROR      [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=9d7284e2-70e4-40a6-9d62-85f472d5b2e5, interpretedMsg=, cause=com.opensymphony.module.propertyset.IllegalPropertyException: String exceeds 255 characters., stacktrace=com.opensymphony.module.propertyset.IllegalPropertyException: String exceeds 255 characters.
    	at com.opensymphony.module.propertyset.AbstractPropertySet.setString(AbstractPropertySet.java:297) [propertyset-1.5.jar:?]
    	at com.atlassian.jira.projectconfig.servlet.PanelServlet.doGet(PanelServlet.java:188) [?:?]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:?]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:?]
    	at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:37) [atlassian-plugins-servlet-4.5.0.jar:?]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:?]
    	at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:45) [atlassian-plugins-servlet-4.5.0.jar:?]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:?]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [catalina.jar:8.5.6]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:8.5.6]
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.6]
...
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410) [tomcat-coyote.jar:8.5.6]
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.6]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_102]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_102]
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.6]
    	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
    , referer=<JIRA_Base_URL>/secure/admin/ConfigureDvcsOrganizations!default.jspa, servletErrorMessage=}

Diagnosis

When the operation fails, the URL in the browser's address bar is:

<JIRA_Base_URL>/<JIRA_Specific_Page_URL>?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch

Cause

The Authorization callback URL of the JIRA OAuth App from Github Settings -> Developer settings → OAuth Apps is not the JIRA Base URL, but the URL of some JIRA specific page that may be longer than expected by Github, e.g.:

Resolution

  1. Edit the JIRA OAuth App from Github Settings -> Developer settings → OAuth Apps
  2. Set both Authorization callback URL and Homepage URL to JIRA Base URL (https://JIRA.BaseURL.com as in the above example)
  3. Save the settings and add the DVCS Account again


Last modified on Aug 6, 2018

Was this helpful?

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