-
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 fails with "no ocijdbc12 in java.library.path" #112
Comments
Hi @alesana-san Can you provide the value of your |
@pesse I have Windows 7 machine and echo %ORACLE_HOME% doesn't return path. But tnsping works well. |
Yes, you should definitely setup ORACLE_HOME if you want to use TNS. https://www.oracle.com/database/technologies/appdev/sqlcl.html |
I have TNS_ADMIN set to |
Might be a nice enhancement to also look for TNS_ADMIN variable. |
Now I'm kinda confused because I have ORACLE_HOME in registry in a |
So changing |
@alesana-san So it did work when you set ORACLE_HOME, right? |
@pesse IMHO, CLI should work like an Oracle Client and try to get ORACLE_HOME path from the registry like in my case sqlplus does (I don't have a preset variable ORACLE_HOME, just an ORACLE_HOME record in the registry with a correct path). I guess it could be an improvement for CLI. |
@pesse I agree with @alesana-san, the TNS_ADMIN variable should be considered, IMHO. First, to follow the Oracle documentation:
[Bonus points if the cli scans the Windows registry:]
Below, some examples of configurations that, by default, doesn't have the "ORACLE_HOME/network/admin" directory expected by utPLSQL-cli:
Of course, one can create a special ORACLE_HOME\network\admin folder just to use in the utPLSQL-cli, but it's a kinda ugly workaround IMHO, considering that Oracle tools can handle these normally. Currently, I recommend my coworkers to pass the complete connection string to utPLSQL-cli (in the form of |
Thanks for your informative input, @felipebz I'd suggest an approach like this:
I'd also assume that TNS_ADMIN value, if it is provided, would be a full path, not only a relative one from ORACLE_HOME. |
@pesse it looks good to me. 👍 And yes, the TNS_ADMIN variable is a full path like "C:\Oracle\Middleware\Oracle_Home\builder". Please let me know if you need some help. I could work on this and send a pull request. ;-) |
Sure, if you'd like to contribute we're more than happy! |
Just in case of, have a look on issue #90 . |
Hi!
tried to run a report via utplsql-cli like that:
utplsql.bat run login/pass@tns -f=ut_coverage_html_reporter -o=report.html
and get an error:
jdbc:oracle:oci8:****/****@tns: no ocijdbc12 in java,library.path jdbc:oracle:oci8:****/****@tns: Unknown host specified
Running like that:
utplsql.bat run login/pass@host:port/inst -f=ut_coverage_html_reporter -o=report.html
works like magic!
The text was updated successfully, but these errors were encountered: