Details

      Description

      When upgrading from 6.1.20 to 6.2.x using DB2, the following exception is raised at verification stage.

      10:39:14,019 INFO  [pool-2-thread-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyUUID
      10:39:14,065 ERROR [pool-2-thread-1][MainServlet:215] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;DB2ADMIN.JOURNALFEED, DRIVER=3.64.82
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;DB2ADMIN.JOURNALFEED, DRIVER=3.64.82
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:54)
      	at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1244)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:212)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
              ...
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;DB2ADMIN.JOURNALFEED, DRIVER=3.64.82
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:61)
              ...
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:48)
      	... 20 more
      Caused by: com.liferay.portal.verify.VerifyException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;DB2ADMIN.JOURNALFEED, DRIVER=3.64.82
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:61)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:66)
      	at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:31)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58)
      	... 28 more
      Caused by: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;DB2ADMIN.JOURNALFEED, DRIVER=3.64.82
              ...
      	at com.ibm.db2.jcc.am.jo.executeQuery(jo.java:702)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
      	at com.liferay.portal.verify.VerifyUUID.verifyModel(VerifyUUID.java:45)
      	at com.liferay.portal.verify.VerifyUUID.doVerify(VerifyUUID.java:74)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58)
      	... 31 more
      Stopping the server due to unexpected startup errors
      

      Steps to reproduce

      1) Create an empty database if you don't have one already.

      > db2 "CREATE DATABASE lportal USING CODESET utf-8 TERRITORY us PAGESIZE 8192"
      > db2 "CONNECT TO lportal"
      > db2 "ALTER BUFFERPOOL IBMDEFAULTBP IMMEDIATE SIZE 32768"
      > db2 "CONNECT RESET"
      

      2) Startup a vanilla Liferay 6.1.20 with the following properties (watch out the currentSchema property and its trailing semicolon at the end of the JDBC url).

      jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
      jdbc.default.url=jdbc:db2://127.0.0.1:50000/LPORTAL:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2;currentSchema=LPS_35778_6120;
      jdbc.default.username=db2inst1
      jdbc.default.password=password
      

      3) Shut it down and copy clone it's database schema (LPS_35778_6120 -> LPS_35778_6200) with the following script.

      CREATE VARIABLE g_exitcode SMALLINT DEFAULT 0
      /
      
      BEGIN
      	DECLARE v_src_schema VARCHAR(50) DEFAULT 'LPS_35778_6120';
      	DECLARE v_target_schema VARCHAR(50) DEFAULT 'LPS_35778_6200';
      
      	DECLARE v_err_tabschema VARCHAR(50);
      	DECLARE v_err_tab_copy VARCHAR(50);
      	DECLARE v_err_tab_drop VARCHAR(50);
      
      	DECLARE e_already_exists CONDITION FOR SQLSTATE '42704';
      	DECLARE e_proc_error CONDITION FOR SQLSTATE '38000';
      
      	DECLARE CONTINUE HANDLER FOR e_already_exists
          	SET g_exitcode = g_exitcode + 1;
      
      	DECLARE CONTINUE HANDLER FOR e_proc_error
          	SET g_exitcode = g_exitcode + 2;
      
      	SET g_exitcode = 0;
      
      	SET v_err_tabschema = CURRENT_USER;
      	SET v_err_tab_copy = CONCAT('ERR_COPY_', v_target_schema);
      	SET v_err_tab_drop = CONCAT('ERR_DROP_', v_target_schema);
      
      	EXECUTE IMMEDIATE CONCAT('DROP TABLE ', v_err_tab_copy);
      	EXECUTE IMMEDIATE CONCAT('DROP TABLE ', v_err_tab_drop);
      
      	CALL SYSPROC.ADMIN_DROP_SCHEMA(
      		v_target_schema, NULL, v_err_tabschema, v_err_tab_drop);
      
      	CALL SYSPROC.ADMIN_COPY_SCHEMA(
      		v_src_schema, v_target_schema, 'COPY', NULL, NULL, NULL,
      		v_err_tabschema, v_err_tab_copy);
      END
      /
      
      SELECT g_exitcode FROM SYSIBM.SYSDUMMY1
      /
      

      Execute it in the followin way.

      > db2 -td/ -z LPS-35778.log -vf LPS-35778.sql
      

      4) Compile Liferay 6.2.x from source and set it up with the following properties

      jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
      jdbc.default.url=jdbc:db2://localhost:50000/LPORTAL:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2;currentSchema=LPS_35778_6200;
      jdbc.default.username=db2inst1
      jdbc.default.password=password
      

      5) Observe SQL0668N above.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 51 weeks, 2 days ago