Unable to use other Macros - Children Display
Asked by Arrow Admin:

So I just migrated my Confluence Server from one Datacenter to another. After trying to create a new page, I attempted to insert a 'Chlidren Display' macro found under 'Confluence content' which is under 'other macros'. It doesn't look like it does anything, but won't let me preview or publish. Here's the output from the *atlassian.confluence.log*:

```
2017-11-03 09:13:24,712 ERROR [http-nio-8443-exec-16] [ContainerBase.[Standalone].[localhost].[/]] log Unhandled exception occurred whilst decorating page
?-- referer: https://redacted.com/pages/resumedraft.action?draftId=8880134&draftShareId=9fb4bdf9-dadb-4002-a3df-2944b947a212 | url: /plugins/servlet/confluence/placeholder/macro | traceId: 42a135eb53ca5ad8 | userName: admin
java.lang.ArrayIndexOutOfBoundsException: 0
?????? 
2017-11-03 09:13:24,717 ERROR [http-nio-8443-exec-16] [[Standalone].[localhost].[/].[servlet-module-container-servlet]] log Servlet.service() for servlet [servlet-module-container-servlet] in context with path [] threw exception
java.lang.ArrayIndexOutOfBoundsException: 0
2017-11-03 09:13:24,776 INFO [http-nio-8443-exec-16] [atlassian.confluence.status.SystemErrorInformationLogger] writeToLog
Request Unique ID : 56b03dee-63e3-4023-8a6d-fe43913fe99d
--------------------------
JVM Stats
--------------------------
usedMemory = 704643088
usedMemoryInMegabytes = 672
availableHeap = 369098736
freeMemoryInMegabytes = 351
allocatedHeap = 1073741824
freeAllocatedHeap = 369098736
totalMemory = 1073741824
totalMemoryInMegabytes = 1024
availablePermGen = 0
maxPermGen = -1
maxHeap = 1073741824
usedHeap = 704643088
freeMemory = 369098736
usedPermGen = -1
--------------------------
Request Information
--------------------------
URL: redacted.com
Scheme: https
Server: redacted.com
Port: 443
URI: /500page.jsp
Context Path:
Servlet Path: /500page.jsp
Path Info: null
Query String: definition=e2NoaWxkcmVufQ&locale=en_GB&version=2
--------------------------
Attributes
--------------------------
javax.servlet.forward.request_uri: /plugins/servlet/confluence/placeholder/macro
javax.servlet.forward.context_path:
javax.servlet.forward.servlet_path: /plugins/servlet
javax.servlet.forward.path_info: /confluence/placeholder/macro
javax.servlet.forward.query_string: definition=e2NoaWxkcmVufQ&locale=en_GB&version=2
javax.servlet.error.status_code: 500
com.atlassian.confluence.impl.profiling.DecoratorTimings: com.atlassian.confluence.impl.profiling.DecoratorTimings@64c77dff
com.opensymphony.sitemesh.APPLIED_ONCE: true
__cleanup_recursion_counter: 0
com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter_already_filtered: true
atlassian.core.seraph.original.url: /500page.jsp?definition=e2NoaWxkcmVufQ&locale=en_GB&version=2
com.atlassian.labs.botkiller.BotKillerFilter: true
com.atlassian.gzipfilter.GzipFilter_already_filtered: true
Confluence-Request-Time: 1509714804639
javax.servlet.request.ssl_session_mgr: org.apache.tomcat.util.net.jsse.JSSESupport@61427d9d
com.atlassian.confluence.web.ConfluenceJohnsonFilter_already_filtered: true
com.atlassian.seraph.auth.LoginReason: OK
org.apache.tomcat.util.net.secure_protocol_version: TLSv1.2
javax.servlet.request.key_size: 128
javax.servlet.error.message:
javax.servlet.error.servlet_name: servlet-module-container-servlet
javax.servlet.request.cipher_suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
javax.servlet.request.ssl_session_id: 59fc6b3d8e15c133cc43676d887bb702541cd11759dfab9960828fc34b53c292
com.atlassian.confluence.security.websudo.MessagesDecoratorFilter__already_filtered__: true
B3-TraceId: b2c51879164161
loginfilter.already.filtered: true
javax.servlet.error.request_uri: /plugins/servlet/confluence/placeholder/macro
com.atlassian.core.filters.HeaderSanitisingFilter_already_filtered: true
com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter: true
javax.servlet.error.exception: java.lang.ArrayIndexOutOfBoundsException: 0
os_securityfilter_already_filtered: true
com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter: true
--------------------------
Parameters
--------------------------
definition : e2NoaWxkcmVufQ
locale : en_GB
version : 2
caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:75)
```


