Error installing Confluence-Server on MacOSX: org.springframework.beans.factory.BeanCreationExcept
Asked by Hugh_D:

Hi - I'm installing Confluence-Server on MacOSX Catalina 10.15.4.

I understand that Confluence isn't actually supported for OSX but the official (unofficial) advice is to follow the Linux instructions which I'm doing - referenced here:

<https://confluence.atlassian.com/doc/installing-confluence-on-linux-from-archive-file-255362363.html>

I have set directory permissions for my personal user in both the confluence-install directory and confluence-home directory.

I've set up a PostgresSQL database with owner as the same user and successfully tested the connection in the Confluence setup page.

I'm getting the error below.

I get a similar error whether or not I select use My Own Database or use the trial database in the Confluence setup page.

**Type** Exception Report

**Message** Error creating bean with name 'tenantedTransactionManager' defined in class path resource \[databaseSubsystemContext.xml\]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedLocalSessionFactoryBean5' defined in class path resource \[productionDatabaseContext.xml\]: Bean instantiation via constructor failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.impl.hibernate.ConfluenceLocalSessionFactoryBean

**Description** The server encountered an unexpected condition that prevented it from fulfilling the request.

**Exception**

```
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedTransactionManager' defined in class path resource [databaseSubsystemContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedLocalSessionFactoryBean5' defined in class path resource [productionDatabaseContext.xml]: Bean instantiation via constructor failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.impl.hibernate.ConfluenceLocalSessionFactoryBean	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771)	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)	org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)	com.atlassian.confluence.impl.tenant.TenantedProxyFactory.getBean(TenantedProxyFactory.java:75)	com.atlassian.confluence.impl.tenant.TenantedProxyFactory.lambda$createTargetSource$0(TenantedProxyFactory.java:65)	com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)	com.atlassian.confluence.impl.tenant.TenantedProxyFactory.getDelegate(TenantedProxyFactory.java:79)	com.atlassian.confluence.impl.tenant.TenantedProxyFactory.lambda$createTargetSource$2(TenantedProxyFactory.java:71)	com.atlassian.confluence.impl.tenant.TenantedProxyFactory$1.getTarget(TenantedProxyFactory.java:127)	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192)	com.sun.proxy.$Proxy208.getTransaction(Unknown Source)	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:475)	org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:289)	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)	com.sun.proxy.$Proxy209.retrieve(Unknown Source)	com.atlassian.confluence.impl.bandana.ReadThroughCachingBandanaPersister.lambda$retrieve$0(ReadThroughCachingBandanaPersister.java:84)	com.atlassian.confluence.impl.cache.ReadThroughAtlassianCache.lambda$get$0(ReadThroughAtlassianCache.java:76)	com.atlassian.confluence.cache.ehcache.DefaultConfluenceEhCache$ValueWrapperSupplier.get(DefaultConfluenceEhCache.java:228)	com.atlassian.confluence.cache.ehcache.DefaultConfluenceEhCache$ValueWrapperSupplier.get(DefaultConfluenceEhCache.java:217)	com.atlassian.cache.ehcache.ReferenceCacheLoader.load(ReferenceCacheLoader.java:31)	com.atlassian.cache.ehcache.wrapper.ValueProcessorEhcacheLoaderDecorator.load(ValueProcessorEhcacheLoaderDecorator.java:30)	net.sf.ehcache.Cache.loadValueUsingLoader(Cache.java:3360)	net.sf.ehcache.Cache.getWithLoader(Cache.java:1848)	com.atlassian.cache.ehcache.DelegatingCache.get(DelegatingCache.java:128)	com.atlassian.confluence.cache.ehcache.DefaultConfluenceEhCache.get(DefaultConfluenceEhCache.java:47)	com.atlassian.confluence.cache.ConfluenceMonitoringCache.get(ConfluenceMonitoringCache.java:57)	com.atlassian.confluence.impl.cache.ReadThroughAtlassianCache.get(ReadThroughAtlassianCache.java:88)	com.atlassian.confluence.impl.cache.ReadThroughCache.get(ReadThroughCache.java:28)	com.atlassian.confluence.impl.bandana.ReadThroughCachingBandanaPersister.retrieve(ReadThroughCachingBandanaPersister.java:82)	com.atlassian.confluence.impl.bandana.ReadThroughCachingBandanaPersister.retrieve(ReadThroughCachingBandanaPersister.java:75)	com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:32)	com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:24)	com.atlassian.confluence.setup.settings.DefaultSettingsManager.getGlobalSettings(DefaultSettingsManager.java:40)	com.atlassian.confluence.languages.DefaultLocaleManager.getSiteDefaultLocale(DefaultLocaleManager.java:227)	com.atlassian.confluence.languages.DefaultLocaleManager.getLocaleInfo(DefaultLocaleManager.java:129)	com.atlassian.confluence.languages.DefaultLocaleManager.getLocale(DefaultLocaleManager.java:211)	com.atlassian.confluence.util.i18n.UserI18NBeanFactory.getUserLocale(UserI18NBeanFactory.java:44)	com.atlassian.confluence.util.i18n.UserI18NBeanFactory.getI18NBean(UserI18NBeanFactory.java:34)	com.atlassian.confluence.util.message.MessagesDecoratorFilter.getI18NBean(MessagesDecoratorFilter.java:103)	com.atlassian.confluence.util.message.MessagesDecoratorFilter.doFilter(MessagesDecoratorFilter.java:70)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)	com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)	com.atlassian.confluence.util.profiling.ProfilingSiteMeshFilter.doFilter(ProfilingSiteMeshFilter.java:50)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)	com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)	com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:97)	com.atlassian.confluence.cache.TransactionalCacheFactoryCleanupFilter.doFilter(TransactionalCacheFactoryCleanupFilter.java:22)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:17)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.UserLoggingContextFilter.doFilter(UserLoggingContextFilter.java:32)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.UserNameHeaderFilter.doFilter(UserNameHeaderFilter.java:25)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.web.filter.MauEventFilter.doFilterInternal(MauEventFilter.java:34)	com.atlassian.confluence.web.filter.AbstractStaticResourceAwareFilter.doFilter(AbstractStaticResourceAwareFilter.java:43)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:38)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.web.filter.ConfluenceTimeoutFilter.doFilter(ConfluenceTimeoutFilter.java:57)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.web.filter.HttpSessionRegistrarFilter.doFilter(HttpSessionRegistrarFilter.java:44)	com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:88)	com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.applyFilter(ConfluenceSecurityFilter.java:40)	com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:29)	com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:25)	com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter$SwapOnBootstrapFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:45)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:35)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)	com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)	com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:57)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.web.filter.ConfluenceOpenSessionInViewFilter.doFilterInternal(ConfluenceOpenSessionInViewFilter.java:38)	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)	com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:24)	com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:105)	com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:37)	com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:31)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)	com.atlassian.johnson.plugin.servlet.filter.JohnsonServletFilterModuleContainerFilter.doFilter(JohnsonServletFilterModuleContainerFilter.java:50)	com.atlassian.confluence.tenant.TenantGateFilter.lambda$doFilter$0(TenantGateFilter.java:35)	com.atlassian.confluence.impl.tenant.ThreadLocalTenantGate.lambda$wrap$0(ThreadLocalTenantGate.java:25)	com.atlassian.confluence.tenant.TenantGateFilter.doFilter(TenantGateFilter.java:37)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:36)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.internal.web.filter.spring.IgnoreWebAsyncManagerFilter.doFilter(IgnoreWebAsyncManagerFilter.java:59)	com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:51)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:39)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71)	com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:39)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.impl.vcache.VCacheRequestContextFilter.doFilter(VCacheRequestContextFilter.java:58)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:33)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:67)	com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:54)	com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:25)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:59)	com.atlassian.confluence.web.ConfluenceJohnsonFilter.doFilter(ConfluenceJohnsonFilter.java:32)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.doFilterInternal(ConfluenceEncodingFilter.java:35)	com.atlassian.confluence.web.filter.AbstractStaticResourceAwareFilter.doFilter(AbstractStaticResourceAwareFilter.java:43)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:37)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:64)	com.atlassian.confluence.internal.diagnostics.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:35)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
```


