Problems with Html-Export


#1

I am recently working on a plugin for Atlassian Confluence. The plugin should export my spaces but i am encountering the following error:

2019-02-04 08:54:33,701 WARN [Caesium-1-3] [engine.loading.internal.LoadContexts] cleanup HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@166a263d<rs=com.mchange.v2.c3p0.impl.NewProxyResultSet@3b6cdbf [wrapping: null]>
2019-02-04 08:54:33,702 ERROR [Caesium-1-3] [confluence.importexport.impl.HtmlExporter] doExportEntity Error occurred during export. .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#5144583]] for second level caching at com/atlassian/confluence/pages/Page.htmlexport.vm[line 52, column 104]

Unfortunately I am not able to fix this. I hope someone is can help me!

full stacktrace:

2019-02-04 08:54:33,588 WARN [Caesium-1-3] [engine.loading.internal.LoadContexts] cleanup HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@245a4d80 
2019-02-04 08:54:33,589 ERROR [Caesium-1-3] [confluence.importexport.impl.HtmlExporter] doExportEntity Error occurred during export. 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#1864963]] for second level caching at com/atlassian/confluence/pages/Page.htmlexport.vm[line 52, column 104]
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223) 
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) 
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342) 
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 
at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) 
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) 
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) 
at org.apache.velocity.Template.merge(Template.java:328) 
at org.apache.velocity.Template.merge(Template.java:235) 
at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68) 
at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:76) 
at com.atlassian.confluence.util.TemplateSupport.processTemplate(TemplateSupport.java:70) 
at com.atlassian.confluence.importexport.impl.HtmlExporter.doExportEntity(HtmlExporter.java:175) 
at com.atlassian.confluence.importexport.impl.HtmlExporter.exportPage(HtmlExporter.java:82) 
at com.atlassian.confluence.importexport.impl.HtmlExporter.exportSpace(HtmlExporter.java:92) 
at com.atlassian.confluence.importexport.impl.AbstractRendererExporterImpl.doExport(AbstractRendererExporterImpl.java:98) 
at com.atlassian.confluence.importexport.impl.HtmlExporter.doExport(HtmlExporter.java:37) 
at at.felder.atlassian.impl.MyJobRunner.runJob(MyJobRunner.java:138) 
at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.doRunJob(JobRunnerWrapper.java:120) at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.lambda$runJob$0(JobRunnerWrapper.java:91) 
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87) 
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71) 
at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.runJob(JobRunnerWrapper.java:91) 
at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:134) 
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:106) 
at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:90) 
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443) 
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeLocalJob(CaesiumSchedulerService.java:410)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:388) 
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285) 
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282) 
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65) 
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59) 
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34) 
at java.lang.Thread.run(Thread.java:748) Caused by: org.hibernate.HibernateException: Unable to resolve owner of loading collection [[com.atlassian.confluence.core.ContentEntityObject.contentProperties#1864963]] for second level caching 
at org.hibernate.engine.loading.internal.CollectionLoadContext.addCollectionToCache(CollectionLoadContext.java:321) 
at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:261) 
at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:221) 
at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:194) at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:1193)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1157) 
at org.hibernate.loader.Loader.processResultSet(Loader.java:1005) 
at org.hibernate.loader.Loader.doQuery(Loader.java:943) 
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349) 
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:319)
at org.hibernate.loader.Loader.loadCollection(Loader.java:2327) 
at org.hibernate.loader.collection.plan.LegacyBatchingCollectionInitializerBuilder$LegacyBatchingCollectionInitializer.initialize(LegacyBatchingCollectionInitializerBuilder.java:88) 
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688) 
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2176) 
at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:565) 
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:247) 
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:561) 
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:132) 
at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:277) 
at com.atlassian.confluence.content.ContentProperties.find(ContentProperties.java:112) 
at com.atlassian.confluence.content.ContentProperties.getStringProperty(ContentProperties.java:73)
at com.atlassian.confluence.pages.Attachment.getMediaType(Attachment.java:115) 
at sun.reflect.GeneratedMethodAccessor3551.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:142) 
at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:529) 
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:198) ... 37 more 2019-02-04 
08:54:33,591 ERROR [Caesium-1-3] [confluence.importexport.impl.HtmlExporter] doExportEntity Entity being exported was: page: Requirements Home v.3 (1862188)