Currently I am trying to write a Plugin for Confluence. This Plugin should export my Spaces in HTML. To achieve this I use the HtmlExporter.java from the JAVA API.
There I came across following situation:
The Exporter can’t export some of my Attachments. After long research I recognized that the Exporter fails, if the exporting Attachment has multiple Versions!
(it fails with this exception:
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getMediaType' in class com.atlassian.confluence.pages.Attachment threw exception org.hibernate.HibernateException: Unable to resolve owner of loading collection [[com.atlassian.confluence.core.ContentEntityObject.contentProperties#CONTENT-ID]] for second level caching at com/atlassian/confluence/pages/Page.htmlexport.vm[line 52, column 104])
So I was wondering if you can restrict the Export to the current version, to prevent the error!