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

UpgradeProcess - loading files with getResourceAsStream in a JSF portlet

    Details

    • Type: Regression Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 7.3.1 CE GA2
    • Fix Version/s: Master
    • Component/s: Core Infrastructure
    • Labels:
      None
    • Fix Priority:
      3
    • Last Working Version:
    • OS:
      Windows 10
    • JDK:
      Oracle Sun JDK 8
    • Application Servers:
      Apache Tomcat 9.0.x
    • Browsers:
      Chrome (latest)
    • Databases:
      MariaDB 10.0
    • Device Type:
      Desktop

      Description

      This code was working with version 7.3.0 GA1.

      I've got a JSF portlet (.war) with an UpgradeProcess which loads data files as:

      @Override{{protected void doUpgrade() throws Exception { }}

      //File has to be in path "src/main/resources"

      this.runSQLTemplate("/sql/schema_1_0_0.sql", true); 

      this.runSQLTemplate("/sql/data_1_0_0.sql", true);{{}}

      ...}

      With the new version 7.3.1 GA2, I get the following error while deploying the war file (please, find the log error file attached to the "Environment" section):

      Caused by: java.io.IOException: Invalid path /sql/schema_1_0_0.sql

      at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQLTemplate(BaseDBProcess.java:112) at es.isciii.uites.patientforms.upgrade.v1_0_0.UpgradeProcess_1_0_0.doUpgrade(UpgradeProcess_1_0_0.java:21)

        Attachments

        1. log-error.txt
          10 kB
        2. patient-forms.zip
          10.16 MB
        3. war-content.jpg
          war-content.jpg
          241 kB
        4. war-content.jpg
          war-content.jpg
          241 kB
        5. war-content.jpg
          war-content.jpg
          251 kB

          Issue Links

            Activity

              People

              Assignee:
              support-qa Support QA
              Reporter:
              sperez15 Santiago Pérez de la Cámara
              Participants of an Issue:
              Recent user:
              Alberto Chaparro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 13 weeks ago

                  Packages

                  Version Package
                  Master