Connection fails with 'Invalid Oracle URL specified' #111
Description
Activity
Hi @dev704 ,
this looks like a regular expression problem, I will investigate.
Can you trytest/test_pwd@server1.com:1521/service1(without the starting // in server addressing) meanwhile?Hi @pesse
I get the same error when removing the //
Not sure if this will make a difference, but the target server I am trying to connect to is defined as
subdomain.domain.com
test/test_pwd@sub.server1.com:1521/service1Thanks, Coenraad
Hi @dev704
I can't reproduce your problem. The log you provided suggests a problem with parsing of the connect-string, but I can't bring the current release of cli to behave the way you posted.
When I try with your command:utplsql run test/test_pwd@//server1.com:1521/service1 jdbc:oracle:oci8:****/****@//server1.com:1521/service1: C:\app\client\sani\product\12.2.0\client_1\ocijdbc12.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform jdbc:oracle:thin:****/****@//server1.com:1521/service1: I/O-Fehler: The Network Adapter could not establish the connection Could not establish connection to database. Reason: I/O-Fehler: The Network Adapter could not establish the connectionI always get the error message with properly split connect-string.
Is there any possibility that you share the real values which lead to that issue with me privately?
Or can you reproduce the behaviour with non-real data?Cheers, Sam
Ah, btw, the regex we use to split the given connect-string is
^([^/]+)/([^@]+)@(.*)$So as long as you don't use / and @ in user/password I can see no way how it should fail.
Hi Sam
I have retried using an incorrect password 'test123'
utplsql run test/test123@//sub-a.server1.com:1521/service1
and got:
ORA-01017: invalid username/password; logon denied
then tried again with the wrong password: 'test123!!'
utplsql run test/test123!!@//sub-a.server1.com:1521/service1
and got
Invalid Oracle URL specifiedThe real password has two exclamation marks as the last two characters as above 'test123!!'
Can the !! be causing an issue with the regex?Thanks, Coenraad
After some excessive testing and investigation, I believe this is a JDBC bug.
You can reproduce the same issue with sqlcl or even a default JDBC connection in java.I opened a issue at sqlcl in the hope to get some more people engaged.
As workaround I'd ask you, @dev704 to try if it words if you use TNS-name instead.Hi @pesse
I've just encountered the same issue.
The challenge is that we're using a shared account to run init tests on CI systems.
Change of password is not an option.It doesn't look like a JDBC issue, as we see other Java-based apps working fine with this password.
Enclosing password with quotes:
"my_p@$$wo/d"or'my_p@$$wo/d'doesn't help for utPSLQL cli.The following regex string could help maybe?
^([^\/]*)\/(.*)@((\/\/)?([^:]*)(:([0-9]+))?)?(:|\/)(.*)
Groups 1,2,5,7,9 hold user,pass,host,port,service_name(sid)
https://regexr.com/460nsHi @jgebal
did you test with sqlcl?
I did my tests around ! with plain JDBC-connections without any intervention of command-line parsing etc.
Do you experience the issue for other passwords?
As of the other java-based apps: Can you give examples?I can't give that example of Java based app, as it's in-house solution.
Does utPLSQL-cli work OK with passwords cotaining "@" or "/" ? in password?
I didn't check it thoroughly though to see what passwords are not working fine.The problems with special chars in user and password-part are solved via #133
I also wasn't able to reproduce the original issue with the latest cli-version anymore.
@dev704 could you probably test if the problem you experienced still exists with https://bintray.com/utplsql/utPLSQL-cli/download_file?file_path=utPLSQL-cli-develop-201903241854.zip?No reaction from OP
Hi
When running below, the connection fails. Is there a way to get more detailed debug information?
Running sqlplus with the same parameters connects correctly
C:\utPLSQL-cli\bin\utplsql run test/test_pwd@//server1.com:1521/service1
jdbc:oracle:oci8:****/****@//test/test_pwd@//server1.com:1521/service1: Invalid Oracle URL specified
jdbc:oracle:thin:****/****@//test/test_pwd@//server1.com:1521/service1: Invalid Oracle URL specified
Could not establish connection to database. Reason: Invalid Oracle URL specified
utplsql info
cli 3.1.2-SNAPSHOT.local
utPLSQL-java-api 3.1.2.271