Confluence Space Analytics呈现空白页面
Problem
While trying to view space Analytics data via the Confluence Data Center, Analytics for Confluence app, the app is returning a blank screen and an error message on the top right-hand corner of the screen:
The following appears in the atlassian-confluence.log
2022-01-01 00:00:00,000 WARN [http-nio-8090-exec-15] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions: ->[SALSpringTx]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #567190223) -- referer: https://confluence.com/plugins/confanalytics/analytics.action | url: /rest/confanalytics/1.0/instance/paginated/activityBySpace | traceId: d86d526c3c35f2a3 | userName: user12022-01-01 00:00:00,000 ERROR [http-nio-8090-exec-15] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: null -- referer: https://confluence.com/plugins/confanalytics/analytics.action | url: /rest/confanalytics/1.0/instance/paginated/activityBySpace | traceId: d86d526c3c35f2a3 | userName: user1com.querydsl.core.types.ExpressionException at com.querydsl.core.types.ConstructorExpression.newInstance(ConstructorExpression.java:149) at com.querydsl.sql.AbstractSQLQuery.newInstance(AbstractSQLQuery.java:562) at com.querydsl.sql.AbstractSQLQuery.fetch(AbstractSQLQuery.java:458) at com.addonengine.addons.analytics.store.server.EventRepositoryServerImpl$getEventsForAllSpaces$2.invoke(EventRepositoryServerImpl.kt:525) at com.addonengine.addons.analytics.store.server.EventRepositoryServerImpl$getEventsForAllSpaces$2.invoke(EventRepositoryServerImpl.kt:71) at com.addonengine.addons.analytics.store.server.querydsl.QueryDslDbConnectionManager$execute$1.execute(QueryDslDbConnectionManager.kt:56) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:87) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.lambda$execute$0(DefaultTransactionalExecutor.java:43) at com.atlassian.sal.spring.connection.SpringHostConnectionAccessor.lambda$execute$0(SpringHostConnectionAccessor.java:55) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) at com.atlassian.sal.spring.connection.SpringHostConnectionAccessor.execute(SpringHostConnectionAccessor.java:49) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:40) at com.addonengine.addons.analytics.store.server.querydsl.QueryDslDbConnectionManager.execute(QueryDslDbConnectionManager.kt:50) at com.addonengine.addons.analytics.store.server.querydsl.QueryDslDbConnectionManager.execute$default(QueryDslDbConnectionManager.kt:48) at com.addonengine.addons.analytics.store.server.EventRepositoryServerImpl.getEventsForAllSpaces(EventRepositoryServerImpl.kt:486) at com.addonengine.addons.analytics.service.InstancePaginatedAnalyticsServiceImpl$getActivityBySpace$allSpacesStatistics$1.invoke(InstancePaginatedAnalyticsServiceImpl.kt:59) at com.addonengine.addons.analytics.service.InstancePaginatedAnalyticsServiceImpl$getActivityBySpace$allSpacesStatistics$1.invoke(InstancePaginatedAnalyticsServiceImpl.kt:28) at com.addonengine.addons.analytics.service.model.LazyFetching.next(LazyFetching.kt:37) at com.addonengine.addons.analytics.service.model.LazyFetching$asSequence$1.invoke(LazyFetching.kt:31) at kotlin.sequences.GeneratorSequence$iterator$1.calcNext(Sequences.kt:518) at kotlin.sequences.GeneratorSequence$iterator$1.hasNext(Sequences.kt:536) <---snipped---> at java.base/java.lang.Thread.run(Unknown Source)Caused by: java.lang.reflect.InvocationTargetException at jdk.internal.reflect.GeneratedConstructorAccessor856.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at com.querydsl.core.types.ConstructorExpression.newInstance(ConstructorExpression.java:141) ... 360 moreCaused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method com.addonengine.addons.analytics.store.model.FullSpaceStatistics.<init>, parameter spaceName at com.addonengine.addons.analytics.store.model.FullSpaceStatistics.<init>(FullSpaceStatistics.kt) ... 364 more
Diagnosis
Environment
Confluence DC 7.11 or above
Diagnostic Steps
Your Confluence instance may have been recently upgraded
- Check if you're able to view other tabs from the "Analytics for Confluence" apps such as "Overview" or "Users"
- The issue should be consistent across different users via different browsers
- Have a look at your network requests via the browser developer tools, the web request to
/rest/confanalytics/1.0/instance/paginated/activityBySpace?
should return an error 500.
Cause
Notice the "Caused by" in the error message, Parameter specified as non-null is null: method com.addonengine.addons.analytics.store.model.FullSpaceStatistics.<init>, parameter spaceName
. The Analytics request is expecting a non-null parameter, "spaceName" but it appears to be null.
Workaround
Please run the following SQL query in the Confluence database to identify NULL values in the "spaceName" column
SELECT count(*) FROM SPACES WHERE SPACENAME=NULL;
This query shouldn't return any result but if it is returning a number aside from 0, please run the query below to get a list of spaces that has NULL in the "spacename" column:
SELECT * FROM SPACES WHERE SPACENAME=NULL;
Use the query below to update any spaces that have a NULL for their space name:
UPDATE SPACES SET SPACENAME='<space-name>' WHERE SPACEID=<space-id>;
Restart Confluence and your "Spaces" tab from the Analytics for Confluence app should start displaying data now.
Description | Confluence Space Analytics renders a blank page |
---|---|
Product | Confluence Data Center |