Error creating bean with name 'i18NBean' defined in class path resource ...
Asked by Onur?:

Hi,

We are experiencing a problem setting up new instance with confluence on linux. It is being configured by ansible. if we try to create new instance with setup wizard. we get following error.

But If we restore one of our backup, it works. (with same configuration)

Things we have tried is

- we have enough memory during installation (jvm, postgresql, host system)

- all file under work dir is created by confluence, and user has access writes.

Can you help us elaborate problem?

Let me know if you have questions.

Confluence version: 6.2.2

Linux: Red Hat Enterprise Linux Server release 7.2 (Maipo)

Docker: version 17.03.1-ce

**type** Exception report

**message** ++com.atlassian.spring.container.ComponentNotFoundException: Failed to find component: Error creating bean with name 'i18NBean' defined in class path resource \[i18NContext.xml\]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate \[com.atlassian.confluence.util.i18n.I18NBean\]: Factory method 'getI18NBean' threw exception; nested exception is java.util.concurrent.CompletionException: 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\]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: premature SessionFactory initialisation, Hibernate properties have not yet been persisted in confluence.cfg.xml++

**description** ++The server encountered an internal error that prevented it from fulfilling this request.++

**exception**

```
com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.spring.container.ComponentNotFoundException: Failed to find component: Error creating bean with name 'i18NBean' defined in class path resource [i18NContext.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.confluence.util.i18n.I18NBean]: Factory method 'getI18NBean' threw exception; nested exception is java.util.concurrent.CompletionException: 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]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: premature SessionFactory initialisation, Hibernate properties have not yet been persisted in confluence.cfg.xml	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.security.websudo.MessagesDecoratorFilter.getI18NBean(MessagesDecoratorFilter.java:97)	com.atlassian.confluence.security.websudo.MessagesDecoratorFilter.doFilter(MessagesDecoratorFilter.java:64)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65)	com.atlassian.confluence.util.profiling.ProfilingSiteMeshFilter.doFilter(ProfilingSiteMeshFilter.java:45)	com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
```

From catalina.log

03-Oct-2017 17:44:13.441 SEVERE \[http-nio-8090-exec-3\] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage\[errorCode=500, location=/500page.jsp\]  
org.apache.jasper.JasperException: An exception occurred processing JSP page /500page.jsp at line 119

116:  
117: if (sysInfoService != null)  
118: {  
119: confluenceInfo = sysInfoService.getConfluenceInfo();  
120: memoryInfo = sysInfoService.getMemoryInfo();  
121: dbInfo = sysInfoService.getSafeDatabaseInfo();  
122: sysinfo = GeneralUtil.convertBeanToMap(sysInfoService.getSystemProperties());

<br />

Stacktrace:  
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:579)  
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476)  
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)  
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)  
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)  
at com.atlassian.confluence.util.profiling.ProfilingSiteMeshFilter.doFilter(ProfilingSiteMeshFilter.java:45)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:88)  
at com.atlassian.confluence.web.filter.ConfluenceSecurityFilter.doFilter(ConfluenceSecurityFilter.java:25)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70)  
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:65)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.confluence.web.filter.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:54)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)  
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)  
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)  
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)  
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:716)  
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:468)  
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)  
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)  
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:442)  
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:301)  
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:396)  
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:176)  
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)  
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)  
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)  
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)  
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)  
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)  
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
at java.lang.Thread.run(Thread.java:748)  
Caused by: java.util.concurrent.CompletionException: com.atlassian.confluence.tenant.VacantException: Confluence is vacant, a call to tenanted \[public abstract org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException\] is not allowed.  
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.confluence.impl.concurrency.CompletionStageUtils.foldResult(CompletionStageUtils.java:19)  
at com.atlassian.confluence.impl.vcache.SynchronousExternalCache.get(SynchronousExternalCache.java:236)  
at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java:78)  
at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java:71)  
at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:32)  
at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java:24)  
at com.atlassian.confluence.setup.settings.DefaultSettingsManager.getGlobalSettings(DefaultSettingsManager.java:38)  
at com.atlassian.confluence.status.service.DefaultSystemInformationService.getConfluenceInfo(DefaultSystemInformationService.java:97)  
at org.apache.jsp._500page_jsp._jspService(_500page_jsp.java:306)  
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)  
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)  
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)  
... 70 more  
Caused by: com.atlassian.confluence.tenant.VacantException: Confluence is vacant, a call to tenanted \[public abstract org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException\] is not allowed.  
at com.atlassian.confluence.tenant.TenantGate$1.lambda$create$0(TenantGate.java:43)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)  


Answers:
author: liufeng
body: ???????????????