JDBC - Oracle 8.1.7 Connection Problem

Hi,
Things were working great as long as i was with Oracle 8.1.6. All hell broke loose as soon as i tried to connect to Oracle 8.1.7. Only the IP, Service name, DB_Id & Db_Pass has changed in the connection string. Yet on the below statement
DriverManager.getConnection("jdbc:oracle:thin:@192.168.172.34:1521:epcjobs","epcperf","epcperf");
i get the following exception
java.sql.SQLException: Protocol violation
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:391)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:651)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:172)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:103)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
Seems some problem in the protocol or sub-protocol name or do i have to change my Oracle Drivers?
If any one has encountered this issue, please enlighten me.
Note: I can connect successfully using SQL+.
many thanks in advance,
Pawan

Just a guess...
The Oracle comm processes (net8 or whatever it is called) allows for different protocols to communicate. Your server is set up for a different protocol than the old one was. Either the client or the server needs to adjust.
You can test this by creating a TSN and using sqlplus to connect. Once it works open up the TSN file (*.ora?) and get the correct params from there.

Similar Messages

  • Jdbc:oracle:thin:@[host]:[port]:[sid] problem:

    Hi all
    When I try to make connection through this string jdbc:oracle:thin:@localhost:1521:orcl , It failed to connect to the database.
    I am trying to connect to database through obiee 11.1.1.5 by jdbc connectivity.
    Please tell me its solution.....
    Thanks
    Rizwan Ali

    Hi,
    The TNSNAME.ora that the OBIEE11g uses is insede the folder <OBIEE11g_HOME>\Middleware_Home\Oracle_BI1\network\admin
    (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = IP address)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))
    Refer
    http://123obi.com/2011/03/error-the-connection-has-failed-in-obiee-11g/
    http://gerardnico.com/wiki/database/oracle/connect_descriptor
    FYI: OTN Message:
    1. If you just need one TNS alias, then copy the database connection descriptor from database tnsnames.ora file to the tnsnames.ora file under the BIEE directory:
    [middleware home]/[oracle home]/Oracle_BI1/network/admin
    2. You may also copy the entire tnsnames.ora file
    3. Another alternative is to set the TNS_ADMIN environment varaible which would point to the directory where a tnsnames.ora file is located. This would need to be set as a System Environment variable in Windows or in the command shell if starting from a command-line. For Unix/Linux, it would need to configured in the user profile that owns the software or set explicitly in the shell if starting from the command-line. See Note 111942.1 Setting TNS_ADMIN Environment Variable for more information on adding this environment variable.
    Thanks
    Deva

  • Oracle-sql developer database connection problem

    hi all,
    i tried creating a new connection in SQL developer but unable to create.
    i tried with all the combinations such as
    connection name:hr_orcl
    username:hr
    password:hr
    connection tyrpe:basic,Role:default
    hostname:localhost/ip address of my system
    port:1521
    SID:xe/orcl
    But still it is hsowing as " network adapter could not establish the connection".
    So could anybody please help me in this regard as to how to resolve this issue as I have searched several sites but could not find a solution for this.Waiting for your reply at the earliest
    Thanks,
    Rajesh P.
    9949254433

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.
    C:\Users\rajesh>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 28-DEC-2012 08:21
    :08
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 28-DEC-2012 08:20:36
    Uptime 0 days 0 hr. 0 min. 31 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rajesh-PC)(PORT=1521)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    C:\Users\rajesh>

  • Oracle 9i DB ODBC Connectivity Problem

    i have oracle 9i release 9.0.1.0.1 and i want to use the oracle 9i DB in my VB Appplication how can i connect to the DB and what driver should i use.

    You will need to install the Oracle client on whatever machine(s) your application will be running on. The Oracle client will include a version of the Oracle ODBC driver. You can download an updated version from OTN, you just need to make sure that you match the version of the driver and the version of the Oracle client, i.e. the 9.2.0.x Oracle ODBC driver should be used on a 9.2 Oracle client, the 9.0.1.x Oracle ODBC driver should be used on a 9.0.1 Oracle client.
    Realistically, it doesn't matter much which version of the Oracle client you use. All else being equal, I would probably install the 9.2 Oracle client, but if other versions of the client are already installed, I wouldn't sweat it too much.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Jdbc:oracle:thin:@ service name too long

    I am going to use jdbc:oracle:thin:@ as my connection.
    but my service name is too long....
    is that any ways to include the long service name?
    Thanks!

    user652882,
    Pardon me for asking, but how do you know your service name is too long?
    Good Luck,
    Avi.

  • JDBC Connection problem in Oracle 11g

    Hello Everyone,
    Recently we have upgraded our Oracle server from 9.2 to 11g. Since then our Java program scheduled in a shell script (on the Sun Unix server) is not working
    and is giving below error
    "java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified"
    What is strange is that our Web application which is on the same server (application server is iPlanets) is able to connect successfully. Also I ran the same program on
    my local machine and it is able to connect to the 11g database. It is only on unix server (where the app server resides) that is giving problem. FYI the unix server
    does not have Oracle client installed so we are using the below in db.properties file (used by application for connection details).
    URL=jdbc:oracle:thin:@59.90.26.156:1521:LDPR
    The Web application and the stand alone java program (giving problem) call the same program to db connection and also share the same environment (class folder/library files etc).
    Also the program was working perfectly fine with Oracle 9.2. Please suggest the solution as I have tried everything that came to my mind.
    Regards,
    Sid.

    Hi ...
    Yeah BPEL connect from the back end rather than using weblogic, but to change it ... we need to change the code from BPEL side to connect from the weblogic JDBC services.

  • STRUTS - JDBC connection problem

    im using tomcat 5.5.9, jdk 1.5, oracle database...
    � have a project in struts...
    my project works with my compiler with no problem...
    *i setup tomcat on C:\jakarta-tomcat-5.5.9
    and � made these setting for tomcat:
    � added these strings to my CLASSPATH
    --C:\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar
    --C:\jakarta-tomcat-5.5.9\common\lib\jsp-api.jar
    after � deployed my project under tomcat there was a "classes12.zip" file under this path:
    C:\jakarta-tomcat-5.5.9\webapps\BILGISU\WEB-INF\lib
    � changed it to class.jar
    also � have other .jars under the same path above.
    these jars are:
    classes12.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-dbcp.jar
    commons-digester.jar
    commons-fileupload.jar
    commons-lang.jar
    commons-logging.jar
    commons-pool.jar
    commons-validator.jar
    jakarta-oro.jar
    jdbc2_0-stdext.jar
    struts.jar
    struts-legacy.jar
    THE PROBLEM IS:
    my index page is a "login" page..
    i can open the login page under tomcat.
    but when � enter the username and password, page says it is wrong username or password although these are true parameters...
    i think i still have a connection problem but � dont know how to solve...
    MY SEARCHES SAYS:
    you have to reconfigure "C:\jakarta-tomcat-5.5.9\conf\server.xml" like that:
    <Resource name="jdbc/myoracle"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:[email protected]:1521:mysid"
    username="scott"
    password="tiger"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"/>
    Resource name="jdbc/myoracle" ->HERE WHAT IS "myoracle"??? DOES IT BELONG TO MY PROJECT?
    you have to reconfigure "C:\jakarta-tomcat-5.5.9\conf\web.xml" like that:
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    will i write this to my web.xml
    and what is "auth=Container" here???????
    thanks in advance
    yasin

    ONE MORE QUESTION
    Im defining the datasource in my "struts-config.xml"
    do i have to define them again in "tomcat/conf/server.xml" ...

  • Connection reset using JDBC Oracle thin Driver (towards 10g DB)

    Hi we have a home-grown application and a Oracle 10g (10.2.0.1) database.
    We created a scheduled servlet that gets a JDBC connection from a persistent connected cache (an OracleDataSource object registered using OracleConnectionCacheManager). The servlet runs every 15 minutes and runs the query "SELECT SYSTIME FROM DUAL" on 10g Database as XYZ user. The datapool was created yday on web-app and all queries ran successfully for about 5 hours after which it reported a connection reset error.
    I can then conclude that we cannot keep the server session alive for the JDBC client by running frequent SQL queries.
    We didnt get any messages on the DB server side that indicate the release of the session
    Ultimately, we are struggling with reset connections from our applications that are
    using the JDBC thin oracle driver; after a couple of hours of idle
    connections, we receive the below error from the JDBC driver:
    Jul 5, 2007 10:59:53 AM oracle.jdbc.driver.DatabaseError throwSqlException
    WARNING: DatabaseError.throwSqlException(e): Unable to find ORA number from
    exception Jul 5, 2007 10:59:53 AM oracle.jdbc.driver.DatabaseError
    findMessage
    WARNING: DatabaseError.findMessage(errNum, obj): returned Io exception:
    Connection reset Jul 5, 2007 10:59:53 AM
    oracle.jdbc.driver.PhysicalConnection getWarnings
    INFO: PhysicalConnection.getWarnings()
    Any suggestions please ?
    Vk

    The code itself is fine; the problem is with one of:
    1) the connection URL
    2) intermediate networking
    3) the database itself
    1) your connection URL is "jdbc:oracle:thin:@127.0.0.1:1521:orcl"
    - is Oracle really running on the default port, 1521
    - is the installation SID really "orcl"
    2) lots of possibilities, but only a couple are likely
    - is TCP/IP configured and running on your host
    - is there a persoanl firewall rpduct running? perhaps it's blocking the connection
    3) Is Oracle running?
    Is the listener running?

  • Semmingly intractable JDBC connect problem

    Greetings,
    I am having massive difficulties getting our application to talk to our oracle database. We've (probably unwisely) upgraded the OS to RH9, the database to Oracle 9i and the JDK to 1.3.1 (from RH7, 8i and 1.2).
    The problem is that when I try to connect via JDBC in a jsp, it hangs for a long time and comes back with "ServletException: Io exception: the Network Adaptor could not make the connection." This seems to be a common problem, but I have worked extensively on this, and have tried all the posted remedies I can find: connect URL is verifiably correct, database/listener running, path, networking, different connect methods, etc.
    At a low level, what happens is that the listener establishes the connection, but never recieves a reply back, and I can't determine whether oracle is failing (no trace/log seems to support it) or if JDBC is failing. Since all I get is "Connection failed" in a single method call, I'm not sure how to diagnose that.
    Has anybody seen this before? It's killing me
    Thanks,
    --M                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Can you run a simple app that connects to Oracle successfully, no Tomcat or JSPs involved? I'd try that, if you haven't already.
    Here's a simple Java app that will let you try it:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class ConnectionTest
        public static void main(String [] args)
            try
                if (args.length > 0)
                    Connection connection = ConnectionTest.getConnection(args[0]);
                    DatabaseMetaData meta = connection.getMetaData();
                    System.out.println("Database product: " + meta.getDatabaseProductName());
                    System.out.println("JDBC driver     : " + meta.getDriverName());
                    connection.close();
                else
                    System.out.println("No properties file given");
            catch (SQLException e)
                System.err.println("SQL state: " + e.getSQLState());
                System.err.println("SQL error: " + e.getErrorCode());
                e.printStackTrace(System.err);
            catch (Exception e)
                e.printStackTrace(System.err);
        public static Connection getConnection(final String propertiesName)
            throws ClassNotFoundException, SQLException,IOException
            Properties props=new Properties();
            FileInputStream in=new FileInputStream(propertiesName);
            props.load(in);
            in.close();
            String drivers=props.getProperty("jdbc.driver");
            Class.forName(drivers);
            String url=props.getProperty("jdbc.url");
            String username=props.getProperty("jdbc.username");
            String password=props.getProperty("jdbc.password");
            System.out.println("driver  : " + drivers);
            System.out.println("url     : " + url);
            System.out.println("username: " + username);
            System.out.println("password: " + password);
            return DriverManager.getConnection(url, username, password);
    }Save these properties (changed to your values) to ConnectionTest.properties:
    jdbc.driver     = oracle.jdbc.driver.OracleDriver
    jdbc.url        = jdbc:oracle:thin:@host:1521:SID
    jdbc.username   = username
    jdbc.password   = passwordCompile like this:
    javac ConnectionTest.javaRun like this (assuming ConnectionTest.properties and classes12.jar are in the same directory as ConnectionTest.class):
    java -classpath .:classes.12.jar ConnectionTest ConnectionTest.propertiesIt'll come back and tell you the database vendor name if the connection succeeds. - MOD
    MOD

  • MSSQLServer jdbc connect problem on ODI 11G R2

    I have a MS SQL Server jdbc connect problem on ODI 11G R2 / Windows server 2008 64 bits.
    Tried, one by one, all versions of Microsoft drivers.
    Sqljdbc4.jar copied to : %appdata%\odi\oracledi\userlib\
    The Topology connect syntax is :
    driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL : jdbc:sqlserver://<host>:1433
    => All the topology tests end with time-outs.
    Installed 10G ODI.
    Works with 1.4 java and sqljdbc.jar version 2 jdbc driver.
    Times out with version 3 and/or Sqljdbc4.jar + JAVA_HOME & ODI_JAVA_HOME set to 1.6 path.
    also tried, with no success (time-outs) on either 10g or 11g :
    com.inet.tds.TdsDriver
    jdbc:inetdae7://<host>:1433?database=<DB>
    same results for :
    net.sourceforge.jtds.jdbc.Driver
    jdbc:jtds:sqlserver://<host>:1433
    Any suggestions for a fix?
    Many thanks in advance.

    Hello,
    ODI (11g) Studio is certified on Windows 32 bit only, not on 64bit.
    However you may still install it and configure ODI Studio to run with a 32 bit java.
    Details pls see Master Note For ODI 11g Install Issues And Questions (Doc ID 1214428.1).
    To connect to SQL Server:
    # Check and make sure the authentication mode of your Microsoft SQL Server Server is set to "SQL Server and Windows" or "Mixed", otherwise Oracle Data Integrator (ODI) is unable to connect to the database.
    # Before you create the Oracle Data Integrator (ODI) Dataserver in Topology Manager > Physical Architecture, stop all ODI processes, and place the JDBC Driver file in the ODI's userlib and "/drivers" folder.
    For ODI Studio (Local No Agent)
    %APPDATA%\odi\oracledi\userlib
    %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<user>\Application Data).
    Standalone Agent
    ODI_HOME\oracledi\agent\drivers
    Note: If you decide to use the DataDirect driver that comes with ODI 11g install/ embedded in ODI 11g
    weblogic.jdbc.sqlserver.SQLServerDriver
    Then you don't need to worry about this step.
    # Make sure that the database is the default database of the user account employed by ODI for connection, and that the password is correct.
    # Verify (in your Microsoft SQL Server Server network configuration) that TCP/IP has been enabled on port 1433.
    For more details see How To Set Up JDBC Driver Connections For The Microsoft SQL Server For ODI (Doc ID 423914.1)
    If you try sqljdbc.jar, you need to configure ODI_JAVA_HOME to jdk1.5
    sqljdbc4.jar, jdk1.6 (since ODI 11g requires jdk1.6, I'd suggest sqljdbc4.jar)
    More see Compatibility Matrix For Java Machines And JDBC Drivers Used With ODI (Doc ID 807235.1)
    Hope that helps other people who run into this,
    Edited by: user742480 on Apr 4, 2011 12:06 PM

  • IIOP connection problems .: JDeveloper 3.1 and Oracle 8.1.6

    This is my 4th day working on this problem. I cannot get an IIOP connection to work.
    I have verfied that the listener is running on port 2481, I have been inside of the init.ora, listeners.ora, I have read the error inside of listeners.log, and I have been trying things with the Net8 Assistant also.
    Most of the posts on this subject seem older, I am wondering if anyone has had this problem recently with the versions that I am using. There are so many things I have been told to change, I'm wondering if there is a definitive list of steps to fix this problem.
    Any help is greatly appreciated.

    r singh wrote:
    >
    I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
    the start up of the server.
    My settings:
    - WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
    - I created the connection pool for oracle with the following
    parameters:
    connection name: OracleConnectionPool
    url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
    driver class name: oracle.jdbc.driver.OracleDriver
    properties: user=scott
    password=tiger
    - I have also downloaded classes12.zip and nls_charset12.zip from
    Oracle.com
    and have placed under $WL_HOME/lib.
    - I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
    in
    front of the $CLASSPATH in the startWeblogic.sh script. The echoed
    classpath
    from the startup script is:
    /opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
    charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
    _sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
    - Still I get the error:
    <Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
    connection pool "Or
    acleConnectionPool" No suitable driver>
    Can somebody point me out if i am doing anything wrong here.
    Thanks.
    RamanandHi,
    Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
    not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
    Joe

  • Jdbc connection problem

    Hi All,
    I have problem with connection to Oracle database using both 'oci8' and 'thin' types for java application run within j2ee version 1.2.1 Error messages below.
    If I use oci8 with stand-alone java application the connection and data access work fine.
    I use:oracle 8i (817); jdk 1.2.2; j2ee 1.2.1 on window 2000
    Please help - thanks
    binam
    The Errors: with oci8:
    connection ERROR...access denied (java.lang.RuntimePermission loadLibrary.ocijdbc8 )
    The Error with: "thin":
    oracle.net.TNSAddress.SOException
    at oracle.net.TNSAddress.ServiceAlias.initFromNVPair(Unknown Source)
    at oracle.net.TNSAddress.ServiceAlias.initFromString(Unknown Source)
    at oracle.net.resolver.AddrResolution.resolveAddrTree(Unknown Source)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(Unknown Source)
    at oracle.net.ns.NSProtocol.establishConnection(Unknown Source)
    at oracle.net.ns.NSProtocol.connect(Unknown Source)
    at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1213)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:209)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at Employee.main(Employee.java:23)

    Hello!
    I had this same problem using thin. Then I changed tnsname in getConnection by address:port:sid. Like below.
    conn = DriverManager.getConnection ("jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:SIDNAME","LOGIN","PASSWORD");
    It worked very well.
    null

  • Jdbc connectivity problem

    frnds while running the fallowing code i'm getting a problem please help me out
    i'm not getting what to do for this error
    import java.sql.*;
    import java.util.*;
    class DB {    
    public static void main(String[] args) throws Exception
    String driverClass="oracle.jdbc.driver.OracleDriver";
    String url="jdbc:oracle:thin:@servername:1521:p";
    String username="test2";
    String password="abc";
    Class.forName(driverClass);
    Connection conn=DriverManager.getConnection(url,username,password);
    System.out.println("Connection established");
    conn.close();
    for this the errors what i'm getting are
    ---------- while running ----------
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at DB.main(DB.java:10)
    Output completed (0 sec consumed) - Normal Termination

    mr
    i dont no which driver ur using but i am using ur program in oracle driver.i think u give wrong username and password.my program sends to u,ok
    import java.sql.*;
    import java.util.*;
    class Db {
    public static void main(String[] args) throws Exception
    String driverClass="oracle.jdbc.driver.OracleDriver";
    String url="jdbc:oracle:thin:@localhost:1521:xe";
    String username="system";
    String password="tiger";
    Class.forName(driverClass);
    Connection conn=DriverManager.getConnection(url,username,password);
    System.out.println("Connection established");
    conn.close();
    }

  • Orcale 9i jdbc connection problem

    dear all
    i have one problem with jdbc by orcale when i connect to databae which has some error message by db connection? the driver and connect which is correct if i setup code and db in same machine , but if in diff mechine which indicte that
    java.sql.SQLException: IO error: The Network Adapter could not establish the conn
    ection

    Try this code:
    import java.sql.*;
      class TestJdbc {
       public static void main (String args [ ]) throws SQLException {
         DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
         Connection conn = DriverManager.getConnection
        ("jdbc:oracle:thin:@myHost:1521:ORCL","username", "password");
         Statement stmt = conn.createStatement ();
         ResultSet rset = stmt.executeQuery
            ("SELECT ename FROM emp");
         while (rset.next ())
            System.out.println (rset.getString ("ename"));
         rset.close();
         stmt.close();
         conn.close();
    }

  • Test JDBC connection problem

    Hi all,
    I got a very weird problem when I click Test Connection Button.
    I installed xml publisher Enterprise 5.6.2 in the server, I attempt to configure Jdbc connection in this server. once I click the Test Connection Button after I input all information, all information will be cleaned in this server, i can not get any message if the connection works well.But if i use url like http://serverIP:15101/xmlpserver/ to login xml publisher on other machine, I will get successful or error message.
    who has same experience in JDBC configuration?how to solve it ,thanks in advance.

    Apologies ... not really sure what the issue is. I assume you are talking about setting up the JDBC connection for a data source?
    In that case the entries would be something like:
    connection string: jdbc:oracle:thin:@host.company.com:1525:ora10g
    un: oe
    pw oe
    driver class: oracle.jdbc.driver.OracleDriver

Maybe you are looking for

  • Windows 8.1 with Adobe reader

         I am using windows 8.1 (64 bit) with adobe reader and cannot open and/or fill in pdfs, can only save them.....any help?

  • Page background image can't be seen by certain users

    hi! i'm using portal v3.0.9.8.3 and oracle db v8.1.7.0 i've created a page style with background image. I applied the page style to a page i created and assign some users to this default page. problem is only some users can see the page with backgrou

  • Communication channel monitoring, adapter monitoring error

    Hi , I am using SAP PI 7.0 with HP-UX. Here we have 6 logical hosts in one physical host. Physical host name is u2013 xyz Integration server name u2013 sappid The Central SLD: sappid URL for sappid: sappid: 50300 When I monitoring RWB---- >communicat

  • Playhead randomly JUMPS to the end of the timeline when "editing" during playback

    CS 6.0.1 OSX 10.7.4 I love the new feature in CS6 that lets you edit DURING playback, and playback won't stop. Brilliant. Now, I use this feature a lot making cuts as I go. I use the "command + shift + k" combo to make an edit to all tracks while the

  • Formula column in forms property

    Hi All I have a table SQL> desc sale_order_detail; Name                                      Null?    Type ID                                                 NUMBER PROD_ID                                            VARCHAR2(20) STYLE