1 2 Previous Next 22 Replies Latest reply on Jun 7, 2011 3:04 PM by 867187 Go to original post
      • 15. Re: Oracle 10g JDBC connection refused error
        598688
        gschadow that is a great post!! It's a little late, but I wanted to say "thanks!". Your post helped me with exactly what I needed.
        • 16. Re: Oracle 10g JDBC connection refused error
          699262
          I had this issue.

          I was using Oracle Express, and had an incorrect SID.

          The URL string should be:

          jdbc:oracle:thin:@{$host}:{$port}:XE

          Note the 'XE', this is unlike the commercial Oracle setup.

          Edited by: user11114593 on Apr 30, 2009 11:29 PM
          • 17. Re: Oracle 10g JDBC connection refused error
            705320
            i used oracle 10g but here is an exception i dont understand what it is. like.......

            java.sql.SQLException:listener refused the connection with following errors:

            ORA-12505,TNS:Listner does not currently know of SID given in connect descriptor the connection descriptor used by the client was
            localhost:1521:orcl

            please any one send me the solution.......plzzzzzzzzzz

            Edited by: user11233757 on Jun 5, 2009 3:14 AM
            • 18. Re: Oracle 10g JDBC connection refused error
              752913
              gschadow,

              Your solution worked for me greatly on 10g. This resolved the db connection issues using thin driver when I hook into office network- DHCP(installed 10g in office network). But when I connect to non-office network (DSL at home) I am getting various TNS network adaptor errors. I have even configured a MS-loopback adaptor as per the install pre-requisite check. I never had such problems with my Oracle9.

              Any suggestions ?

              Thanks
              -Sudhir
              • 19. Re: Oracle 10g JDBC connection refused error
                811108
                gschadow ,

                Thanks so much. Ur post proved really helpful to me! :-)
                • 20. Not able to connect jdbc wit oracle 9i
                  826735
                  Hey avi,
                  I m trying to connect my prog wit oracle 9i via eclipse galileo
                  i ve downloaded jdbc driver ....
                  but while trying to connect , i get following error msgs
                  pls help me ..... i dont even understand this errors...if you can , plssss get me a solution...

                  Errors
                       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
                       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
                       at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
                       at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:353)
                       at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:371)
                       at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551)
                       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351)
                       at java.sql.DriverManager.getConnection(Unknown Source)
                       at java.sql.DriverManager.getConnection(Unknown Source)
                       at demo.SelectDemo.main(SelectDemo.java:28)


                  java : 134
                  dberror.class is missing in source attachment

                  java : 3668
                  The source attachment does not contain the source for the file TTC7Protocol.class

                  oracle connection.java:371
                  source attachment does not contain the source for the file OracleConnection.class

                  oracleDrive.getConnectionInstance(oracleDriver.java.551)
                  source attachment does not contain the source for the file OracleDriver.class
                  • 21. Re: Not able to connect jdbc wit oracle 9i
                    827570
                    Hi,
                    Can anyone please send me a sample code to connect to oracle database 10g XE for me.
                    I am new to JDBC and i am facing problem in doing so.
                    It would be great if any one explain me in detail what are the steps need to be taken.like class path and etc..
                    This is my program........
                    import java.io.*;
                    import java.sql.*;

                    public class DBExample1
                    {
                    public static void main(String[] args)

                    {
                    try
                    {
                    System.out.println("welcome to JDBC.....");
                    Class.forName("oracle.jdbc.OracleDriver");
                    System.out.println("Oracle JDBC driver loaded");

                    con=DriverManager.getConnection("jdbc:oracle:thin@LOLLA-PC:1521:XE","my username","my password");
                    Statement s=con.createStatement();
                    ResultSet res = s.executeQuery("SELECT * from CNF_USER");


                    while (res.next())
                    {
                    String u = res.getString("uname");
                    String p = res.getString("pass");
                    System.out.println(u + "\t\t" + p);
                    }

                    if(con!= null)
                    {
                         System.out.println("connection refused . Try Again...");
                    }

                    s.close();
                    con.close();
                    }
                    catch(Exception e)
                    {
                    e.printStackTrace();
                    }
                    }
                    }
                    Please excuse me for any mistakes and guide me through..
                    Please explain me from path setting.......It's somewhat urgent
                    Thanking you all...

                    Edited by: user13380383 on Feb 28, 2011 10:30 AM

                    Edited by: user13380383 on Feb 28, 2011 10:31 AM
                    • 22. Re: Not able to connect jdbc wit oracle 9i
                      867187
                      use the following method to avoid the error

                      User name= sys as sysdba
                      Password= orcl

                      SID = orcl


                      no problem to connect
                      1 2 Previous Next