Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liquibase-core - dbDoc fails generating of documents #1088

Closed
krunets opened this issue Apr 10, 2020 · 2 comments · Fixed by #3398
Closed

Liquibase-core - dbDoc fails generating of documents #1088

krunets opened this issue Apr 10, 2020 · 2 comments · Fixed by #3398
Assignees
Labels
DBOracle good first issue This issue is an easy starter project for new contributors. hacktoberfest a month-long celebration of open-source software and Developers contribute by completing PRs ImpactLow Reproduced Severity3 sprint2022-37 sprint2022-38 TypeBug

Comments

@krunets
Copy link

krunets commented Apr 10, 2020

Prerequisites:

  • Oracle DB(with at least one table with minimum necessary column(id, first_name));
  • Windows 10;
  • liquibase.properties
    driver=oracle.jdbc.driver.OracleDriver
    changeLogFile=test_changelog.xml
    username=liquibase_user
    password=root
    url=jdbc:oracle:thin:@localhost:1521:ORCL
  • test_changelog.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
    <changeSet runAlways="true" author="testuser" id="3">
    <sql>CREATE INDEX TEST_INDEX ON PERSON (CASE WHEN (FIRST_NAME IS NOT NULL AND (FIRST_NAME='1' OR FIRST_NAME='2' OR FIRST_NAME='3' OR FIRST_NAME='4' OR FIRST_NAME='5'
    OR FIRST_NAME='6' OR FIRST_NAME='7' OR FIRST_NAME='8' OR FIRST_NAME='9' OR FIRST_NAME='10' OR FIRST_NAME='11'
    OR FIRST_NAME='12' OR FIRST_NAME='13' OR FIRST_NAME='14' OR FIRST_NAME='15' OR FIRST_NAME='16' OR FIRST_NAME='17' OR FIRST_NAME='18')) THEN 1 ELSE 0 END)</sql>
    </changeSet>

</databaseChangeLog>

Steps to reproduce:

  1. Execute the next command in cmd:
    java -jar liquibase-core-3.5.5.jar --driver=oracle.jdbc.driver.OracleDriver --classpath=<path_to_jdbc_driver> --changeLogFile=<path_to_test_changelog.xml> --url="jdbc:oracle:thin:@localhost:1521:ORCL" --username=<user_name> --password=<password> update
  2. java -jar liquibase-core-3.5.5.jar --driver=oracle.jdbc.driver.OracleDriver --classpath=<path_to_jdbc_driver> --changeLogFile=<path_to_test_changelog.xml> --url="jdbc:oracle:thin:@localhost:1521:ORCL" --username=<user_name> --password=<password> dbDoc folder_to_out_docs

Expected result: dbDoc generates html files for each table column as well as other attributes.
Actual result: Unexpected error running Liquibase: dbDoc_out\columns\liquibase_user.person.case__when___first_name__is_not_null_and___first_name___1__or__first_name___2__or__first_name___3__or__first_name___4__or__first_name___5__or__first_name___6__or__first_name___7__or__first_name___8__or__first_name___9__or__first_name___10__or__first_name___11__or__first_name___12__or__first_name___13__or__first_name___14__or__first_name___15__or__first_name___16__or__first_name___17__or__first_name___18____then_1_else_0_end.html (The filename, directory name, or volume label syntax is incorrect).

RCA:
The reason of this error is dbDoc tries to create html doc with index body in filename for table column folder. As we can see the index body is too long and file system doesn't allow to create files with such too long file name(255 characters constraint). So, from my perspective, dbDoc identifies index body as column and generates doc for it.

Please fix it.

@krunets krunets changed the title Liquibase-core - 3.5.5.x - dbDoc fails generating of documents Liquibase-core - dbDoc fails generating of documents Apr 11, 2020
@molivasdat
Copy link
Contributor

@krunets Thanks for taking the time to report this issue. Thanks for your thoroughness in describing the issue and recreation sceanrio. I was able to recreate this problem.

@sync-by-unito sync-by-unito bot changed the title Liquibase-core - dbDoc fails generating of documents Liquibase-core - dbDoc fails generating of documents Jun 29, 2020
@molivasdat molivasdat added good first issue This issue is an easy starter project for new contributors. hacktoberfest a month-long celebration of open-source software and Developers contribute by completing PRs labels Sep 26, 2020
@FBurguer
Copy link

This is still an issue for liquibase 4.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DBOracle good first issue This issue is an easy starter project for new contributors. hacktoberfest a month-long celebration of open-source software and Developers contribute by completing PRs ImpactLow Reproduced Severity3 sprint2022-37 sprint2022-38 TypeBug
Projects
Archived in project
7 participants