Error in log java.lang.NullPointerException

Problem

Two errors appear in the logs after creating a page from a template with connected metadata set(s):

2017-02-17 10:19:27,655 ERROR [http-nio-1990-exec-6] [atlassian.confluence.event.ConfluenceEventDispatcher] lambda$getRunnable$1 There was an exception thrown trying to dispatch event [com.communardo.confluence.metadata.event.SaveContentMetadataFieldValueEvent@5f3febc1] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@18ec636]
 -- referer: http://com100178:1990/confluence/pages/createpage-entervariables.action?templateId=2228225&spaceKey=TMTBM&title=&newSpaceKey=TMTBM&fromPageId=1998850 | url: /confluence/rest/api/content | traceId: 0193829bbcea679e | userName: admin
java.lang.RuntimeException: java.lang.NullPointerException
2017-02-17 10:19:27,670 ERROR [http-nio-1990-exec-6] [atlassian.confluence.event.ConfluenceEventDispatcher] lambda$getRunnable$1 There was an exception thrown trying to dispatch event [com.communardo.confluence.metadata.event.RemoveContentMetadataFieldValueEvent@3bc8259] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@7a3aa7bb]
 -- referer: http://com100178:1990/confluence/pages/createpage-entervariables.action?templateId=2228225&spaceKey=TMTBM&title=&newSpaceKey=TMTBM&fromPageId=1998850 | url: /confluence/rest/api/content | traceId: 0193829bbcea679e | userName: admin
java.lang.RuntimeException: java.lang.NullPointerException

The page is saved correctly however, as well as filled in metadata.

Solution

This is a bug in our add-on: METADATA-476 - Getting issue details... STATUS

This bug is fixed starting with version 2.2.

Steps to reproduce
  1. Create page template in Confluence
  2. Add template to Metadata set
  3. Create new page either via
    1. Create Button > Choose template from 2 OR
    2. Create from Template macro with template from 2
  4. Fill at least one Metadata field
  5. Save