facebook

5.1 GA & 5.5 M2 Database Explorer error

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #269173 Reply

    Balazs D. Toth
    Participant

    There’s an error in MyEclipse 5.1 GA and 5.5 M2 when connecting to Oracle 10g using Oracle Thin driver. As the template indicates it expects a <database-name>. It’s fine, but with Oracle 10g you shouldn’t use OracleDataSource.setDataBaseName to specify it, because it would never connect. You should use OracleDataSource.setServiceName instead. To add insult to injury Oracle gives a very misleading error message. It tries to find the SID set by setServiceName, but in the Connector descriptor of the returned error message shows the SID set by setDataBaseName. So the Connector descriptor seems to be completely OK, but Oracle service listener will never find the given service/database.
    (Former version of Oracle works well by both types of <database-name> specification.)

    OracleDataSource ods = new OracleDataSource();
    ods.setDriverType(driverType);
        if ( driverType.equals( "oci" ) ) {
            ods.setTNSEntryName(tnsName);
        } else { // thin
            ods.setServerName(host);
            ods.setNetworkProtocol("tcp");
    /* BAD */        ods.setDatabaseName(dbName); // doesn't work with 10g
    /* GOOD */    ods.setServiceName(dbName ); // works with 10g and previous
            ods.setPortNumber(new Integer(port).intValue());
        }
        ods.setUser(uname);
        ods.setPassword(pwd);
                
        conn = ods.getConnection();
    #269205

    Riyad Kalla
    Member

    dtb,
    This is great info, I’m going to pass this along right away to the DB devs and let them dig in and see what’s going on.

    #269212

    Brian Fernandes
    Moderator

    dtb,

    I understand what you are pointing out with your code, but we do not use any Oracle specific code to connect to Oracle, just straight JDBC. Perhaps I’ve missed something.

    There are a few SID issues when using the 10g driver (which is actually a driver bug) especially if you’re not in the default locale, I take it that you’re Hungarian. One such issue is documented here: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-13879-highlight-sid.html

    I’d just like to confirm that you are using the latest 10g driver from Oracle? The ojdbc14.jar library and not the classes12.jar library which is used for older JDK versions.

    Could you tell me:
    1) What connection URL are you using?
    2) What Oracle version (exactly) are you trying to connect to and what Driver are you using?
    3) What error message do you see when you try to connect – are there any errors logged?
    4) You said there is a bug in 5.1 and 5.5M, I assume these are the only two versions of ME you tried – unless you have used earlier versions without these issues in the past?

    Best.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: 5.1 GA & 5.5 M2 Database Explorer error

You must be logged in to post in the forum log in