Answers:
author: Hugh_D
body: Hi -

Atlassian-confluence-7.5.0.tar.gz

I don't believe there is an installer for Mac - instead I extract and move the contents to \<confluence-home\>

I do not run a proxy server.

postgresql-12.3-1

java 13.0.2 2020-01-14  
Java(TM) SE Runtime Environment (build 13.0.2+8)  
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

From you link:

1. The confluence user doesn't own and have full access to the file system under the installation and home directories - I'm running as myself and I have full access
2. A virus scanner is blocking access to files - not running one
3. You are running it as "root". - I'm running as myself
4. A an application blocker is stopping it - SELinux for example - not sure how to check this?
5. You've set a JAVA_HOME and pointed it at the wrong version of Java for it - I don't believe I've set this. I'm not sure how to check it
6. The database driver is missing from the installation (Check \<install\>/confluence/WEB-INF/lib for a driver jar) - I'm not sure which driver I should be looking for. There are many jar files in this directory
7. The hostname of the server can not be resolved by itself - the database connection test seems to work
8. The server does not have enough memory during installation to set up the database - the database connection test seems to work

Thank you very much for your help.

comments: author: Amith Mathur _Appfire_
body: Hi [@Hugh_D](/t5/user/viewprofilepage/user-id/3946234) ,