Answers:
author: Philipp Hecht
body: I have the same issue. I deleted the plugin cache and restart confluence. Nothing change. Some macros work to insert, some not. For exmaple When i insert the Children Display Macro, the buttons at the bottom of the page (Save, Cancel and Close) will be disabled. I have to reload the page. And the Macro is not inside. We use Confluence 6.7. I hope anybody can help me.

Browser Error:

plugins/servlet/confluence/placeholder/macro?definition=e2NoaWxkcmVufQ\&locale=en_GB\&version=2 500 (Internal Server Error)

The logs when i insert a corupt Macro:

2018-08-02 13:13:20,808 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.filter.BaseLoginFilter\] doFilter doFilter : ____ Attempting login for : '/rest/mywork/latest/status/notification/count?_=1533216084023'  
2018-08-02 13:13:20,808 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.filter.PasswordBasedLoginFilter\] login login : No user name or password was returned. No authentication attempt will be made. User may still be found via a SecurityFilter later.  
2018-08-02 13:13:20,809 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.filter.BaseLoginFilter\] doFilter doFilter : Login completed for 'null' - os_authstatus = 'null'  
2018-08-02 13:13:20,809 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : Storing the originally requested URL (atlassian.core.seraph.original.url=/rest/mywork/latest/status/notification/count?_=1533216084023)  
2018-08-02 13:13:20,810 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : requiredRoles = \[\]  
2018-08-02 13:13:20,810 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.auth.DefaultAuthenticator\] getUserFromSession getUserFromSession : Session found; 'admin' is present  
2018-08-02 13:13:20,811 DEBUG \[http-nio-8090-exec-11\] \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : Setting Auth Context to be 'admin'  
2018-08-02 13:13:20,815 DEBUG \[http-nio-8090-exec-11\] \[confluence.user.crowd.CachedCrowdMembershipDao\] isUserDirectMember checking direct membership for user \[ admin \] and group \[ confluence-administrators \]

comments: author: AnnWorley
body: Hi Philipp,

