0
votes

I can't run this

liquibase --driver=oracle.jdbc.OracleDriver --classpath=ojdbc8.jar --url="jdbc:oracle:thin:@host:port:sid" --changeLogFile=db.xml --username=name --password=psw generateChangeLog

I get an error

"Unexpected error running Liquibase: liquibase.exception.DatabaseException: java.sql.SQLException: Unsupported code table (add orai18n.jar to the class route): CL8MSWIN1251"

Full stack error

Liquibase Community 3.8.0 by Datical Unexpected error running Liquibase: liquibase.exception.DatabaseException: java.sql.SQLException: Неподдерживаемая кодовая таблица (добавьте orai18n.jar в маршрут классов): CL8MSWIN1251 liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: java.sql.SQLException: Неподдерживаемая кодовая таблица (добавьте orai18n.jar в маршрут классов): CL8MSWIN1251 at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:282) ~[liquibase.jar:na] at liquibase.integration.commandline.Main.doMigration(Main.java:1060) [liquibase.jar:na] at liquibase.integration.commandline.Main.run(Main.java:209) [liquibase.jar:na] at liquibase.integration.commandline.Main.main(Main.java:132) [liquibase.jar:na] Caused by: liquibase.command.CommandExecutionException: liquibase.exception.DatabaseException: java.sql.SQLException: Неподдерживаемая кодовая таблица (добавьте orai18n.jar в маршрут классов): CL8MSWIN1251 at liquibase.command.AbstractCommand.execute(AbstractCommand.java:24) ~[liquibase.jar:na] at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:280) ~[liquibase.jar:na] ... 3 common frames omitted Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: Неподдерживаемая кодовая таблица (добавьте orai18n.jar в маршрут классов): CL8MSWIN1251 at liquibase.snapshot.jvm.CatalogSnapshotGenerator.snapshotObject(CatalogSnapshotGenerator.java:47) ~[liquibase.jar:na] at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:66) ~[liquibase.jar:na] at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49) ~[liquibase.jar:na] at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:69) ~[liquibase.jar:na] at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49) ~[liquibase.jar:na] at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:315) ~[liquibase.jar:na] at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:100) ~[liquibase.jar:na] at liquibase.snapshot.DatabaseSnapshot.(DatabaseSnapshot.java:59) ~[liquibase.jar:na] at liquibase.snapshot.JdbcDatabaseSnapshot.(JdbcDatabaseSnapshot.java:39) ~[liquibase.jar:na] at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:217) ~[liquibase.jar:na] at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:190) ~[liquibase.jar:na] at liquibase.command.core.DiffCommand.createReferenceSnapshot(DiffCommand.java:221) ~[liquibase.jar:na] at liquibase.command.core.DiffCommand.createDiffResult(DiffCommand.java:143) ~[liquibase.jar:na] at liquibase.command.core.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:46) ~[liquibase.jar:na] at liquibase.command.AbstractCommand.execute(AbstractCommand.java:19) ~[liquibase.jar:na] ... 4 common frames omitted Caused by: java.sql.SQLException: Неподдерживаемая кодовая таблица (добавьте orai18n.jar в маршрут классов): CL8MSWIN1251 at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:233) ~[ojdbc8.jar:19.3.0.0.0] at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:194) ~[ojdbc8.jar:19.3.0.0.0] at oracle.jdbc.driver.PhysicalConnection.throughDbCharset(PhysicalConnection.java:10365) ~[ojdbc8.jar:19.3.0.0.0] at oracle.jdbc.driver.PhysicalConnection.enquoteIdentifier(PhysicalConnection.java:10442) ~[ojdbc8.jar:19.3.0.0.0] at oracle.jdbc.driver.OracleStatement.enquoteIdentifier(OracleStatement.java:6452) ~[ojdbc8.jar:19.3.0.0.0] at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3853) ~[ojdbc8.jar:19.3.0.0.0] at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:270) ~[ojdbc8.jar:19.3.0.0.0] at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:596) ~[ojdbc8.jar:19.3.0.0.0] at liquibase.snapshot.jvm.JdbcSnapshotGenerator.getDatabaseCatalogNames(JdbcSnapshotGenerator.java:149) ~[liquibase.jar:na] at liquibase.snapshot.jvm.CatalogSnapshotGenerator.snapshotObject(CatalogSnapshotGenerator.java:35) ~[liquibase.jar:na] ... 18 common frames omitte

How to fix this?

1
Did you try --classpath=ojdbc8.jar;orai18n.jara_horse_with_no_name
@a_horse_with_no_name it didn't workTimur
Are you onj Windows or Linux? On Linux, the classpath separator is : The other option is to just put the driver jar and the oai18n.jar in the <liquibase_home>/lib directory. All jars in that directory are added the the classpath by the liquibase shell script.SteveDonie
Also, it may be that the error is coming from the database side rather than the client side. I'd need to see a fuller stack trace to tell whether that was the case though.SteveDonie
@SteveDonie i fix this problem. I changed NLS LANG in DB server.Timur

1 Answers

1
votes

i fix this problem. I changed NLS LANG in DB server.