Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
[Liferay 7.1] Error trying to startup with read-write split
Hi,
I'm trying to deploy a Liferay Community 7.1.2 CE GA3 with read-write split enabled in the datasource.
After following the instructions on https://dev.liferay.com/en/discover/deployment/-/knowledge_base/7-1/point-all-nodes-to-the-same-database , the following error occurs just after the Liferay banner appears:
I had previously succeded on this using 7.0 CE, but I don't know why this is happening. This is the portal-ext.properties configuration:
Does anyone have any idea? I already tried with all other pool providers.
Best regards.
I'm trying to deploy a Liferay Community 7.1.2 CE GA3 with read-write split enabled in the datasource.
After following the instructions on https://dev.liferay.com/en/discover/deployment/-/knowledge_base/7-1/point-all-nodes-to-the-same-database , the following error occurs just after the Liferay banner appears:
java.lang.NullPointerException
at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceAdvice.before(DynamicDataSourceAdvice.java:53)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:44)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:47)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:39)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:48)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)
at com.sun.proxy.$Proxy205.getBuildNumberOrCreate(Unknown Source)
at com.liferay.portal.kernel.service.ReleaseLocalServiceUtil.getBuildNumberOrCreate(ReleaseLocalServiceUtil.java:207)
at com.liferay.portal.tools.DBUpgrader.checkRequiredBuildNumber(DBUpgrader.java:69)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:150)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:78)
at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1299)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:276)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1124)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1079)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:971)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4829)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:966)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)I had previously succeded on this using 7.0 CE, but I don't know why this is happening. This is the portal-ext.properties configuration:
jdbc.default.liferay.pool.provider=dbcp
counter.jdbc.prefix=jdbc.write.
jdbc.write.driverClassName=org.postgresql.Driver
jdbc.write.url=jdbc:postgresql://postgres-lportal-postgresql:5432/lportal
jdbc.write.username=lportal
jdbc.write.password=*****
jdbc.read.driverClassName=org.postgresql.Driver
jdbc.read.url=jdbc:postgresql://postgres-lportal-postgresql-read:5432/lportal
jdbc.read.username=lportal
jdbc.read.password=*****
setup.wizard.enabled=false
module.framework.properties.lpkg.index.validator.enabled=false
web.server.protocol=https
dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
jdbc.default.validationQuery=
jdbc.read.validationQuery=SELECT releaseId FROM Release_
jdbc.write.validationQuery=SELECT releaseId FROM Release_
cluster.link.enabled=true
spring.configs=\
META-INF/base-spring.xml,\
\
META-INF/util-spring.xml,\
\
META-INF/executor-spring.xml,\
META-INF/fabric-spring.xml,\
\
META-INF/messaging-core-spring.xml,\
META-INF/messaging-misc-spring.xml,\
\
META-INF/security-spring.xml,\
\
META-INF/asset-spring.xml,\
META-INF/cluster-spring.xml,\
META-INF/comment-spring.xml,\
META-INF/company-provider-spring.xml,\
META-INF/document-library-spring.xml,\
META-INF/layout-spring.xml,\
META-INF/model-listener-spring.xml,\
META-INF/notifications-spring.xml,\
META-INF/poller-spring.xml,\
META-INF/prefs-spring.xml,\
META-INF/repository-spring.xml,\
META-INF/search-spring.xml,\
META-INF/social-spring.xml,\
META-INF/workflow-spring.xml,\
\
META-INF/counter-spring.xml,\
META-INF/mail-spring.xml,\
META-INF/portal-spring.xml,\
META-INF/portlet-container-spring.xml,\
META-INF/staging-spring.xml,\
META-INF/virtual-layouts-spring.xml,\
\
META-INF/monitoring-spring.xml,\
\
META-INF/dynamic-data-source-spring.xml,\
\
classpath*:META-INF/ext-spring*.xml
spring.infrastructure.configs=\
META-INF/infrastructure-spring.xml,\
\
META-INF/counter-infrastructure-spring.xml,\
META-INF/dynamic-data-source-infrastructure-spring.xml,\
META-INF/hibernate-spring.xmlDoes anyone have any idea? I already tried with all other pool providers.
Best regards.
Hi Marino,
I think your problem is same than https://issues.liferay.com/browse/LPS-90211 that will be included in next release.
That issue was solved with this change: https://github.com/brianchandotcom/liferay-portal-ee/pull/23206/files
Until next release is released, perhaps you can change dynamic-data-source-spring.xml file and apply manually that changes.
In order to extend that file, copy it to your classes folder in order to be found by liferay:
Regards,
Jorge Díaz
I think your problem is same than https://issues.liferay.com/browse/LPS-90211 that will be included in next release.
That issue was solved with this change: https://github.com/brianchandotcom/liferay-portal-ee/pull/23206/files
Until next release is released, perhaps you can change dynamic-data-source-spring.xml file and apply manually that changes.
In order to extend that file, copy it to your classes folder in order to be found by liferay:
- In portal-ext.properties, replace dynamic-data-source-infrastructure-spring.xml with custom-dynamic-data-source-infrastructure-spring.xml
- Download fixed version of dynamic-data-source-spring.xml from github and copy it to WEB-INF/classes/META-INF
Regards,
Jorge Díaz