Skip to content

Connection fails with 'Invalid Oracle URL specified' #111

Description

@dev704

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

Activity

  1. pesse commented on Nov 12, 2018

    @pesse
    Member

    Hi @dev704 ,
    this looks like a regular expression problem, I will investigate.
    Can you try test/test_pwd@server1.com:1521/service1 (without the starting // in server addressing) meanwhile?

  2. self-assigned this
    on Nov 12, 2018
  3. added this to the 3.1.3 milestone on Nov 12, 2018
  4. dev704 commented on Nov 12, 2018

    @dev704
    Author

    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/service1

    Thanks, Coenraad

  5. pesse commented on Nov 15, 2018

    @pesse
    Member

    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 connection
    

    I 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

  6. pesse commented on Nov 15, 2018

    @pesse
    Member

    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.

  7. dev704 commented on Nov 16, 2018

    @dev704
    Author

    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 specified

    The 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

  8. pesse commented on Nov 26, 2018

    @pesse
    Member

    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.

  9. jgebal commented on Jan 8, 2019

    @jgebal
    Member

    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/460ns

  10. pesse commented on Jan 8, 2019

    @pesse
    Member

    Hi @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?

  11. jgebal commented on Jan 8, 2019

    @jgebal
    Member

    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.

  12. pesse commented on Mar 25, 2019

    @pesse
    Member

    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?

  13. modified the milestones: 3.1.3, 3.1.7 on Mar 25, 2019
  14. modified the milestones: 3.1.7, 3.1.8 on Jun 27, 2019
  15. removed this from the 3.1.8 milestone on Jan 16, 2023
  16. simasch commented on Jul 11, 2023

    @simasch
    Member

    No reaction from OP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions