This discussion is archived
6 Replies Latest reply: Oct 15, 2012 6:47 AM by TurlochO'Tierney RSS

connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs

berx Explorer
Currently Being Moderated
Hi,

I am trying to create a connection with a custom JDBC connection string, but SQL*Developer throws the error message:
Status : Failure -Test failed: Required property 'hostname' is not set on the DatabaseProvider
my tests are:
<li> with connection via Connection Type set to TNS and a proper alias - it works fine
<li> with connection via Connection Type set to Advanced and exactly the same values from tns in the url:
jdbc:oracle:thin:@(DESCRIPTION=(enable=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=172.24.32.113)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=RESTSVP_SITE1)))
- it fails with
Status : Failure -Test failed: Required property 'hostname' is not set on the DatabaseProvider
<li> with JDBC URL set to
jdbc:oracle:thin:@172.24.32.113:1521/RESTSVP_SITE1
- it works fine

As my jdbc url is quite close to the example in [url http://docs.oracle.com/cd/E11882_01/java.112/e16548/apxtblsh.htm#CHDBBDDA]Using JDBC with Firewalls maybe someone can help me to fix it?

Martin

Edited by: berx on Oct 12, 2012 11:32 AM - fixed typos
  • 1. Re: connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs
    TurlochO'Tierney Journeyer
    Currently Being Moderated
    Hi berx,

    -What version of SQLDeveloper?
    -Any advanced options such as SSL, LDAP or RAC?

    Similiar thread (and error message) from 2009: (The error message may be generic).
    sqldeveloper via SSL Using jdbc:oracle:thin:

    A simple connection:
    jdbc:oracle:thin:@(DESCRIPTION=(enable=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=my_host_name)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=my_service_name)))
    no SSL, no LDAP, no RAC works for me SQLDeveloper 3.2.1 against 11gr2

    -Turloch
    SQLDeveloper Team
  • 2. Re: connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs
    berx Explorer
    Currently Being Moderated
    Hi Turloch,

    thank you for your fast reply!
    SQL Developer was downloaded today - so it's 3.2.10.09.
    I don't know of any SSL, LDAP.
    The target DB is 10.2.0.5 - a dedicated instance in a 2-node 11.2.0.3 RAC.

    I tested right now with 3.2.10.09 on my MacBook at home and it works as expected.

    I can not access my works PC until monday morning, But I will crosscheck my setup there and prepare even more details.

    Please apologize for the missing informations right now, I will provide those as soon as possible.

    Martin
  • 3. Re: connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs
    TurlochO'Tierney Journeyer
    Currently Being Moderated
    Hi Martin,

    1/oci/thick
    2/RAC options
    3/TNS connection

    1/oci/thick
    OCI driver has a slightly different set of features than thin:
    -try oci/thick (requires Oracle Client, server or instant client) (It requires SQLDeveloper java and .dll, .so libraries to match)Re: SQL developer 3.1 shows error Incompatible version of libocijdbc
    jdbc:oracle:oci:@(DESCRIPTION=(enable=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=your_host_name)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=your_service_name)))

    2/RAC options
    More speculatively:
    -Try sid instead of service name (will disable some networking features on that connection), try switching load balancing off.
    From: Unable to access RAC from SQL Developer!
    In general and especially for RAC database you should use SERVICE_NAME to connect and not SID (because only SERVICE_NAME can use load balancing and failover features):

    3/TNS connection
    with connection via Connection Type set to TNS and a proper alias - it works fine
    (Which Connection Type TNS did you use? TNS Connect Identifier = oci/thick, TNS Network alias (can be thin (I should check, might depend on oci/thick checkbox))

    Is this issue stopping your work i.e. is this workaround unacceptable?

    -Turloch
    SQLDeveloper team
  • 4. Re: connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs
    berx Explorer
    Currently Being Moderated
    Turloch,

    thank you for the great way you support here!
    First of all, the issue does NOT stop me or my company at all. I only tried to report an issue.
    As the issue seems to be more related to my work PC than to SQL*Developer, I will try to answer and crosscheck as many questions as possible before I bother you again.

    You asked a reasonable set of questions which create a nice matrix.
    I will answer every intersection of those, where possible/applicable.

    best regards,
    Martin
  • 5. Re: connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs
    berx Explorer
    Currently Being Moderated
    Hi Turloch,

    I guess I could pin it down to an oci issue.
    I tested on 2 different (Wind0ws7) PCs with 2 different client installations.
    1) with "thin" driver I can connect to the listener
    2) with a checkbox on Tools-Preferences-Database-Advanced-Use OCI/Thich driver I always get Status : Failure -Test failed: Required property 'hostname' is not set on the DatabaseProvider

    I have a full blown 11203-32bit installation on one PC and a 11203-32bit instant client on the other.

    * I don't think RAC is involved here anyhow as I can use any target listener - even IPs which for sure does not exist in our network gives the same error message.

    * TNS: with OCI and THIN I can use both Network Alias and Connection Identifier - they connect me to the listener all the time.

    I hope this gives some more informations about my setup?

    If needed I will refine it as good as possible.


    best regards,
    Martin
  • 6. Re: connection with Advanced - custom JDBC URL fails with some valid JDBC-URLs
    TurlochO'Tierney Journeyer
    Currently Being Moderated
    Hi Martin,

    Logged bug:
    Bug 14761950 - ADVANCED THIN URL FAILS WITH OCI CHECKBOX ON
    Reproduced internally.
    (oci - copied ojdbc6.jar from oci 32bit 11.2.0.3 instant client (win32bit windows7 version running on win64) set path and set checkbox)

    The following fails with oci checkbox set:
    jdbc:oracle:thin:@(DESCRIPTION=(enable=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=_host_name_)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=_service_name_)))

    11.2 destination database, no SSL, no RAC, no LDAP

    error message: Required property 'hostname' is not set in the database provider.
    replacing thin with oci works fine. (whether oci checkbox is on or not).

    -Turloch
    SQLDeveloper team

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points