Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
tri trong
How to create Read-Writer database Splitting on Liferay 6.1 ?
December 4, 2012 8:00 PM
Answer

tri trong

Rank: New Member

Posts: 9

Join Date: June 27, 2012

Recent Posts

Hi all.
I want setup Read-Writer database Splitting on Liferay 6.1.I do follow instructions below
Create file portal-ext.properties, add content:

 1jdbc.read.driverClassName=com.mysql.jdbc.Driver
 2jdbc.read.url=jdbc:mysql://dbread.com/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
 3jdbc.read.username=**your user name**
 4jdbc.read.password=**your password**
 5jdbc.write.driverClassName=com.mysql.jdbc.Driver
 6jdbc.write.url=jdbc:mysql://dbwrite.com/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
 7jdbc.write.username=**your user name**
 8jdbc.write.password=**your password**
 9
10spring.configs=\ META-INF/base-spring.xml,\
11META-INF/hibernate-spring.xml,\
12META-INF/infrastructure-spring.xml,\
13META-INF/management-spring.xml,\
14META-INF/util-spring.xml,\
15META-INF/editor-spring.xml,\
16META-INF/jcr-spring.xml,\
17META-INF/messaging-spring.xml,\
18META-INF/scheduler-spring.xml,\
19META-INF/search-spring.xml,\
20META-INF/counter-spring.xml,\
21META-INF/document-library-spring.xml,\
22META-INF/lock-spring.xml,\
23META-INF/mail-spring.xml,\
24META-INF/portal-spring.xml,\
25META-INF/portlet-container-spring.xml,\
26META-INF/wsrp-spring.xml,\
27META-INF/mirage-spring.xml,\
28**META-INF/dynamic-data-source-spring.xml,\**
29#META-INF/shard-data-source-spring.xml,\
30META-INF/ext-spring.xml

But i give error when startup Liferay
Log:
  1NFO: Deploying configuration descriptor /opt/liferay/tomcat-7.0.27/conf/Catalina/localhost/ROOT.xml
  2Loading jar:file:/opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
  3Loading jar:file:/opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
  4Loading file:/opt/liferay/portal-setup-wizard.properties
  5Loading file:/opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties
  6Dec 5, 2012 3:28:44 AM org.apache.catalina.core.ApplicationContext log
  7INFO: Initializing Spring root WebApplicationContext
  803:28:51,037 INFO  [pool-2-thread-1][ShardDataSourceTargetSource:82] Sharding configured with 3 data sources
  903:28:51,877 INFO  [pool-2-thread-1][DialectDetector:71] Determine dialect for HSQL Database Engine 2
 1003:28:51,878 WARN  [pool-2-thread-1][DialectDetector:86] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal-ext.properties.
 1103:28:51,984 INFO  [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.HSQLDialect
 1203:28:58,402 ERROR [pool-2-thread-1][ContextLoader:227] Context initialization failed
 13org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor#0' defined in class path resource [META-INF/base-spring.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJAroundAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
 14        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
 15        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
 16        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 17        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
 18        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
 19        at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:722)
 20        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)
 21        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
 22        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
 23        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
 24        at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:172)
 25        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
 26        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
 27        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 28        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
 29        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
 30        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
 31        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
 32        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
 33        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 34        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 35        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 36        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 37        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
 38        at java.lang.Thread.run(Thread.java:679)
 39Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJAroundAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
 40        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
 41        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
 42        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
 43        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
 44        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1002)
 45        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:906)
 46        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)
 47        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
 48        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
 49        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 50        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
 51        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
 52        at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:86)
 53        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:100)
 54        at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:107)
 55        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:278)
 56        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:847)
 57        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:819)
 58        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:445)
 59        ... 24 more
 60Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
 61        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
 62        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
 63        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)
 64        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
 65        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1002)
 66        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:906)
 67        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)
 68        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
 69        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
 70        ... 42 more
 71Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
 72        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
 73        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
 74        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
 75        ... 50 more
 76Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
 77        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
 78        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
 79        at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:558)
 80        at org.springframework.aop.config.MethodLocatingFactoryBean.setBeanFactory(MethodLocatingFactoryBean.java:68)
 81        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1441)
 82        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1410)
 83        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
 84        ... 52 more
 85Dec 5, 2012 3:28:58 AM org.apache.catalina.core.StandardContext listenerStart
 86SEVERE: Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
 87org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor#0' defined in class path resource [META-INF/base-spring.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJAroundAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
 88        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
 89        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
 90        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 91        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
 92        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
 93        at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:722)
 94        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)
 95        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
 96        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
 97        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
 98        at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:172)
 99        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
