Unable to Add Comment to Confluence Page Due to NoClassDefFoundError

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When attempting to add a comment to Confluence, the comment does not get posted but instead we see a long stack trace, which is not fully displayed - see the screenshot below:


[org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99)\n\tat 

 

And the following appears in the atlassian-confluence.log:

2012-12-26 16:20:27,677 ERROR [TP-Processor8] [atlassian.event.internal.EventPublisherImpl] invokeListeners There was an exception thrown trying to dispatch event 'com.atlassian.confluence.event.events.content.comment.CommentCreateEvent[source=com.atlassian.confluence.pages.DefaultCommentManager@15dbefd]' from the invoker 'com.atlassian.event.internal.SingleParameterMethodListenerInvoker@3c4870'.
 -- url: /wiki/rest/tinymce/1/content/9175075/comment | userName: xxxx | referer: https://xxxx/display/TAS/Test+Page+2
java.lang.RuntimeException: java.lang.reflect.UndeclaredThrowableException
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:50)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56)
......
caused by: java.lang.reflect.UndeclaredThrowableException
	at $Proxy1301.createOrUpdate(Unknown Source)
.....
Caused by: java.lang.NoClassDefFoundError: org/postgresql/jdbc4/Jdbc4ParameterMetaData
	at org.postgresql.jdbc4.Jdbc4Statement.createParameterMetaData(Jdbc4Statement.java:46)
	at org.postgresql.jdbc3.AbstractJdbc3Statement.getParameterMetaData(AbstractJdbc3Statement.java:418)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.getParameterMetaData(DelegatingPreparedStatement.java:221)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.getParameterMetaData(DelegatingPreparedStatement.java:221)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.getParameterMetaData(DelegatingPreparedStatement.java:221)
2012-12-26 16:20:27,754 ERROR [TP-Processor8] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service
 -- url: /wiki/rest/tinymce/1/content/9175075/comment | userName: xxxx | referer: https://xxxx/display/TAS/Test+Page+2
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:695)
.....
	at com.atlassian.confluence.tinymceplugin.rest.PageResource.createAndRender(PageResource.java:179)
	at com.atlassian.confluence.tinymceplugin.rest.PageResource.add(PageResource.java:130)
.....

Cause

There seems to be a missing class of certain libraries or plugins. For this case, it seems to be caused by a corruption in plugin/library cache files or an incomplete plugin/library initialization during startup.

Resolution

To solve this issue, you need to clear the Confluence plugins cache, by following these steps:

  1. Shutdown Confluence
  2. Ensure the user running Confluence has full read/write privileges to the confluence-home directory.
  3. Remove the following directories
    (warning) This will remove the plugin cache files only and will not permanently remove any plugins. These directories will be recreated during the next Confluence startup.  However, some third-party plugins may store metadata in these directories, so we recommend creating a temporary backup of the directories.
    • <confluence-home>/bundled-plugins
    • <confluence-home>/plugins-cache
    • <confluence-home>/plugins-osgi-cache
    • <confluence-home>/plugins-temp
    • <confluence-home>/bundled-plugins_language
  4. Start Confluence

 

Last modified on Jan 26, 2017

Was this helpful?

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