Creating pages automatically in Confluence via the Java API is not exactly a no-event, but not too hard either.
When creating and saving a page we run into a NullPointerException
within the PageEditedPayloadTransformer
.
[confluence.notifications.impl.NotificationsEventDispatcher] errorOrDebug Error during notification dispatch : null [INFO] java.lang.NullPointerException [INFO] at com.atlassian.confluence.notifications.content.transformer.PageEditedPayloadTransformer.getOriginalId(PageEditedPayloadTransformer.java:20) [INFO] at com.atlassian.confluence.notifications.content.transformer.PageEditedPayloadTransformer.getOriginalId(PageEditedPayloadTransformer.java:12) [INFO] at com.atlassian.confluence.notifications.content.ContentEditedPayloadTransformer.checkedCreate(ContentEditedPayloadTransformer.java:12) [INFO] at com.atlassian.confluence.notifications.PayloadTransformerTemplate.create(PayloadTransformerTemplate.java:38) [INFO] at com.atlassian.confluence.notifications.impl.NotificationsEventDispatcher.handleEventInternal(NotificationsEventDispatcher.java:86) [INFO] at com.atlassian.confluence.notifications.impl.NotificationsEventDispatcher.handleEvent(NotificationsEventDispatcher.java:58) [INFO] at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source) [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [INFO] at java.lang.reflect.Method.invoke(Method.java:497) [INFO] at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) [INFO] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48) [INFO] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] at java.lang.Thread.run(Thread.java:745)
There is already an unresolved issue, CONF-37161, which reads:
While trying to render notifications for page edits,
CONF-37161PageEditedPayloadTransformer
can getNullPointerException
s while callinggetOriginalId
. This is because thePageEditedEvent
is not required to contain the original page id - it can benull
. The code needs to not implicitly cast aLong
to along
, since that's causing the null pointer exception in this case.
In case that you do not need to send notifications, you may use a SaveContext that simply suppresses these.
Indicates that notifications should not be sent out informing users of the changes to this content.
SaveContext.isSuppressNotifications()
The pre-constructed context SUPPRESS_NOTIFICATIONS is handy for this use case.
final SaveContext saveContext = DefaultSaveContext.SUPPRESS_NOTIFICATIONS; pageManager.saveContentEntity(page, saveContext);
Saving the page entity with this context will no longer raise the NPE.
Today version 1.8 of the smartics projectdoc add-on for Confluence has been released!
projectdoc supports agile teams creating and maintaining project documentation. It provides templates and tools to improve the collaboration of team members.
The smartics JBoss Modules Maven Plugin, a plugin for Maven, has been released with version 2.1.0.
All changes for this release have been done by James Netherton and Thomas Diesler. Thank you for all your work!
This new version supports the Wildfly Build Process ( - SJBMMP-25Getting issue details... STATUS ). It also fixes bugs and has performance enhancements for projects with a larger set of module dependencies.
- SJBMMP-22Getting issue details... STATUS is an experimental feature that supports a more terse specification of modules in your configuration files. This feature is currently unsupported, which means "use by your own risk and do not expect too much documentation". It may replace the current XSD in the next major version. For more details please refer to #13: Add support for a more terse module descriptor format.
Here is the list of changes:
The versions 0.x continue to support Maven 3.0.x, version 1.x will require Maven 3.1.x, and version 2.x will support Maven 3.2.5+.