Can't access Confluence - "StringIndexOutOfBoundsException" message is displayed

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

    

Summary

When starting Confluence, the application will not launch correctly.

When trying to access it from a browser, the following error message will be displayed:

Environment

Confluence Server or Data Center (any version).

Diagnosis

Checking the application logs, in <confluence_home>/logs/atlassian-confluence.log, the following error is present:

atlassian-confluence.log
2020-08-31 18:42:11,147 ERROR [Catalina-utility-1] [atlassian.confluence.setup.ConfluenceConfigurationListener] contextInitialized An error was encountered while bootstrapping Confluence (see below): java.lang.StringIndexOutOfBoundsException: begin 0, end 15403, length 502 com.atlassian.extras.common.LicenseException: java.lang.StringIndexOutOfBoundsException: begin 0, end 15403, length 502

Cause

This message indicates that the license code Confluence is currently using may be invalid, or corrupted.

The Confluence license key is stored in the <confluence_home>/confluence.cfg.xml file. To check for any issues, look for the following property:

    <property name="atlassian.license.message">Your License Code Here</property>

Compare the license code listed here, with the original license code used on this Confluence instance, and make sure both codes match.

(info) You can check any current licenses associated with an Atlassian account by accessing the My Atlassian portal.

Solution

  1. Stop Confluence
  2. Copy the Confluence license code to the clipboard
  3. Replace the current code inside the confluence.cfg.xml file with the copied content
  4. Start Confluence

Confluence should be able to validate this license now.



com.atlassian.extras.common.LicenseException: java.lang.StringIndexOutOfBoundsException
Last modified on Sep 2, 2020

Was this helpful?

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