Linux JDBC connectivity issues

I am having trouble in connecting to 9i RAC via JDBC. The same sample application works well with windows/sun OS. In linux it returns Network Adapter error.I am using ojdbc14.jar to connect to DB.
Appreciate your replies.
Thanks.

Saro,
Do you also have 9i RAC on your Windows/SUN machines -- where you claim this application worked?
Perhaps you could provide the entire error message (and stack trace) you are getting, as well as the section of your code that is causing the error?
Assuming I am correctly guessing what your error message is, "Network Adapter" errors are usually caused because of an incorrect (database connection) URL.
You should find example URLs for RAC if you search this forum's archives.
Good Luck,
Avi.

Similar Messages

  • JDBC connection issue to 9.2.0.7

    Hello,
    I am trying to make a jdbc connection to an Oracle 9i database (on AIX, Entreprise 9.2.0.7 - 64 bit) from a linux box.
    On the client, I have last jdbc driver available :
    jdbc driver name: Oracle JDBC driver
    jdbc driver version: 9.2.0.5.0
    jdbc driver major version: 9
    jdbc driver minor version: 2
    db product name: Oracle
    db product version: Oracle9i Release 9.2.0.6.0 - Production
    JServer Release 9.2.0.6.0 - Production
    However, when trying to connect I got the following execption :
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093888)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    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:3678)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:172)
    at austin.db.TestDB.main(Unknown Source)
    Note, that with the same code, I can successfully connect to another server (Oracle9i Release 9.2.0.6.0 running on windows)
    Does anyone has an idea oof what is going wrong

    Hello,
    so here is the solution : in your tnsnames.ora file, the entry name must be the same as the DB SID.

  • JDBC connection issue with multiple DBs on same instance

    I have two databases on one sql server 2012 instance.  One called 'demotime' the other called 'demotime_dev'.  how ever when I change in my JDBC connection the DB from demotime to demotime_dev.  the connection still remains established with
    the demotime, is there any known reason to cause this? does both being on the same instance have anything to do with the problem?

    Do your application may send a "USE [demotime]" command to Switch to the database? Do you may use a config file in your application where the database is still pointing to the other database?
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Crystal Report 2008 IDE - JDBC connection issue

    Hello,
    I'm using Crystal Report 2008 IDE. I've created a report that goes against Oracle 11G database.
    I have installed Oracle Instant Client (32 bit) 11.2.0.2.0.
    I can establish and Oracle connection via the IDE.
    When I attempt to establish a JDBC connection through the database expert wizard, I keep getting JDBC driver not found message.
    I've updated my CRconfig.xml specifically the classpath to point to where my ojdbc5.jar file is located.
    What else do i need to do in order to establish a JDBC connection?

    Hi,
    First of all what is the service pack that you are using for Crystal Reports 2008, because Oracle 11g R2 is supported from Service pack 4 onwards in CR 2008.
    For JDBC connection with CR 2008 you can have a look at this link might this would help you:
    http://www.sheroz.com/articles/crystal-reports-2008-mysql-and-oracle-databases
    Regards,
    Kuldeep G

  • Sender - JDBC - Connection issue

    Hi All,
    I see a very strange issue on the JDBC Sender Comm Channel. On the Comm Channel Monitoring, I see it in GREEN. But it is not actually polling the DB table.
    Restarted the channel and that did not work.
    For now I have created a copy of the comm channel and the copy is working fine for couple days and again the same problem.
    I created another copy and second copy is working fine till now.
    Not sure what happened.
    I think there are some open connections to the DB still hanging in there. I am wondering if there is any way of deleting or closing the open connections.
    Thanks in advance.

    Hi Naveen,
    In your jdbc sender communication cahnnel go to advanced Mode tab --> there is a check box for Disconnect from Database After Processing Each Message. Select this option and give a try. This will make database connection released and reestablished before every poll interval.
    Please see this help:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    ---Satish

  • JDBC Connect Issues

    So, I have the same project, but thought I would start a new
    string for this new issue.
    I don't have an Oracle client on my server, and I am trying
    to do a connect though a cfscript/createObject to pull Jasper
    Reports into Coldfusion.
    I guess I was wondering, could I pull all of the Oracle
    client drivers, .jar files into my already set up path and access
    them or am I missing how that works. Quite often I am... so if this
    is the case can you explain it a little?
    I am getting a [Macromedia][Oracle JDBC Driver] Error
    establishing socket. Connection Refused: connect
    and I see that it is a driver issue, so if someone could
    point me in a direction and maybe help educate me a bit?
    Appreciate everything!
    Va.

    Sorry I went MIA, I was writing the tech part of a
    feasibility study of integrating coldfusion and java... in the
    middle of trying to learn how some of this works, but why do things
    in order right? :-)
    So, the cftry cfcatch caught nothing. I will be checking logs
    now. I have no idea where it is falling out. I might post the code
    later if I get in the mood to retype it.
    I also wrote this little class to test weblogic, which works
    for about 15 min then shuts the weblocig server down with an
    UnsupportedClassVersion Error... ???
    Thanks and take care,
    Va.

  • JDBC Connection Issue in Weblogic 10.3

    Hi,
    We have upgrade from Weblogic 10.0 to Weblogic 10.3.
    We are having the ojdbc6.jar in the server classpath, the JDK being the 1.6. The DB is Oracle 10g.
    In an cluster environment, we are getting this error, while passing the connection to an Array Descriptor.
    RROR [2009-10-25 04:40:41,700] [] [] - Generic Exception ::
    [weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_
    ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_1030_WLStub
    cannot be cast to oracle.jdbc.OracleConnection]Kindly help me in providing the solution.
    Thanks in Advance,
    Sridhar J

    Hi. The issue is complicated. First, it seems that you are using a DataSource that has not been
    deployed to the cluster, so you are doing JDBC from one WLS server to another before going
    to the DBMS. That is slow and problematic. You should deploy the DataSource to the cluster
    so every WLS instance has it locally.
    The second problem is about your code's cast to an oracle.jdbc.OracleConnection... Are you
    sure that code worked in WLS 10.0?

  • JDBC Connectivity issue

    Hi ,
          I ran into this issue when I configured my receiver JDBC adapter(synchronous) - I am on XI 3.0 Sp20 (JDK 1.4) and I have installed OJDBC 1.4 as my JDBC driver to connect to an Oracle 10g system.
    I have ruled out driver isuues and database issues by writing a small test program to connect the db using the same drivers and the same connectivity parameters like ip/port/sid/id/pwd I used in XI. The program ran fine...
    I am really not able to pinpoint the issue and I would appreciate your help..
    Error during database connection to the database URL 'jdbc:oracle:thin:@<ip>:1521:<SID>;SelectMethod=cursor' using the JDBC driver 'oracle.jdbc.driver.OracleDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:oracle:thin:@<ip>:1521:<SID>;SelectMethod=cursor': SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169870336)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))'
    Pls note i did a few negative tests to rule out a few issues ->
    1) I changed the server ip on purpose to a wrong one... and the system gave me  a different error. So the db server ip is right and working..
    2) I changed the password to a wrong one...but I still got the same error as the above..which means the system does not go up to the ID validation step...
    3) I gave a wrong SID...and I still got the same error...which leads me to conclude that the adapter is able to point to te right server but not able to hit the db...
    Regards,
    Arvind R

    Hi Arvind,
    even though you ruled out problems with the driver, I would suggest to use the Oracle thin JDBC driver version 10.
    Maybe there is a problem with the current OJDBC driver you have deployed on your XI. I'm working on an XI 3.0 and we recently deployed version 10 and experience no problems even connecting to clustered Oracle databases. Maybe worth a shot!
    Regards
    Sven

  • JDBC connection issue - Any ALUI 6.5 Guru there?

    This is the first time i am trying to install Aqualogic 6.5. Mu OS is W2003 and DB: SQL server 2005. I am having issue with JDBC database connection. According to installation guide i've crated a database user with 'sysadmin' role and set default database to 'alidb'.
    USE [master]
    GO
    CREATE LOGIN [aliuser1] WITH PASSWORD=N'mypass', DEFAULT_DATABASE=[alidb], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
    GO
    EXEC master..sp_addsrvrolemember @loginame = N'aliuser1', @rolename = N'sysadmin'
    EXEC aliuser1..sp_addsrvrolemember @loginame = N'aliuser1', @rolename = N'sysadmin'
    If thats wrong or if i missed any steps, Can anyone walkthorugh me the steps to create database user?
    My present configuration manager settings for portal database:
    vendor: mssql
    host:localhost
    port: 1433
    Here is error from diagnostic.bat:
    error: PortalObjectsFactory Initialization Failure (Java)
    platform: Windows (Java)
    failure: FATAL: PortalObjectsFactory Initialization Failure (Java)
    recommendation: RECOMMENDATION: Review the exception listed below for
    details. Since OpenKernel initialized correctly, this usually
    means that the portal database is not scripted or properly
    configured, or there is an installation problem related to JAR
    files. This may also mean the search libraries are not on your
    PATH or LD_LIBRARY_PATH. Try running ptverify.
    exception: OKConfigException
    OpenKernel configuration failure. This usually means INVALID
    DATABASE SETTINGS. Run ptconfig to verify your database
    connection. If this fails, check the web application server
    user's access rights to the file system. Finally, verify the
    XML settings files are not corrupt.
    message: Error opening database connection to:
    jdbc:plumtree:sqlserver://localhost:1433;DatabaseName=alidb,
    exception: [plumtree][SQLServer JDBC Driver]Error establishing
    socket to host and port: localhost:1433. Reason: Connection
    refused: connect
    secondary exception: at
    com.plumtree.openkernel.dbutils.impl.DBConfigHelper.setPlumtreePool
    DataSource(DBConfigHelper.java:330)
    FAILED TO INITIALIZE SYSTEM. YOU CANNOT PROGRESS BEYOND THIS POINT.

    HI tks for replay,
    weel i am able to connect to oracle and execute some query.
    well bea is working fine i am able to open the consile ,oracle db is working fine i am able to execute some sql commands ,alui has some problem sqljdbc error ...i got some document which says to create a plum10 database in oracle things like that....still i am facnig an error at sqljdbc can u pls help me out in this
    pls mail at this id.
    Thanks
    [email protected]

  • Linux JDBC Connection Problem from Win 98

    Try to connect to linux Oracle 8.0.5.0.0 using JDK 1.2 and jdbc classes12_01.zip file
    i receive a 17002 error Network adapter connection error.
    Thanks

    Try to connect to linux Oracle 8.0.5.0.0 using JDK 1.2 and jdbc classes12_01.zip file
    i receive a 17002 error Network adapter connection error.
    Thanks

  • Oracle Express JDBC connection issues

    Hi,
    I installed the OE10g, however I cannot connect through JDBC, the admin tool runs at:
    http://127.0.0.1:9080/apex
    note that I changed the http port and works properly, however, when trying to reach this DB through JDeveloper's 'Create Database Connection' wizard, I set:
    Username: SYSTEM
    Password: root
    Role: (empty)
    Driver: thin
    Host name: localhost
    JDBC Port: 1521
    SID: ORCL (service name not selected)
    The above settings don't work, please assist.
    ///RGE

    no, the error message says:
    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:EX

  • JDBC Connection Issue

    Hi experts,
    We have a visual composer based application which runs on EP 7.0 SP14.
    This application connect to sql server and use one of its databases.
    We use Microsoft JDBC drivers SP3 for this purpose.
    Everything works perfectly, but atleast once in a day, the connection to the database fails without giving much of details. Given below is the error log which i could retrieve.
    #1.5 #0017A43AD77E00690000009D00001E940004556EB93584F7#1219833948667#/Applications/BI/UDI#sap.com/irj#com.sap.ip.bi.sdk.dac.connector.relational.CommonConnection#59610#1974##sapepdev.etaworld_DEP_4180850#25241#acb6a660740611dd8ce20017a43ad77e#SAPEngine_Application_Threadimpl:3_37##0#0#Error#1#/Applications/BI/UDI#Plain###java.sql.SQLException: MicrosoftSQLServer 2000 Driver for JDBCError opening/loading com.microsoft.util.transliteration.properties.#
    #1.5 #0017A43AD77E0069000000A000001E940004556EB935911D#1219833948667#/Applications/BI/UDI#sap.com/irj#com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnection#59610#1974##sapepdev.etaworld_DEP_4180850#25241#acb6a660740611dd8ce20017a43ad77e#SAPEngine_Application_Threadimpl:3]_37##0#0#Error#1#/Applications/BI/UDI#Plain###com.sap.ip.bi.sdk.exception.BIResourceException: <Localization failed: ResourceBundle='com.sap.ip.bi.sdk.localization.sdk.dac.connector.jdbc.Jdbc', ID='sdk.dac.connector.jdbc_1000', Arguments: [> : Can't find bundle for base name com.sap.ip.bi.sdk.localization.sdk.dac.connector.jdbc.Jdbc, locale en_US#
    How can i avoid this?
    Can anyone suggest a solution?
    Thanks a lot in advance
    Shobin

    Please check the belo link it may help
    http://www.websina.com/bugzero/kb/oracle-connection.html
    Thanks
    Srikanth

  • JDBC connection issue's HELP!

    import java.sql.*;
    public class test{
         public static void main(String args[]){
              Statement stmt;
              ResultSet rs;
                   try{
                        Class.forName("com.mysql.jdbc.Driver");
              Connection conn = DriverManager.getConnection("jdbc:mysql://h50mysql3.secureserver.net/insurance_bdc", "user", "password");
              Statement stmt = conn.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT * FROM employees");
              while(rs.next())
                   System.out.println(rs.getString("name") + rs.getString("address"));
              catch (SQLException exception)
                   System.out.println("\nSQL Exception " + exception.getMessage() + "\n");
              stmt.close();
              rs.close();
    Can someone please help with this?

    try this instead:
    import java.sql.*;
    public class test{
    static Statement stmt=null;
    static ResultSet rs=null;
    public static void main(String args[])throws ClassNotFoundException, SQLException{
    try{
    Class.forName("com.mysql.jdbc.Driver");
    Connection conn = DriverManager.getConnection("jdbc:mysql://h50mysql3.secureserver.net/insurance_bdc", "user", "password");
    stmt = conn.createStatement();
    rs = stmt.executeQuery("SELECT * FROM employees");
    while(rs.next())
    System.out.println(rs.getString("name") + rs.getString("address"));
    catch (SQLException exception)
    System.out.println("\nSQL Exception " + exception.getMessage() + "\n");
    }finally{
       try{
      if(rs!=null) 
    rs.close();
    if(stmt!=null) 
      stmt.close();
      }catch(Exception e){
    }

  • Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

    Hello,
    I am experiencing an issue with pinging a JDBC connection Pool.
    I installed the following without any warnings or errors:
    Operating System: Oracle Enterprise Linux 5
    Oracle XE 11gR2 (11.2.0.2.0) database
    Glassfish 3.1.2.2
    I will refer to the steps I did after the installations
    1) In the .profile file of the OS I add the following:
    JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
    JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
    GLASSFISH_DIR=/u01/glassfish3
    GLASSFISH_HOME=/u01/glassfish3/glassfish
    DERBY_HOME=$GLASSFISH_DIR/javadb
    OPEN_MQ_HOME=$GLASSFISH_DIR/mq
    PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
    export GLASSFISH_HOME
    export DERBY_HOME
    export OPEN_MQ_HOME
    export PATH
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
    . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
    3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
    Pool Name: ds_orasys
    Resource Type: javax.sql.DataSource
    Datasource Classname: oracle.jdbc.pool.OracleDataSource
    User: [myschema]
    Password: [myschema password]
    URL: jdbc:oracle:thin:@localhost:1521:xe
    When I ping the connection pool I get the following message in the server log:
    [#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
    [#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
    I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
    I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
    Can anybody help me out or point me to the right direction.
    Thank you in advance

    The error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.

  • Problem JDBC Connection using OCI Driver on Weblogic Portal on Linux

    Hi Team,
    I want a JDBC connection using OCI Driver in Weblogic Portal 8.1 sp4 on Linux. When I had tested using JDBC connection using Plain Java Code it is working. Also when I create the OCI Connection Weblogic Connection Pool it is working.
    But My Requirement is to create the connection using Java Code in Portal Application
    But When I create OCI connection in the code it is throwing NO SUITABLE DRIVER Found.
    ---------- Code in Plain Java Code ------------ Same code is used in Weblogic Portal Application --------------------------------
         public static void main(String[] args) throws Exception{
              Class.forName("oracle.jdbc.driver.OracleDriver");
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              String url="jdbc:oracle:oci8:@TESTDB";
              Properties props = new Properties();
         props.put("user","scott");
         props.put("password","tiger");
              conn=DriverManager.getConnection(url,props);
    When I am using the same code in Weblogic Portal and Deployed on Weblogic Portal Server 8.1 SP4 it is throwing following error.
    -------------- Exception on Server Log --------------------
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
    at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
    My Environment is
    LINUX
    Weblogic 8.1 SP4
    Oracle 9i Client on Same Machine
    Oracle 10g Server on Different Machine
    My Environment Variables on the Linux Server also set properly as following
    PATH=/apps/pmaaum/ant/apache-ant-1.6.5/bin:.:/apps/beahomedev/jdk142_05/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/product/9.2.0/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/bin
    LD_LIBRARY_PATH=/usr/lib:/apps/oracle/ora9i/product/9.2.0/lib:/apps/oracle/ora9i/product/9.2.0/lib32:/apps/oracle/ora9i/product/9.2.0/rdbms/lib:/usr/openwin/lib:/apps/oracle/ora9i/product/9.2.0/jdbc/lib
    JAVA_HOME=/apps/beahomedev/jdk142_05
    JDBC_LIB=/apps/oracle/ora9i/product/9.2.0/jdbc/lib
    CLASSPATH=:.:/apps/beahomedev/jdk142_05/lib/rt.jar:/apps/oracle/ora9i/product/9.2.0/jdbc/lib/classes12.jar
    Please help me, Let me know if you required anything.
    Thanks in Advance
    Vishnu
    Edited by: vishnuk on Oct 23, 2009 4:07 AM
    Edited by: vishnuk on Oct 23, 2009 4:10 AM

    Hi Vishnu
    Looks like a classloader issue. BEA class loader is very tricky. Any jar added manually in classpath, will end up loading only those classes. Any imports that we have in any of those classes do not get loaded. Anyhow, coming to your point, add classes12.jar inside your portal web project Web-Inf/lib folder and see if that helps. Usually thats where we put all the JARs for 8.1 SPxx applications. If this still breaks, then remove the jar from web-inf/lib folder and add under your portal app App-Inf/lib folder. First try with app-inf/lib folder having this jar. If not then with web-inf/lib. Basically web-inf is specific to that web app only. If you have a different app having this jdbc code, then put under app-inf/lib folder. Make sure that you remove the classes12.jar that you added in classpath either in env variable or in setdomainenv.cmd file.
    When weblogic uses native OCI Drivers, it refers to jars at this location: ....\beawlp814\weblogic81\server\ext\jdbc\oracle\10g or 9g. Try using one of these jars and see if that works. Most of the times I used these jars only for oracle specific native drivers.
    Word of caution. Try to use Connection Pool and a DataSource created in weblogic console for your jdbc code. This Datasource can still use the Oracle drivers that you want (instead of BEA Weblogic wrapper oci drivers) located in above location. Use JNDI Lookup and get Datasource and then connection. This is more recommended approach with many advantages then using DriverManager approach..
    Goud

Maybe you are looking for