-
Notifications
You must be signed in to change notification settings - Fork 15
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
utPLSQL-cli run causes java.sql.SQLException: Locale not recognized #101
Comments
Hi @nikita-mospan , |
Hi @pesse , I am giving a try maven integration with utPLSQL using approach described here (maven-exec-plugin + utPLSQL-cli) https://gist.github.com/nochmu/1f640b01a685f3f83a349de2db8a8882 and now will think how to unset NLS_LANG before executing utPLSQL-cli and setting it back afterwards. |
Yeah, it's not a good solution right now. I hope to be able to release cli 3.1.1 soon, though. It will definitely include ignoring of NLS_LANG |
How about trying out our maven plugin. |
Hi, @jgebal Frankly speaking, that was my first choice, and I spent quite a while on it, but didn't manage to make it work, so I gave up. =) If you have some time I would appreciate if you take a look at the project: https://github.com/nikita-mospan/liquibase-deploy-demo where I was playing around with liquibase and your plugin. Liquibase is working fine, however when I run
[INFO] Scanning for projects... I even explicitly added dependency com.oracle.ojdbc7 to utplsql-maven-plugin but with no luck. May be I am missing some configuration options. I will be glad to discuss this on your project's page, but probably it is not relevant for utPLSQL-cli. Thank you. |
You're misssing maven config to get jdbc. |
No, I have it. Below is extract from my $M2_HOME/conf/settings.xml
Without those settings I wouldn't be able to install utplsql-maven-plugin into my local Maven repository but I installed it successfully. |
Okay, Jeff Smith answered me and they do it as follows in sqlcl:
Sounds like a useful approach, altering of the session might be a bit of work though. |
Hi, @pesse Thank you, but I didn't quite get that. Do they plan to implement this behavior? Because at the present moment it seems not to work.
Test package for pk_util_log Finished in .588517 seconds |
Hi @nikita-mospan , If NLS_LANG/LANG/LC_ALL (in that order) is set, try to set it as java Locale setting. This is plain wrong, because NLS_LANG has a different notation than LANG/LC_ALL. The guys at sqlcl although do another thing: If NLS_LANG is set in environment, they open each connection with an initial |
Got it, thank you! |
Remove NLS_LANG from Locale-Initialization Fixes #101
Good day!
I downloaded latest distribution of utPLSQL-cli and tried to execute it on my local environment. I copied ojdbc8.jar as was written in README and even orai18n.jar from Oracle website to utPLSQL-cli/bin folder. However I am receiving the following error:
$ ./utplsql run tech_user/1@ora12c
java.sql.SQLException: Locale not recognized
at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1493)
at oracle.jdbc.driver.T4CTTIoauthenticate.(T4CTTIoauthenticate.java:291)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:599)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:375)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:204)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:445)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:516)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:116)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:97)
at org.utplsql.cli.ConnectionInfo.getConnection(ConnectionInfo.java:34)
at org.utplsql.cli.RunCommand.run(RunCommand.java:149)
at org.utplsql.cli.Cli.main(Cli.java:33)
My NLS_LANG has the following value:
$ echo $NLS_LANG
AMERICAN_AMERICA.AL32UTF8
$ java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
My database parameters:
select * from v$version;
--
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE 12.1.0.2.0 Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
select * from nls_database_parameters ;
I would greatly appreciate any help or suggestions.
Thank you in advance.
The text was updated successfully, but these errors were encountered: