Confluence does not show anything on sidebar after database migration from mysql to SQL Server
Asked by Alexei Ferreira:

After migrating Confluence to SQL server it does not show sidebar content.

Screens attached bellow.

Logs:

```
2018-06-13 16:56:57,438 TRACE [Indexer: 2] [type.descriptor.sql.BasicExtractor] extract extracted value ([LASTMOD10_12_1_] : [TIMESTAMP]) - [2012-09-25 09:18:16.0]2018-06-13 16:56:57,438 TRACE [Indexer: 2] [type.descriptor.sql.BasicExtractor] extract extracted value ([PREVVER12_12_1_] : [BIGINT]) - [null]2018-06-13 16:56:57,438 WARN [http-nio-80-exec-7] [plugins.ia.impl.CachingSidebarLinkManager] lambda$findBySpace$5 Failed to retrieve sidebar links from cache for space 'home'. Fetching from database instead. -- url: / | traceId: 0c6371256e2ece8a | userName: anonymous | page: 327697 | action: viewpagecom.atlassian.vcache.ExternalCacheException: Failed due to UNCLASSIFIED_FAILURE        at com.atlassian.vcache.internal.legacy.LegacyUtils.mapException(LegacyUtils.java:51)        at com.atlassian.vcache.internal.legacy.LegacyStableReadExternalCache.mapException(LegacyStableReadExternalCache.java:125)        at com.atlassian.vcache.internal.core.service.AbstractExternalCache.perform(AbstractExternalCache.java:93)        at com.atlassian.vcache.internal.core.service.AbstractExternalCache.perform(AbstractExternalCache.java:69)        at com.atlassian.vcache.internal.core.service.AbstractStableReadExternalCache.get(AbstractStableReadExternalCache.java:100)        at com.atlassian.vcache.internal.core.metrics.TimedExternalCache.get(TimedExternalCache.java:67)        at com.atlassian.confluence.plugins.ia.impl.CachingSidebarLinkManager.findBySpace(CachingSidebarLinkManager.java:137)        at com.atlassian.confluence.plugins.ia.impl.DefaultSidebarLinkService.getPermittedQuickLinksForSpace(DefaultSidebarLinkService.java:134)        at com.atlassian.confluence.plugins.ia.impl.DefaultSidebarLinkService.getLinksForSpace(DefaultSidebarLinkService.java:85)        at com.atlassian.confluence.plugins.ia.impl.DefaultSidebarLinkService.getLinksForSpace(DefaultSidebarLinkService.java:71)        at com.atlassian.confluence.plugins.ia.ui.DefaultSoySidebarContextProvider.populateWithMainSidebarData(DefaultSoySidebarContextProvider.java:172)        at com.atlassian.confluence.plugins.ia.ui.DefaultSoySidebarContextProvider.getContextMap(DefaultSoySidebarContextProvider.java:116)        at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144)        at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager$ExceptionHandlingWebPanel.getHtml(ConfluenceWebInterfaceManager.java:110)        at sun.reflect.GeneratedMethodAccessor643.invoke(Unknown Source)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:498)        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)        at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)        at com.atlassian.confluence.velocity.introspection.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:26)        at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:29)        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)        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).........Caused by: java.lang.IllegalStateException: TABLE: AO_187CCC_SIDEBAR_LINK: CATEGORY - CUSTOM_ICON_CLASS - CUSTOM_TITLE - DEST_PAGE_ID - HARDCODED_URL - HIDDEN - ID - POSITION - SPACE_KEY - TYPE - WEB_ITEM_KEY - can't find type -6 (precision=3) in field HIDDEN        at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:102)        at net.java.ao.schema.ddl.SchemaReader.readFields(SchemaReader.java:126)        at net.java.ao.schema.ddl.SchemaReader.readTable(SchemaReader.java:110)        at net.java.ao.schema.ddl.SchemaReader.access$000(SchemaReader.java:62)        at net.java.ao.schema.ddl.SchemaReader$1.apply(SchemaReader.java:99)        at net.java.ao.schema.ddl.SchemaReader$1.apply(SchemaReader.java:97)        at com.google.common.collect.Iterators$8.transform(Iterators.java:799)        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)        at com.google.common.collect.Iterators.addAll(Iterators.java:362)        at com.google.common.collect.Lists.newArrayList(Lists.java:160)        at com.google.common.collect.Lists.newArrayList(Lists.java:144)        at net.java.ao.schema.ddl.SchemaReader.readSchema(SchemaReader.java:97)        at net.java.ao.schema.ddl.SchemaReader.readSchema(SchemaReader.java:88)        at net.java.ao.schema.ddl.SchemaReader.readSchema(SchemaReader.java:81)        at net.java.ao.schema.SchemaGenerator.generateImpl(SchemaGenerator.java:107)        at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:84)        at net.java.ao.EntityManager.migrate(EntityManager.java:128)        at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:51)        at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77)        at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72)        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)        at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:71)        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)        at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)        at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)        at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)        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.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)        at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source).....2018-06-13 16:56:57,438 TRACE [Indexer: 2] [type.descriptor.sql.BasicExtractor] extract extracted value ([CONTENT13_12_1_] : [VARCHAR]) - [current]2018-06-13 16:56:57,443 TRACE [Indexer: 2] [type.descriptor.sql.BasicExtractor] extract extracted value ([PAGEID14_12_1_] : [BIGINT]) - [null]2018-06-13 16:56:57,443 ERROR [http-nio-80-exec-7] [plugin.descriptor.web.ConfluenceWebInterfaceManager] getHtml Failed to render web panel: com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel@5bc2b601 -- url: / | traceId: 0c6371256e2ece8a | userName: anonymous | page: 327697 | action: viewpagejava.util.concurrent.CompletionException: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.confluence.plugins.confluence-space-ia]        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)        at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:824)        at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:834)        at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2155)        at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:110)        at com.atlassian.vcache.VCacheUtils.fold(VCacheUtils.java:59)        at com.atlassian.confluence.plugins.ia.impl.CachingSidebarLinkManager.findBySpace(CachingSidebarLinkManager.java:136)        at com.atlassian.confluence.plugins.ia.impl.DefaultSidebarLinkService.getPermittedQuickLinksForSpace(DefaultSidebarLinkService.java:134)        at com.atlassian.confluence.plugins.ia.impl.DefaultSidebarLinkService.getLinksForSpace(DefaultSidebarLinkService.java:85)        at com.atlassian.confluence.plugins.ia.impl.DefaultSidebarLinkService.getLinksForSpace(DefaultSidebarLinkService.java:71)        at com.atlassian.confluence.plugins.ia.ui.DefaultSoySidebarContextProvider.populateWithMainSidebarData(DefaultSoySidebarContextProvider.java:172)        at com.atlassian.confluence.plugins.ia.ui.DefaultSoySidebarContextProvider.getContextMap(DefaultSoySidebarContextProvider.java:116)        at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144)        at com.atlassian.confluence.plugin.descriptor.web.ConfluenceWebInterfaceManager$ExceptionHandlingWebPanel.getHtml(ConfluenceWebInterfaceManager.java:110)        at sun.reflect.GeneratedMethodAccessor643.invoke(Unknown Source)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        at java.lang.reflect.Method.invoke(Method.java:498)
```

Have anyone had this problem?

One thing that really took my attention:

Caused by: java.lang.IllegalStateException: TABLE: AO_187CCC_SIDEBAR_LINK: CATEGORY - CUSTOM_ICON_CLASS - CUSTOM_TITLE - DEST_PAGE_ID - HARDCODED_URL - HIDDEN - ID - POSITION - SPACE_KEY - TYPE - WEB_ITEM_KEY - can't find type -6 (precision=3) in field HIDDEN


Answers:
author: Neha Lokhande
body: Hi Alexie,

<br />

From the logs attached, it looks like Confluence cannot access the table "AO_187CCC_SIDEBAR_LINK".

Could you confirm if this table exists in your Confluence database? If yes, try clearing the cache as described in this article: [How to clear Confluence plugins cache](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html)

If the issue still persists, I wonder if your Confluence database user has enough permissions to read/write the database?

Not a DBA, but found [this article](https://stackoverflow.com/questions/3998634/sql-server-2008-how-do-i-grant-privileges-to-a-username) to grant the user ALL rights to a database in SQL server:

```
use YourDatabase
 go
 exec sp_addrolemember 'db_owner', 'UserName'
 go
```

<br />

If the problem is still not resolved, could you provide us an overview of the steps you went about with the DB migration process?

Thanks,

Neha

comments: author: Alexei Ferreira
body: Hello Neha,

I've found the problem, we migrate the database from mysql server to SQL Server, when we did that the field HIDDEN was set with datatype smallint, when it was supposed to be Bit.

When I change it back to BIT all worked.

Thank you for the help!

Regards

Alexei Ferreira


Tags: developer