100        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
101        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
102        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
103        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
104        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
105        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
106        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
107        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
108        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
109        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
110        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
111        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
112        at java.lang.Thread.run(Thread.java:679)
113Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJAroundAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
114        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
115        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
116        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
117        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
118        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1002)
119        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:906)
120        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)
121        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
122        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
123        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
124        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
125        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
126        at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:86)
127        at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:100)
128        at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:107)
129        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:278)
130        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:847)
131        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:819)
132        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:445)
133        ... 24 more
134Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
135        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
136        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
137        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)
138        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
139        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1002)
140        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:906)
141        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)
142        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
143        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
144        ... 42 more
145Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
146        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
147        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
148        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
149        ... 50 more
150Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'messagingProxyAdvice' is defined
151        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
152        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
153        at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:558)
154        at org.springframework.aop.config.MethodLocatingFactoryBean.setBeanFactory(MethodLocatingFactoryBean.java:68)
155        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1441)
156        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1410)
157        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
158        ... 52 more
159Dec 5, 2012 3:28:58 AM org.apache.catalina.core.StandardContext startInternal
160SEVERE: Error listenerStart
161Dec 5, 2012 3:28:58 AM org.apache.catalina.core.StandardContext startInternal
162SEVERE: Context [] startup failed due to previous errors
16303:28:58,621 ERROR [pool-2-thread-1][PortalContextLoaderListener:107] java.lang.NullPointerException
164java.lang.NullPointerException
165        at com.liferay.portal.kernel.servlet.DirectServletRegistryUtil.clearServlets(DirectServletRegistryUtil.java:27)
166        at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:104)
167        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4819)
168        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5466)
169        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
170        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
171        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
172        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
173        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
174        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
175        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
176        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
177        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
178        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
179        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
180        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
181        at java.lang.Thread.run(Thread.java:679)
18203:28:58,622 ERROR [pool-2-thread-1][PortalContextLoaderListener:114] java.lang.NullPointerException
183java.lang.NullPointerException
184        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.reset(HotDeployUtil.java:45)
185        at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:111)
186        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4819)
187        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5466)
188        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
189        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
190        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
191        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
192        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
193        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
194        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
195        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
196        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
197        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
198        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
199        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
200        at java.lang.Thread.run(Thread.java:679)
201Dec 5, 2012 3:28:58 AM org.apache.catalina.core.ApplicationContext log
202INFO: Closing Spring root WebApplicationContext
203Dec 5, 2012 3:28:58 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
204SEVERE: The web application [] appears to have started a thread named [HSQLDB Timer @4f50f0e2] but has failed to stop it. This is very likely to create a memory leak.
205Dec 5, 2012 3:28:58 AM org.apache.catalina.startup.HostConfig deployDirectory
206INFO: Deploying web application directory /opt/liferay/tomcat-7.0.27/webapps/welcome-theme
207Dec 5, 2012 3:28:59 AM org.apache.catalina.startup.HostConfig deployDirectory
208INFO: Deploying web application directory /opt/liferay/tomcat-7.0.27/webapps/marketplace-portlet
209Dec 5, 2012 3:29:00 AM org.apache.catalina.startup.HostConfig deployDirectory
210INFO: Deploying web application directory /opt/liferay/tomcat-7.0.27/webapps/resources-importer-web
211Dec 5, 2012 3:29:00 AM org.apache.coyote.AbstractProtocol start
212INFO: Starting ProtocolHandler ["http-bio-8080"]
213Dec 5, 2012 3:29:00 AM org.apache.coyote.AbstractProtocol start
214INFO: Starting ProtocolHandler ["ajp-bio-8009"]
215Dec 5, 2012 3:29:00 AM org.apache.catalina.startup.Catalina start
216INFO: Server startup in 19995 ms


