When Creating an Inline Comment the Message "Could not save the comment" Appears

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

Problem

When creating an inline comment the message Could not save the comment appears.

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 7 2017-04-21 08:28:13,000 ERROR [http-nio-8443-exec-45] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: Unexpected error -- referer: https://confluence.mycompany.com/pages/viewpage.action?pageId=12345678 | url: /rest/inlinecomments/1.0/comments | traceId: 369ce54081a42b82 | userName: 20556732 java.lang.RuntimeException: Unexpected error ... Caused by: javax.xml.transform.TransformerException: java.lang.RuntimeException: Namespace for prefix 'ri' has not been declared. ... Caused by: java.lang.RuntimeException: Namespace for prefix 'ri' has not been declared.

Diagnosis

Environment

  • Confluence is being used with Wily Introscope Profiler with Java parameter

    1 -javaagent:/path/to/wily/Agent.jar

Cause

Wily Introscope Profiler inserts extra code to the JVM that uses the same XML namespace.

Solution

Resolution

  1. Remove -javaagent:/path/to/wily/Agent.jar from the Java command line. This is usually in setenv.sh or for Windows in the tomcat GUI.

  2. Update the parameter Datlassian.org.osgi.framework.bootdelegation to the following value:

    1 -Datlassian.org.osgi.framework.bootdelegation=META-INF.services,com.yourkit,com.singularity.*,com.jprofiler,com.jprofiler.*,org.apache.xerces,org.apache.xerces.*,org.apache.xalan,org.apache.xalan.*,sun.*,com.sun.jndi.*,com.icl.saxon,com.icl.saxon.*,javax.servlet,javax.servlet.*,com.sun.xml.bind.*"

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.