Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-103909

BeanCreationException connecting to database

    Details

    • Fix Priority:
      5

      Description

      CounterLocalServiceTest > testConcurrentIncrement is failing with:

          [exec] com.liferay.counter.test.CounterLocalServiceTest > testConcurrentIncrement FAILED
           [exec]     java.util.concurrent.ExecutionException: com.liferay.petra.process.ProcessException: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.util.InfrastructureUtil#0' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot resolve reference to bean 'liferayDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot create inner bean 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' of type [com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean] while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
           [exec]     	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
           [exec]     	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
           [exec]     	at com.liferay.counter.test.CounterLocalServiceTest.testConcurrentIncrement(CounterLocalServiceTest.java:187)
           [exec]     	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]     	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]     	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]     	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$2.evaluate(TestExecutorRunnable.java:234)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
           [exec]     	at com.liferay.portal.kernel.test.rule.TimeoutTestRule$1.evaluate(TimeoutTestRule.java:89)
           [exec]     	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
           [exec]     	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181)
           [exec]     	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95)
           [exec]     	at java.lang.Thread.run(Thread.java:745)
           [exec]     Caused by: com.liferay.petra.process.ProcessException: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.util.InfrastructureUtil#0' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot resolve reference to bean 'liferayDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot create inner bean 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' of type [com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean] while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
           [exec]     	at com.liferay.petra.process.local.LocalProcessLauncher.main(LocalProcessLauncher.java:153)
           [exec]     Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.util.InfrastructureUtil#0' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot resolve reference to bean 'liferayDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot create inner bean 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' of type [com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean] while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
           [exec]     	at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:276)
           [exec]     	at com.liferay.counter.test.CounterLocalServiceTest$IncrementProcessCallable.call(CounterLocalServiceTest.java:257)
           [exec]     	at com.liferay.counter.test.CounterLocalServiceTest$IncrementProcessCallable.call(CounterLocalServiceTest.java:212)
           [exec]     	at com.liferay.petra.process.local.LocalProcessLauncher.main(LocalProcessLauncher.java:135)
           [exec]     Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.util.InfrastructureUtil#0' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot resolve reference to bean 'liferayDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot create inner bean 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' of type [com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean] while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
           [exec]     	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
           [exec]     	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1534)
           [exec]     	at com.liferay.portal.spring.bean.LiferayBeanFactory.populateBean(LiferayBeanFactory.java:152)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
           [exec]     	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
           [exec]     	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
           [exec]     	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
           [exec]     	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
           [exec]     	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
           [exec]     	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
           [exec]     	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
           [exec]     	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
           [exec]     	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
           [exec]     	at com.liferay.portal.spring.context.ArrayApplicationContext.<init>(ArrayApplicationContext.java:33)
           [exec]     	at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:218)
           [exec]     	... 3 more
           [exec]     Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSource' defined in class path resource [META-INF/infrastructure-spring.xml]: Cannot create inner bean 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' of type [com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean] while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
           [exec]     	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
           [exec]     	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1534)
           [exec]     	at com.liferay.portal.spring.bean.LiferayBeanFactory.populateBean(LiferayBeanFactory.java:152)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
           [exec]     	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
           [exec]     	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
           [exec]     	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
           [exec]     	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
           [exec]     	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
           [exec]     	... 19 more
           [exec]     Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean#6b587673' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
           [exec]     	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299)
           [exec]     	... 29 more
           [exec]     Caused by: java.lang.NullPointerException
           [exec]     	at java.lang.String.startsWith(String.java:1405)
           [exec]     	at java.lang.String.startsWith(String.java:1434)
           [exec]     	at com.liferay.portal.kernel.util.PropertiesUtil.getProperties(PropertiesUtil.java:88)
           [exec]     	at com.liferay.portal.configuration.ConfigurationImpl.getProperties(ConfigurationImpl.java:267)
           [exec]     	at com.liferay.portal.util.PropsUtil.getProperties(PropsUtil.java:208)
           [exec]     	at com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean.createInstance(DataSourceFactoryBean.java:41)
           [exec]     	at com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean.createInstance(DataSourceFactoryBean.java:30)
           [exec]     	at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:135)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
           [exec]     	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
           [exec]     	... 32 more 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brooke.dalton Brooke Dalton
                Reporter:
                brooke.dalton Brooke Dalton
                Participants of an Issue:
                Recent user:
                Brian Wulbern
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 weeks ago

                  Packages

                  Version Package