Plaese help me. Sorry for English not good.
Thank.
tri trong
RE: How to create Read-Writer database Splitting on Liferay 6.1 ?
December 6, 2012 5:30 PM
Answer

tri trong

Rank: New Member

Posts: 9

Join Date: June 27, 2012

Recent Posts

Please help me emoticon
Miguel Saraiva Sampaio
RE: How to create Read-Writer database Splitting on Liferay 6.1 ?
March 8, 2013 4:22 AM
Answer

Miguel Saraiva Sampaio

Rank: New Member

Posts: 14

Join Date: January 15, 2011

Recent Posts

I have precisely the same problem. and it's the spring entries that are causing it on my opinion.

Did you solve you problem?
Antoine Comble
RE: How to create Read-Writer database Splitting on Liferay 6.1 ?
June 21, 2013 7:15 AM
Answer

Antoine Comble

Rank: Regular Member

Posts: 205

Join Date: September 7, 2012

Recent Posts

I've the same proble too...

Anyone solves it ?

Thanks,

Antoine
Antoine Comble
RE: How to create Read-Writer database Splitting on Liferay 6.1 ?
July 15, 2013 6:37 AM
Answer

Antoine Comble

Rank: Regular Member

Posts: 205

Join Date: September 7, 2012

Recent Posts

Hi,

portal-setup-wzard.properties :
 1
 2jdbc.default.driverClassName=org.postgresql.Driver
 3jdbc.default.username=test
 4jdbc.default.url=jdbc:postgresql://localhost:5432/write
 5jdbc.default.password=test
 6jdbc.read.driverClassName=org.postgresql.Driver
 7jdbc.read.url=jdbc:postgresql://localhost:5432/read
 8jdbc.read.username=test
 9jdbc.read.password=test
10jdbc.write.driverClassName=org.postgresql.Driver
11jdbc.write.url=jdbc:postgresql://localhost:5432/write
12jdbc.write.username=test
13jdbc.write.password=test


portal-ext.properties :
 1
 2spring.configs=\
 3        META-INF/base-spring.xml,\
 4        \
 5        META-INF/hibernate-spring.xml,\
 6        META-INF/infrastructure-spring.xml,\
 7        META-INF/management-spring.xml,\
 8        \
 9        META-INF/util-spring.xml,\
10        \
11        META-INF/jpa-spring.xml,\
12        \
13        META-INF/executor-spring.xml,\
14        \
15        META-INF/audit-spring.xml,\
16        META-INF/cluster-spring.xml,\
17        META-INF/editor-spring.xml,\
18        META-INF/jcr-spring.xml,\
19        META-INF/ldap-spring.xml,\
20        META-INF/messaging-core-spring.xml,\
21        META-INF/messaging-misc-spring.xml,\
22        META-INF/mobile-device-spring.xml,\
23        META-INF/notifications-spring.xml,\
24        META-INF/poller-spring.xml,\
25        META-INF/rules-spring.xml,\
26        META-INF/scheduler-spring.xml,\
27        META-INF/scripting-spring.xml,\
28        META-INF/search-spring.xml,\
29        META-INF/workflow-spring.xml,\
30        \
31        META-INF/counter-spring.xml,\
32        META-INF/mail-spring.xml,\
33        META-INF/portal-spring.xml,\
34        META-INF/portlet-container-spring.xml,\
35        META-INF/staging-spring.xml,\
36        META-INF/virtual-layouts-spring.xml,\
37        \
38        META-INF/dynamic-data-source-spring.xml,\
39        #META-INF/shard-data-source-spring.xml,\
40        #META-INF/memcached-spring.xml,\
41        #META-INF/monitoring-spring.xml,\
42        \
43        META-INF/ext-spring.xml


Don't forget to activate replication between two databases.

Hope this help someone,

Regards

Antoine