Error when sharing a same db with two servers, server1 gets down - Error creating bean with name 'themeSource' defined in ServletContext resource

0

Scenario: Trying to design a cluster - Sharing repository db from Server1(VM1) to Server2 (VM2) - Linux(Azure cloud) - Server1 got down and Server2 is up and running using db from Server1.

Server1 : (Jasper server 7.1.1 Enterprise edition - tomcat 8.5.34)

This server is installed using installer method (bundled postgresql and bundled tomcat)

Server2: (Jasper server 7.1.1 Enterprise edition - tomcat 8.5.34)

This server is installed using war file distribution method (Sharing DB from server1 and separate tomcat installed)

After installing Server2, the Server1 gets down but Server2 is up and running.

Please help me on this issue.

=============== Error Log ===============================================================

<span style="font-size:14px">2019-05-09 11:19:47,198 ERROR ContextLoader,localhost-startStop-1:331 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'themeSource' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'themeCache' while setting bean property 'themeCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'themeCache' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'unsecureRepositoryService' while setting bean property 'repositoryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateRepositoryService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'auditContext' while setting bean property 'auditContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditContext' defined in ServletContext resource [/WEB-INF/applicationContext-audit.xml]: Cannot resolve reference to bean 'mtLoggingContextProvider' while setting bean property 'loggingContextProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtLoggingContextProvider' defined in ServletContext resource [/WEB-INF/applicationContext-multiTenancy.xml]: Cannot resolve reference to bean 'loggingEventsService' while setting bean property 'loggingService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loggingEventsService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'routingMapPro' defined in ServletContext resource [/WEB-INF/applicationContext-audit.xml]: Cannot resolve reference to bean 'accessService' while setting constructor argument with key [TypedStringValue: value [com.jaspersoft.jasperserver.api.logging.access.domain.AccessEvent], target type [class java.lang.Class]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessService' defined in ServletContext resource [/WEB-INF/applicationContext-events-logging.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'driverDeleteListener' while setting bean property 'eventListeners' with key [TypedStringValue: value [post-commit-delete], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationBean': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.context.MessageSource com.jaspersoft.jasperserver.war.common.ConfigurationBean.messages; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.jaspersoft.jrs.data.webservice.WebServiceDataSourceDefinition] for bean with name 'webServiceDataSource' defined in ServletContext resource [/WEB-INF/applicationContext-WebServiceDataSource.xml]; nested exception is java.lang.ClassNotFoundException: com.jaspersoft.jrs.data.webservice.WebServiceDataSourceDefinition
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1131)
        at org.springframework.ui.context.support.UiApplicationContextUtils.initThemeSource(UiApplicationContextUtils.java:58)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.onRefresh(AbstractRefreshableWebApplicationContext.java:195)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
@                                                                                                                                                            @                                                                                                                                                            @                                                                                                                                                            @                                                                                                                                                            @                                                                                                                                                            
</span>

maduraipandian.manivel's picture
Joined: Mar 22 2019 - 12:02am
Last seen: 1 month 2 days ago

3 Answers:

0

You'll need to cluster the application server as well as the database because jasperreports server caches content.

hozawa's picture
45149
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 month 1 week ago
0

Thanks hozawa. ..!!!

My plan is to use dedicated repository DB sharing all other servers. Is this possible?? And why this is not working.. What I need to do to resolve this issue?

Please advise 

Thanks in advance , 

Maduraipandian Manivel

maduraipandian.manivel's picture
Joined: Mar 22 2019 - 12:02am
Last seen: 1 month 2 days ago
0

So you meant ..  In this case do I need to install 2 repository databases?

As of now,  server1 having bundled postgresql dB and tomcat, server2 having only tomcat.

Please advice.

maduraipandian.manivel's picture
Joined: Mar 22 2019 - 12:02am
Last seen: 1 month 2 days ago
Feedback