Need clarification abt JDBC driver

Hi All,
I installed Oracle 10g and now accessing the DB using Java.
I am using this below code :-
Class.forName ("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
Using classes12.jar (type 4 driver)
I am getting this error :-
Error is: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:orcl
Please get back with solution
Regards,
Bhargava.

Bhargava,
The JDBC Forum is more appropriate for your post.
In that forum you will find the following announcement that package "oracle.jdbc.driver" is deprecated.
If you have Oracle 10g database installed, then you also have the "ojdbc14.jar" file which is a JDBC driver compatible with JDK 1.4.
File "classes12.jar" is for JDK 1.2
From the error message you posted, it looks like "orcl" is not the name of your database instance.
The following SQL query will give you the instance name:
select INSTANCE_NAME from V$INSTANCEI also suggest perusing the JDBC Developer's Guide and Reference which is part of the Oracle documentation.
All of the Oracle documentation can be accessed from:
http://www.oracle.com/technology/documentation/index.html
Good Luck,
Avi.
Message was edited by:
Avi Abrami

Similar Messages

  • Need Clarification on JDBC--RFC Sync

    Hi All,
    in JDBC----RFC Sync scenario, do we use BPM to get the response from the RFC??
    Why because JDBC is not having the Sync nature.
    Regards
    Vamsi

    Hi,
    its not necessary to use BPM to get response with out BPM also we can get the response. Better try to avoid BPM because of the performance issue.
    Please refer this link
    http://help.sap.com/saphelp_nw70/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
    Thanks
    Vikranth
    Edited by: Khimavath Vikranth on Jun 4, 2008 11:31 AM
    Edited by: Khimavath Vikranth on Jun 4, 2008 11:39 AM

  • JDBC Driver for Personal Oracle 7.0

    I have Personal Oracle 7.0 setup on my PC. I need to install JDBC driver for it. Where Can I get it? Thanks.

    www.oracle.com

  • JDBC driver for Microsoft Access

    Hi, I have gone through the blogs and threads related to this topic. I found contradicting threads one saying we need to deploy Access JDBC driver and another saying no need to deploy JDBC driver for Access.
    Integrate PI7.0 with MS Access 2003 Database - Says need to install driver for Access
    Re: Problem when connecting to MS Access through JDBC Adapter. - Says no need to install driver for Access
    I am now confused if I need to ask my Basis team to deploy driver for this. If some one has executed this scenario successfully, could you please confirm whether a driver needs to be installed or not. Also if it is required to install a driver, could you please let me know from where I can download the driver.
    My PI version is 7.1 and Access version is MS Access 2007.  PI is deployed on Linux.
    Without asking for deploying driver I have configured scenario File->PI->Access and I am getting below error in my receiver JDBC communication channel.
    "Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error when attempting to get processing resources: com.sap.aii.af.lib.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Can not establish connection:: SAPClassNotFoundException: jdbc.odbc.JdbcOdbcDriver";
    Please suggest how to resolve this issue.
    Regards, Prasad

    Hi .
    The format for Access 2007 is accdb . Are you using this format or MDB?
    Anyway try this:
    Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\Test\TestDB.accdb;Uid=Admin;Pwd=;

  • Should i need to install JDBC Drivers?

    Hi,
    I am new to primavera database.
    Now i need to develop RFC's to JDBC Scenario using PI7.1, should i need to install JDBC Driver to up date the data in primavera database.
    thanks,
    snr.

    Hi,
    JDBC drivers are needed to establish the connection to database using JDBC adater but not operations...
    if your database provider classes are not installed in the PI system then you need to install the same...
    check the connection using test if not sure about this but need to install the ear file provided as per note 1085539
    HTH
    Rajesh

  • JDBC DRIVER info?

    HI,
    i am configuring jdbc sender adapter,
    can anyone guide me  in getting Java class of the JDBC driver that the JDBC adapter must load to be able to access the driver.
    thanks,

    Hi Pratibha,
                     As Michael has suggested, you dont need any java classes. You just need to put JDBC driver as per the database that you are trying to access.
    You also need a connection string in the JDBC sender adapter and would look something like this: <b>jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//xiserver/xitemp/db/TestDB.mdb;Uid=yourid;Pwd=yourpwd;</b>
    Pls refer to the following thread for more info: How to implement File to jdbc scenario
    Regards,
    Ashish

  • Runtime Error using JDBC Driver in NetBeans IDE 6.9.1

    Hello,
    I receive a compiler error which reads as follows;
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    java.sql.SQLSyntaxErrorException: Schema 'DEMO' does not exist
    Heres the main body of code i am trying to execute.
    public class Main {
    @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    try{
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    }catch(ClassNotFoundException e){
    System.out.println(e);
    try{
    Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/SimpleDBDemo", "demo", "demo");
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM DEMO.Table1");
    while (rs.next()) {
    String s = rs.getString("Name");
    float n = rs.getFloat("Age");
    System.out.println(s " " n);
    }catch(SQLException e){
    System.err.println(e);
    I am using NetBeans IDE and have created a database under: Services->Databases-> Java DB->SimpleDBDemo.
    I have a database connection in which theres a simple table (called "TABLE1") created which contains the names and ages of two people. I am trying to access the data of these two people.
    From what i can figure out i am getting a runtime error. I have downloaded a folder called "Microsoft SQL Driver 2005 JDBC Driver" which contains the "sqljdbc.jar" executable file. I copied the jar file to the library in "Program files->Sun->javadb" and then added the file to the project libraries section i.e. "Project->properties->add JAR/Folder->sqljdbc.jar" in netbeans.
    I am still getting the same runtime error. Have i the sqljdbc.jar file added in the wrong place?
    Any help would be greatly appreciated.

    Microsoft SQL Driver 2005 JDBC Driver is not the Derby driver.
    You need the correct JDBC driver for the database you are using, you can't simply grab the first one you find.

  • Tomcat7 + JDBC driver jar

    Context:
    According to the installation guide for bonitasoft (http://documentation.bonitasoft.com/dat … add_driver)
    Tomcat 7
    For Tomcat, simply add the JDBC driver jar file in the appropriate folder:
        Bonita BPM Tomcat bundle: in the bundle folder add the driver to the lib/bonita folder.
        Bonita BPM deploy bundle: in the Tomcat folder add the driver to the lib folder.
        Ubuntu/Debian package: add the driver to /usr/share/tomcat7/lib.
        Windows as a service: add the driver to C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib
    Problem:
    Which JDBC driver is meant ? I searched the web for an tomcat JDBC jar file for tomcat7 ?
    This confused me further, I tought archlinux is analog to ubuntu and read the section platform installation example for (Ubuntu + OpenJDK + Tomcat + MySQL):
    Add JDBC driver
    You need to include JDBC driver in Tomcat classpath:
        Change to Tomcat libraries directory: cd /usr/share/tomcat7/lib.
        Download the library mysql-connector-java from the MySQL site to this directory.
    But the mysql site (recommended by the installation guide) provides a download link for an tar.gz file and on google.code (https://code.google.com/p/find-ur-pal/d … 8-bin.jar&) I found .jar file. The installation guide clearly speaks about an .jar file. There are different version of the JDBC jar file on the web. Which one is right ?

    Do you intend on continuing to spam the boards with this issue? Read the Etiquette and the wiki: https://wiki.archlinux.org/index.php/Tomcat_and_Apache
    Moving to NC...

  • Need Help On How to Install JDBC Driver

    I've downloaded the JDBC driver and set the CLASSPATH environmental variable to the .jar file that is the same one I downloaded that is in the oracle folder. (not sure why I have to download it again) But, there are no other instructions on installation. I also tried copying the jdbc folder I downloaded to replace the one within the oracle folder and that didn't work either. If I type "import oracle." etc in netbeans it does not recognize the class / package. I can't be sure what the installation process is.
    I can't find clear instructions on installing JDBC other than the readme which says all you have to do is set the CLASSPATH, but it doesn't even mention what to do with the files you download. I found a developers reference that says all the things to check to make sure it installed correctly, but that is after the fact and I don't know how to get there.
    Thank you

    I already have the CLASSPATH set in the system environmental variables for ojdbc6.jar and orai18n.jar and it does not work.
    '.;C:\Program Files\Java\jre1.6.0_06\lib\ext\QTJava.zip;C:\app\0\product\11.1.0\db_1\jdbc\lib\ojdbc6.jar;C:\app\0\product\11.1.0\db_1\jlib\orai18n.jar"
    Also, I'd rather not have to run a TCP/IP listener so the OCI based JDBC driver would be preferred. Do I need to the OCI and the OCI based JDBC? (I read there is a difference) If so, could somebody give me the URL's because I can't find them.
    I find this very confusing. I found the page for JDBC, but that takes me to the JDBC page with many downloads and then they are all thin versions. So at the bottom it has a small link for "platform specific JDBC-OCI libraries See the instant client" so I click on the "instant client" (whatever that is) but that just has a download link for a zip file that has a readme with nothing other than a timestamp and a useless header with no information. This is just taking me in circles.
    What I want to do is start programming java in netbeans using JDBC. Thanks.

  • Requirements for JDBC Driver needed for SOA 8 }connection pool

    Hi,
    I have an AS400 jdbc driver. This driver is JDBC API version 2.x. Also is a Driver Type 4.
    What are the requirements of a JDBC Driver needed for connection pool in SOA 8?
    Thanks.
    Lorenzo Jimenez

    You can use pretty much any jdbc driver, including type 2 and type 4.
    You need to make sure your shared libraries needed by the driver are available to the appserver when you boot.
    Other than that, it is no different than configuring any other driver.

  • I need Crystal Reports XI R2 RDC merge modules with JDBC driver.

    I successfully connected to MySQL server from CR XI R2 designer with JDBC driver. My application is developed in Delphi, using Crystal Reports VCL.  I need to build a Installer including executable files, *.rpt files and CR RDC merge modules in Macrovision Installshield 12.  But RDC_reportengine is not containing JDBC driver. How I to include and configure the JDBC driver?

    I just done these steps.  But following error occurs:
    Error: 772 error in file C:\...\myreportfile.rpt:
    Invalid argument for database.
    Execute <PEStartPrintJob>.
    I used mysql-connecter-java-5.1.7-bin.jar from mysql.com.
    In designer connection url is
    jdbc:mysql://mysqlserver/database
    database classname is
    com.mysql.jdbc.Driver
    My Calling the report code from Delphi is:
    CrystalReport.Connect.ServerName := servername;
        CrystalReport.Connect.UserID := username;
        CrystalReport.Connect.Password := password;
        CrystalReport.Execute;
    It is worked successfully on installed the CR designer PC.

  • Need help using Windows Server 2000 JDBC Driver on Red Hat 9

    I successfully have a .jsp app running on windows server 2000 using JDBC
    driver for SQL Server 2000. Which I installed in order to the following
    Red Hat:
    http://msdn.microsoft.com/MSDN-FILES/027/001/779/install.htm
    I moved the .jsp app over to the Red Hat 9 server running Tomcat, while
    keeping the MS SQL 2000 on windows. The issue I have is setting up the
    JDBC driver for SQL Server 2000 on the Red Hat server.
    I created a folder called /usr/java/MSSQLdriver and unzipped the tar file with
    the driver for SQL Server 2000. And ran the install.ksh script.
    The /usr/java/MSSQLdriver/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    I chmod 0777 each of the *.jar files.
    I then went into /etc/profile.d/tomcat.sh and adding the following:
    CLASSPATH=.;/opt/msSQLjdbc/lib/msbase.jar;/opt/msSQLjdbc/lib/msutil.jar;/opt/msSQLjdbc/lib/mssqlserver.jar
    Each time I login and pull up the termial I get the following error:
    bash: /opt/msSQLjdbc/lib/msbase.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/msutil.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/mssqlserver.jar: cannot execute binary file
    And can't connnect to the database within the .jsp app.
    Is there anyone out there using DBC driver for SQL Server 2000 on the Red Hat server?
    Michael

    Sorry, I needed to correct some information of where the drivers were installed.
    I created a folder called /usr/java/MSSQLdriver/new and untar the Microsoft file with the driver for SQL Server 2000. I ran the install.ksh script "sh install.ksh"
    installed the driver into the default directory "/opt/msSQLjdbc".
    The /opt/msSQLjdbc/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    Michael

  • Where and when is JDBC driver needed?

    I'm just getting started with JDBC + MySQL. I'm writing applets. But where/when do I need to install the JDBC driver?
    1. Only at compile time and only on the machine where I compile my java code.
    2. On my webhosts server.
    3. On the client as some sort of plug-in. Meaning everyone who views my web page would have to download & install something.
    Thanks.

    The JDBC driver will be downloaded to the client
    machine in the codebase. The client has to havethat
    class in order to connect to the server. So itdoes
    add to the size of the download, it's just not
    permanently installed on the client machine.
    wrong.
    NO you are WRONG again!!!
    this is an APPLET not a SERVLET
    this means....
    (and really try to use your limited intelligence to read this next part carefully)
    that the JDBC connection is coming from the client's machine where the applet is running.
    this means that the applet will download the JDBC driver as part of what it needs to run.
    if this is was a servlet then obviously the driver would only be needed on the server....
    but it isn't
    it's an applet
    >
    The database must be running on same server thatthe
    applet came from, according to the sandbox
    restrictions on an applet. You might haveadditional
    security problems trying to connect to a different
    port. wrongwrong again...
    see above.
    >>
    I'd recommend against have an applet connectdirectly
    to a database. Have the applet connect to anobject
    running on the server that will do the database
    connections and queries on its behalf. - MODdont know what you mean by an applet connect directly
    to a database. how? the rest seems to be correct. to
    be more precise, however, i must add that you would
    need to use servlets in between an applet and the
    server. an applet cannot connect to machines other
    than the one that hosts it, yet the database can be
    anywhere as long as it is visible by the jdbc code
    residing on the hosting server. like you said
    correctly, the jdbc code does not have to be
    wodnloaded to the client machine, thus it adds
    nothing to the size.
    hope this helps.this almost contains some useful information...
    to the original poster.
    the stuff posted by duffymo is correct, stuff posted here (and elsewhere) by daFei is garbage and should be ignored.

  • Does JDBC Driver needs to be downloaded ?

    Does JDBC Driver needs to be downloaded in order to be used?

    Does JDBC Driver ....Huh?
    JDBC is an inteface. It is part of the standard API that should come with most JVMs.
    JDBC uses 'drivers' which are specific to the purpose at hand. The jdbc-odbc bridge driver comes with the Sun JVMs and has since at least version 1.1.4 (years ago.) Other drivers must be downloaded or acquired. For example the Oracle drivers can be downloaded from the Oracle site and they also come on the Oracle client install.

  • Need help with MS SQL server JDBC driver

    Anyone has experience getting ACS working with SQL2005? We keep getting ‘com.adobe.adept.persist.DatabaseException: java.sql.SQLException: No suitable driver’
    We’re using sqljdbc.jar and sqljdbc4.jar that downloaded from Microsoft website. We added this to every library folder under tomcat, JRE and SDK but it did not help. Any suggestion will be helpful.
    Thanks-

    Hi,
    We have ACS with SQL Server 2005 Std correctly working.
    We have this settings:
    ############ SQL Server Connection ############
    com.adobe.adept.persist.sql.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
    com.adobe.adept.persist.sql.connection=jdbc:sqlserver://ip-addressSQL:PortSQL;databaseName =Adept
    com.adobe.adept.persist.sql.dialect=microsoft
    com.adobe.adept.persist.sql.user=userSQL
    com.adobe.adept.persist.sql.password=passSQL
    Wi use Microsoft SQL Server JDBC Driver 3.0 downloaded from Microsoft website (http://www.microsoft.com/download/en/details.aspx?id=21599)
    Good luck,

Maybe you are looking for