Since it is several macros and not just the Children Display Macro that cannot be added to pages, please check your JAVA_HOME on \<Confluence_Base_URL\>/admin/systeminfo.action and make sure it points to a [supported version of Java for Confluence 6.7.x](https://confluence.atlassian.com/conf67/supported-platforms-945103877.html#SupportedPlatforms-Java).

I am asking about your Java version because the symptoms you are describing are similar to [Unable to insert any macros through the macro browser due to JAVA errors](https://confluence.atlassian.com/confkb/unable-to-insert-any-macros-through-the-macro-browser-due-to-java-errors-770608770.html).

Please check the atlassian-confluence.log (in \<[Confluence_Home](https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html)\>/logs directory) for the error in the knowledge base article as well as other ERROR level entries. I am afraid the log snippet posted was authentication related and didn't give me much of an idea of the issue with inserting macros. Thanks for the browser error, a search on that didn't turn up much for me, however.

On some instances a lot of macros are provided by third party add-ons. Please go to Confluence Admin\>Manage Add-ons and make sure there are no alerts there.

I look forward to hearing whether you are running a supported version of Java and if so, what other errors you can find in your atlassian-confluence.log.

Thank you,

Ann


author: Philipp Hecht
body: it points to openjdk.

PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin  
CONF_HOME /var/atlassian/confluence  
CATALINA_PID /opt/atlassian/confluence/work/catalina.pid  
CONF_VERSION 6.7.0  
CERTIFICATE /var/atlassian/confluence/certificate  
CONF_USER  
JAVA_HOME /usr/lib/jvm/java-1.8-openjdk  
CATALINA_OPTS -Dconfluence.context.path= -Datlassian.plugins.startup.options='-fg' -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2018-07-30_13-52-04.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution  
JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED  
OLDPWD /opt/atlassian/confluence  
XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt  
LANG C.UTF-8  
JAVA_CACERTS /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/cacerts  
CONF_INSTALL /opt/atlassian/confluence  
HOSTNAME 6af835908e16  
START_CONFLUENCE_JAVA_OPTS -Datlassian.plugins.startup.options='-fg'  
JAVA_ALPINE_VERSION 8.151.12-r0  
LD_LIBRARY_PATH /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64  
NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat  
PWD /var/atlassian/confluence  
JAVA_VERSION 8u151  
CONFLUENCE_CONTEXT_PATH  
HOME /sbin  
SHLVL 1


author: Philipp Hecht
body: I updated the Confluence Version to 6.10.1 now it works.


author: AnnWorley
body: Hi Philipp,

I understand that you upgraded Confluence and now you can add macros to pages. I am happy to hear it works now.

I wanted to follow up to make sure you are using a supported Java version now as OpenJDK is not supported for Confluence 6.10.x: [Supported Platforms](https://confluence.atlassian.com/doc/supported-platforms-207488198.html). You might run into other issues later if you use OpenJDK.

Thanks,

Ann


author: Philipp Hecht
body: I have the same issue, i delete the plugin Cache and restart confluence. But nothing work.

When i want to insert the Children Display Macro and i select and insert it. The Buttons below are disabled. I have to Reload the Page and no Macro is insterted. Some Macros work a few not. Can anybody help me? We use Confluence 6.7.0

Here are Confluence Logs.

2018-08-02 12:55:56,895 INFO \[http-nio-8090-exec-11\] \[util.zipkin.impl.ConfluenceSpanCollector\] lambda$onCollect$1 Zipkin span  
2018-08-02 12:55:57,572 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.filter.BaseLoginFilter\] doFilter doFilter : ____ Attempting login for : '/rest/analytics/1.0/publish/bulk'  
2018-08-02 12:55:57,573 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.filter.PasswordBasedLoginFilter\] login login : No user name or password was returned. No authentication attempt will be made. User may still be found via a SecurityFilter later.  
2018-08-02 12:55:57,573 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.filter.BaseLoginFilter\] doFilter doFilter : Login completed for 'null' - os_authstatus = 'null'  
2018-08-02 12:55:57,574 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : Storing the originally requested URL (atlassian.core.seraph.original.url=/rest/analytics/1.0/publish/bulk)  
2018-08-02 12:55:57,574 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : requiredRoles = \[\]  
2018-08-02 12:55:57,575 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.auth.DefaultAuthenticator\] getUserFromSession getUserFromSession : Session found; 'admin' is present  
2018-08-02 12:55:57,576 DEBUG \[http-nio-8090-exec-8\] \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : Setting Auth Context to be 'admin'  
2018-08-02 12:55:57,579 DEBUG \[http-nio-8090-exec-8\] \[confluence.user.crowd.CachedCrowdMembershipDao\] isUserDirectMember checking direct membership for user \[ admin \] and group \[ confluence-administrators \]  
2018-08-02 12:55:57,579 INFO \[analyticsEventProcessor:thread-1\] \[hibernate.engine.internal.StatisticalLoggingSessionEventListener\] end Session Metrics {


author: AnnWorley
body: Thanks for the log excerpt.

Please let me know, can you save pages without macros or does the error only appear when you try to insert a macro?

Macros are provided by plugins and a plugin cache can get out of sync during a move. If the issue only occurs with macros, please try the procedure described in: [How to clear Confluence plugins cache](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html)

If no pages can be edited/saved, and you are running a version of Confluence above 6.0, please check the steps in [Troubleshooting Collaborative Editing](https://confluence.atlassian.com/doc/troubleshooting-collaborative-editing-858772087.html).

When you restart Confluence, please watch the logs during startup for any entries that start with ERROR and let me know of any that seem relevant to the issue.