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

Startup 70 with SQL 2014 fail: Error creating bean with name 'liferayDataSourceImpl'

    Details

    • Fix Priority:
      4

      Description

      Steps to Reproduce:

      1. Startup 70/master with sql 2014/sql 2012r2.
      2. The driver I used sqljdbc42.jar.
      3. Also use com.liferay.portal.dao.db.jar from here.

      Expected Result:
      Startup with no error.

      Actual Result:
      Startup fail with error:

      23-Apr-2018 01:14:19.714 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
       java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSourceImpl' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: net
      .sourceforge.jtds.jdbc.Driver
              at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:262)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
              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:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayDataSourceImpl' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: net.sourceforge.jtds.
      jdbc.Driver
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
              at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
              at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
              at com.liferay.portal.spring.context.ArrayApplicationContext.<init>(ArrayApplicationContext.java:31)
              at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:247)
              ... 13 more
      Caused by: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
              at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
              at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:264)
              at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.testDatabaseClass(DataSourceFactoryImpl.java:570)
              at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.initDataSource(DataSourceFactoryImpl.java:136)
              at com.liferay.portal.kernel.dao.jdbc.DataSourceFactoryUtil.initDataSource(DataSourceFactoryUtil.java:44)
              at com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean.createInstance(DataSourceFactoryBean.java:44)
              at com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean.createInstance(DataSourceFactoryBean.java:30)
              at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:134)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
              ... 26 more
      
      23-Apr-2018 01:14:19.774 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
      23-Apr-2018 01:14:19.776 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
      2018-04-23 01:14:19.801 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.NullPointerException
      java.lang.NullPointerException
              at com.liferay.portal.kernel.servlet.DirectServletRegistryUtil.clearServlets(DirectServletRegistryUtil.java:27)
              at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:135)
              at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4859)
              at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
              at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
              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:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      2018-04-23 01:14:19.860 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.NullPointerException
      java.lang.NullPointerException
              at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.reset(HotDeployUtil.java:53)
              at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:142)
              at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4859)
              at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
              at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
              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:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      2018-04-23 01:14:19.882 ERROR [localhost-startStop-1][PortalBeanLocatorUtil:109] BeanLocator is null
      23-Apr-2018 01:14:19.884 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
       com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator is not set
              at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:74)
              at com.liferay.portal.spring.context.PortalContextLoaderListener.closeDataSource(PortalContextLoaderListener.java:381)
              at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:155)
              at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4859)
              at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
              at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
              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:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      
      23-Apr-2018 01:14:19.944 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\Administrator\Desktop\7.0.x-private20180423Beck\tomcat-8.0.32\conf\Catalina\localhost\ROOT.xml has finished in 24,970 ms
      23-Apr-2018 01:14:19.952 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
      23-Apr-2018 01:14:19.964 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
      23-Apr-2018 01:14:19.968 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 25055 ms
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 23 weeks, 4 days ago

                Packages

                Version Package