Thank you for the detail information.

No, you need not extract and move the contents to \<confluence-home\> dir. The directories inside the home dir will be created automatically.

Can you extract it once again, create a new home directory and update the home directory location at \<installation-directory\>\\confluence\\WEB-INF\\classes\\confluence-init.properties ?

Once you do so, just start the confluence from \<installation-directory\>/bin ?

Thanks,  
Amith Mathur


author: Hugh_D
body: Apologies, I extracted and moved the contents to \<confluence-install\>, not \<confluence-home\>. Specifically, I am following these instructions:

"You can't install bin types of files on mac, I believe, it will not recognise them it due to dozen or so security restrictions on macs.

You need to follow [Installing Confluence on Linux from Archive File](https://confluence.atlassian.com/doc/installing-confluence-on-linux-from-archive-file-255362363.html?_ga=2.52339049.1786326461.1591001059-1385677692.1590767628) guide. In summary:

1. Create a dedicated "confluence" account
2. Create new install dir
3. Extract tar.gz archive contents into install dir
4. Give permissions to install dir to "confluence" account
5. Create new home directory
6. Modify system properties file from instal dir to point to new home
7. Verify default ports of 8090 and 8091 can be used, if you want custom, modify server.xml file
8. Use \<installation-directory\>/bin/start-confluence.sh to start confluence
9. Access it via localhost:port and proceed with setup"

Given my typo between \<home\> and \<install\>, is your response still worth pursuing?

Thank you


author: Amith Mathur _Appfire_
body: Hi [@Hugh_D](/t5/user/viewprofilepage/user-id/3946234)

What is the version of Confluence you are trying to install? Are you using the installer?

Are you behind any proxy server?

It does point to java.lang.NoClassDefFoundError which means it is unable to locate some of the class files. What is the Java version you are using ?

```
Bean instantiation via constructor failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.confluence.impl.hibernate.ConfluenceLocalSessionFactoryBean
```

One of the error message was also discussed at [this community post](https://community.atlassian.com/t5/Confluence-questions/My-confluence-installation-failed/qaq-p/618217).

Thanks,  
Amith Mathur


Tags: confluence-server

server