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

DXP Upgrade tool fails on Windows with packaged build

    Details

    • Fix Priority:
      5
    • OS:
      Windows 10

      Description

      Steps to reproduce:

      1. Upgrade a database with a DXP release bundle on a Windows environment and default portal-upgrade settings

      Expected result:
      Upgrade is successful.

      Actual result:
      Upgrade fails.

      [ jboss jonas resin tcserver tomcat weblogic websphere wildfly ]
      Please enter your application server (tomcat):
      
      Please enter your application server directory (C:\Users\liferay\Desktop\liferay-dxp-7.2.10-rc3\tomcat-9.0.17):
      
      Please enter your extra library directories in application server directory (/bin):
      
      Please enter your global library directory in application server directory (/lib):
      
      Please enter your portal directory in application server directory (/webapps/ROOT):
      
      [ db2 mariadb mysql oracle postgresql sqlserver sybase ]
      Please enter your database (mysql):
      
      Please enter your database JDBC driver class name (com.mysql.cj.jdbc.Driver):
      
      Please enter your database JDBC driver protocol (jdbc:mysql://):
      
      Please enter your database host (localhost):
      
      Please enter your database port (none):
      
      Please enter your database name (lportal):
      
      Please enter your database username:
      
      Please enter your database password:
      
      Please enter your Liferay home (C:\Users\liferay\Desktop\liferay-dxp-7.2.10-rc3):
      
      JVM arguments: -Dfile.encoding=UTF8 -Duser.country=US -Duser.language=en -Duser.timezone=GMT -Xmx2048m -Dexternal-properties=portal-upgrade.properties -Dserver.detector.server.id=tomcat
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tools/portal-tools-db-upgrade-client/com.liferay.portal.tools.db.upgrade.client.jar!/portal-upgrade.properties
      Loading file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tools/portal-tools-db-upgrade-client/portal-upgrade-ext.properties
      Loading file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tools/portal-tools-db-upgrade-client/portal-upgrade-database.properties
      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 ex
              at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:278)
              at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:199)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:100)
              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 com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
      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.n
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
              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:33)
              at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:220)
              ... 7 more
      Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tomcat-9.0.17/lib/ext/\mysql.jar
              at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
              at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
              at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
              at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
              at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
              at java.nio.file.Paths.get(Paths.java:84)
              at com.liferay.portal.util.JarUtil.downloadAndInstallJar(JarUtil.java:80)
              at com.liferay.portal.util.JarUtil.downloadAndInstallJar(JarUtil.java:107)
              at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.testDatabaseClass(DataSourceFactoryImpl.java:598)
              at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.initDataSource(DataSourceFactoryImpl.java:134)
              at com.liferay.portal.kernel.dao.jdbc.DataSourceFactoryUtil.initDataSource(DataSourceFactoryUtil.java:39)
              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:135)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
              ... 20 more
      
      C:\Users\liferay\Desktop\liferay-dxp-7.2.10-rc3\tools\portal-tools-db-upgrade-client>
      C:\Users\liferay\Desktop\liferay-dxp-7.2.10-rc3\tools\portal-tools-db-upgrade-client>
      C:\Users\liferay\Desktop\liferay-dxp-7.2.10-rc3\tools\portal-tools-db-upgrade-client>jar
      JVM arguments: -Dfile.encoding=UTF8 -Duser.country=US -Duser.language=en -Duser.timezone=GMT -Xmx2048m -Dexternal-properties=portal-upgrade.properties -Dserver.detector.server.id=tomcat
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
      Loading jar:file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tools/portal-tools-db-upgrade-client/com.liferay.portal.tools.db.upgrade.client.jar!/portal-upgrade.properties
      Loading file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tools/portal-tools-db-upgrade-client/portal-upgrade-ext.properties
      Loading file:/C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tools/portal-tools-db-upgrade-client/portal-upgrade-database.properties
      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 ex
              at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:278)
              at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:199)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:100)
              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 com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
      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.n
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
              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:33)
              at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:220)
              ... 7 more
      Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/liferay/Desktop/liferay-dxp-7.2.10-rc3/tomcat-9.0.17/lib/ext/\mysql.jar
              at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
              at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
              at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
              at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
              at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
              at java.nio.file.Paths.get(Paths.java:84)
              at com.liferay.portal.util.JarUtil.downloadAndInstallJar(JarUtil.java:80)
              at com.liferay.portal.util.JarUtil.downloadAndInstallJar(JarUtil.java:107)
              at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.testDatabaseClass(DataSourceFactoryImpl.java:598)
              at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.initDataSource(DataSourceFactoryImpl.java:134)
              at com.liferay.portal.kernel.dao.jdbc.DataSourceFactoryUtil.initDataSource(DataSourceFactoryUtil.java:39)
              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:135)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
              ... 20 more
      
      C:\Users\liferay\Desktop\liferay-dxp-7.2.10-rc3\tools\portal-tools-db-upgrade-client>j
      

      Upgrades tests run on CentOS are passing, so this seems to be a Windows issue.

      This is not reproducible on master-private, so either this issue has been resolved at head or there is something specific to the release builds that is causing the failure.

      Reproduced on:
      Tomcat 9.0.17 + MySQL 5.7.
      7.2 Portal DXP RC3
      7.2 Portal DXP RC2
      7.2 Portal DXP Beta 3
      Windows 10

      Not reproducible on:
      Portal master-private 5093ab5e56f8258fd86bd578f915cf0706e26763
      7.2 Portal CE RC1
      7.2 Portal CE RC3
      Windows 10

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                austin.chiang Austin Chiang
                Reporter:
                austin.chiang Austin Chiang
                Participants of an Issue:
                Recent user:
                Austin Chiang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 19 weeks, 1 day ago

                  Packages

                  Version Package