I want to connect a DataBase(oracle) through Tomcat5.

i want to connect a DataBase(oracle) through Tomcat5.
pls tell me the steps how can i do this .or pls give me any link
thanks previously

The bottom line is. If you can't figure this part out on your own then you have no business doing any JDBC programming anyway. Think of it as a minimal competency test to make sure it's safe for you to proceed. It isn't safe yet.

Similar Messages

  • I want to connect two database in Oracle

    Dear All
    I want to connect two database in Oracle ver-10.2.0.1.0 ,And fetch data from 2nd table.
    OS - XP Pro.
    Regards,
    Parwez

    Configure remote DB in TNS first.
    Create DB link.
    CREATE {PUBLIC} DATABASE LINK "DBLINKNAME"  CONNECT TO "remoteuser" IDENTIFIED BY "remotepwd" USING 'REMOTEDBTNSALIAS';Query remote tables using
    select * from remotetable@DBLINKNAME;

  • Please help, probleme de connection to database oracle and  java

    Ihave a problem to make connection to database Oracle when I use a simple code of java
    ======================
    import java.sql.*;
    public class Exemple1 {
    public static void main (String args[]) {
    Statement stmt = null;
    Connection con=null;
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:GB","scott","tiger");
    catch (Exception e) { System.out.println(e);        }
    =================
    I have :
    * Linux (Fedora core3).
    * Oracle 10g
    My var. environ.:
    * ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1
    * PATH=$ORACLE_HOME/bin
    * CLASSPATH=$ORACLE_HOME/jdbc/lib/ojdbc14.jar
    the error is:
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: oracle.sql.CharacterSet
    at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
    at JvResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
    at oracle.jdbc.driver.DBConversion.DBConversion(short, short, short) (Unknown Source)
    at oracle.jdbc.driver.T4CConnection.connect(java.lang.String, java.util.Properties) (Unknown Source)
    at oracle.jdbc.driver.T4CConnection.logon() (Unknown Source)
    I don't know what's heppen exactly?

    If
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    is replaced
    with
    Class.forName("oracle.jdbc.driver.OracleDriver");does the java.lang.NoClassDefFoundError: while resolving class: oracle.sql.CharacterSet get generated?

  • I Want to connect to database . plz help

    dear programmers
    i use forms9i and oracle database 9i under winxp. the database is on the local machine .
    to connect database from the form i do the following:
    1-choose file | connect from the main menue
    2-type scott/tiger then click on connect
    the following message appear
    ORA-12560 TNS :protocol adapter error.
    please i urgently need to connect to database
    please help

    dear Pamela Gamer
    I really thank u for helping me .
    I did the following :
    1- from Start menu,I select Programs > Oracle9i Developer Suite > Forms Developer > Start OC4J Instance. I waited till the window displays a message that OC4J has been initialized, and I minimized the window,and i did not close it.
    2-I opened my form and connected my database successfuly.
    3- when i started to run my form the same message appeared ( frm-10142: the http listener is not running on 127.0.0.1 at port 8888 . please start the listener or check your runtime perference)
    i do not know why it appeared again .i want to know what is the problem . in fact i hardly need to shift to forms9i, but this problem makes me disapointed.
    if you know the solution , please help me
    thank u again for helping me
    tarek

  • Connect between database oracle and jdeveloper

    i want a simple example to connct database oracle and jdeveloper
    to insert record or update or delete or query

    The easy way: http://www.oracle.com/technology/obe/obe1013jdev/10131/masterdetail_adf_bc/master-detail_pagewith_adf_bc.htm
    Or if you want to hand code JDBC then:
    http://www.oracle.com/pls/db111/to_toc?pathname=appdev.111%2Fb28765%2Ftoc.htm&remark=portal+%28Books%29

  • [b]How can i connect with database(oracle 9i) from form developer at runtim

    Hi Friends,
    My problem is as follows, please show me a way.
    Let's asume, I have form (developed in 6i) which has database data block. Now, at form level a have assigned on_logon trigger and I have written the following PL/SQL statement in that trigger:
    begin
    null;
    end;
    So, when I run this form without connecting to database It does not prompt for a connection. Now I have button lebeled as "Connect" in this form, when user will click on it it will display a window having text boxes to enter user name, password and database name; once the user fill those text boxes and click on a button lebeled as "Ok" then the form runtime environment should be connected with database as per information provided by user. Here to mention that the user already been created, only the connection will be stablished. For example: I want to connect the form with database as "scott/tiger@oradata9i".
    To do this, what PL/SQL command statement should i write in that "OK" button's "when_button_pressed" trigger?
    If any of you know about this please help me.

    Hi
    I've answered this question already. If I understand you right, you can use 'LOGON' built-in of Forms. Take a look into documentation.

  • Connect Ingres from Oracle through tg4ingr

    Hi, when I perform a query to a table in Ingres from sqlplus I receive the next error:
    SQL> select * from paises@ingres;
    select * from paises@ingres
    ERROR at line 1:
    ORA-02068: following severe error from INGRES
    ORA-28511: lost RPC connection to heterogeneous remote agent using SID=%s
    ORA-28509: unable to establish a connection to non-Oracle system
    my tnsnames.ora:
    # TNSNAMES.ORA Network Configuration File: /software/oracle/product/9.2.0.1.0/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    INGRES.SIGMAAIE.ORG =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sunsig5)(PORT = 1521))
    (CONNECT_DATA =
    (SID = ingres)
    (HS = OK)
    my listener.ora:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sunsig5)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = ingres)
    (ORACLE_HOME = /software/oracle/product/9.2.0.1.0)
    (PROGRAM = tg4ingr)
    (ENVS = LD_LIBRARY_PATH = /dbms/Ingres26/ingres/lib:/software/oracle/product/9.2.0.1.0/lib)
    my initingres.ora ($ORACLE_HOME/tg4ingr/admin):
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Transparent Gateway for INGRES
    # HS init parameters
    HS_FDS_CONNECT_INFO=sigma::sigmatest
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_INGRES_MODE=INGR
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    # Environment variables required for the non-Oracle system
    set II_SYSTEM=/dbms/Ingres26
    I created the database link using:
    SQL> create public database link ingres connecto to "user1" identified by "passwd" using 'ingres';
    Any idea why Am I receiving this error?
    Thank you in advance.

    It could be that the SID and SID_NAME is wrong.
    Check SID=tg4ingr and SID_NAME=tg4ingr instead of SID=ingres

  • How to access Portal Database ( ORACLE) through webdynpro  java

    Hello experts,
    I  want to <b>access portal database tables</b> ( WCR_USERSTAT,WCR_WEBCONTENTSTAT,WCR_USERFIRSTLOGON )<b> using</b> <b>webdynpro  java</b> application/service . Our portal DB is Oracle , so please tail me some solution for this asap. I had tried using   <u>Portal Activity Report</u> iViews  but that no fulfill  our requirment.
    Regads,
    Laxmi..

    Hi,
    You can use the following link which will help you to resolve the problem:
    /thread/100181 [original link is broken]
    thanks & regards,
    Manoj

  • Log unsuccessful attemps connecting to database+Oracle error

    Hi,
    I've a simple trigger to log all user's unsuccessful attempts to connect to a database for the oracle error:ora-1017( invalid username/password when trying to login)
    CREATE TABLE connection_audit (
    login_date DATE,
    username VARCHAR2(30));
    -- trigger to trap unsuccessful logons
    CREATE OR REPLACE TRIGGER T_LOGON_FAILURES
    AFTER SERVERERROR
    ON DATABASE
    BEGIN
    IF (IS_SERVERERROR(1017)) THEN
    INSERT INTO connection_audit
    (login_date, username)
    VALUES
    (SYSDATE, 'ORA-1017');
    END IF;
    END T_LOGON_FAILURES;
    Now, I would've to log the unsuccessful attempts due to whatever Oracle error, along with the oracle error.
    Can someone help me with the code changes?
    Thanks,
    Bhagat

    I've created a trigger which inserts a record into table SERVERERROR_LOG for
    every server error.
    CREATE OR REPLACE TRIGGER T_LOG_SERVER_ERRORS
    AFTER SERVERERROR ON DATABASE
    ** Purpose: T_LOG_SERVER_ERRORS TRIGGER -- THE SERVERERROR TRIGGER TAKES EVERY SERVER ERROR GENERATED
    ** FROM ORACLE PL/SQL AND PLACES IT INTO AN ORACLE TABLE.
    ** BY CAPTURING THE USER ID AND THE TIME OF THE ERROR, THE ORACLE ADMINISTRATOR WOULD BE
    ** IMMEDIATELY BE NOTIFIED VIA E-MAIL WHENEVER A SERVER ERROR OCCURS.
    DECLARE
    ls_user varchar2(30);
    ls_osuser varchar2(30);
    ls_machine varchar2(64);
    ls_process varchar2(9);
    ls_program varchar2(48);
    BEGIN
    SELECT username,osuser,machine,process,program
    INTO ls_user,ls_osuser,ls_machine,ls_process,ls_program
    FROM V$SESSION
    WHERE audsid=userenv('sessionid');
    INSERT INTO SERVERERROR_LOG
    VALUES(
    dbms_standard.server_error(1),
    localtimestamp,
    ls_user,
    ls_osuser,
    ls_machine,
    ls_process,
    ls_program);
    END;
    And My procedure below queries the table and notifies the Oracle Admin by
    E-mail for every server error.(P_NOTIFY_SERVER_ERR is the procedure which does the job of sending mail to Admin).
    PROCEDURE P_SERVER_ERRORS
    AS
    ** Purpose: PROCEDURE FOR CHECK FOR SERVER ERRORS .
    ** INVOKE THE PROCEDURE P_NOTIFY_SERVER_ERR,WHICH NOTIFIES THE ORACLE ADMIN
    ** EVERYTIME SERVER ERROR OCCURS.
    CURSOR C_SERVERERROR_LOG
    IS
    SELECT * FROM SERVERERROR_LOG;
    BEGIN
    FOR lc_servererror_log IN c_servererror_log
    LOOP
    P_NOTIFY_SERVER_ERR(lc_servererror_log.error,
    lc_servererror_log.error_dt_time,
    lc_servererror_log.username,
    lc_servererror_log.osuser,
    lc_servererror_log.machine,
    lc_servererror_log.process,
    lc_servererror_log.program);
    END LOOP;
    END P_SERVER_ERRORS;
    An Oracle job executes procedure P_SERVER_ERRORS once every 5 minutes.
    Thanks every one for your valuable suggestion.
    Cheers!!!!
    Regards,
    Bhagat

  • 1016: Could not connect to database - Oracle returned ORA-00257: archiver e

    Dear buddies,
    Receiving the above stated error.
    Removed my old arch files to a different drive and now still getting the error.
    How can I go about this.
    Please advice.
    Thanks!
    Note: I am using Oracle 10g on a Windows platform
    Edited by: user645399 on Jul 26, 2012 6:36 PM

    After 1000+ posts you must understand that 10g is not a version number but a marketing label. This is what the error message says,
    ORA-00257: archiver error. Connect internal only, until freed.
    Cause: The archiver process received an error while trying to archive a redo log. If the problem is not resolved soon, the database will stop executing transactions. The most likely cause of this message is the destination device is out of space to store the redo log file.
    Action: Check the archiver trace file for a detailed description of the problem. Also, verify that the device specified in the initialization parameter archive_log_dest is set up properly for archiving.If you have merely deleted the files using the o/s command, it won't update the Control File that those files are not available any more and the space mapped by them must be released. So you must use the RMAN's command crosscheck to confirm the deletion and mark the file's status as expired and then you would have to issue delete expired . Other than this, the only option would be to add more space to the destination where you are storing the archive logs.
    HTH
    Aman....

  • How to connect access database through oracle sql prompt

    i want to connect access database via oracle , i am trying to import all the data in Access table into oracle table how it is possible .
    A.R

    The simplest way, if You have already created tables in Oracle DB, is to open the Access MDB, link Oracle tables via ODBC and build a query to append rows reading from Access tables to Oracle tables.
    Hope this helps
    Max

  • Urgent : Hoe to connect to a ORACLE database throught WEBDYNPRO JAVA

    HI All
    i am very new to Developer Studio,
    i want to connect to an oracle database through wedynpro java.
    i have seen some tutorials on SDN. i know something about adding external JARs and OJDBC .
    Can anyone send me the sample code to connect to a database
    <b>very urgent</b>
    Thanks in advance
    Sushma

    Hi Sushma
    Ask your system Admin for servername,portnumber of database server
    Connection conn=null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn =DriverManager.getConnection ("jdbc:oracle:thin:@<servername>:<portnumber>:DB","uname", "pwd");
    Statement stmt=conn.createStatement();
    ResultSet rs=stmt.executeQuery("select * from <tablename>"); // select statment
    while(rs.next())
    IXXElement nodeConnection=wdContext.createXXElement(); //creating a node to store the data from oracle
    nodeConnection.setYY(rs.getInt("YY")); // setting the values into input fields
    nodeConnection.setAA(rs.getInt("AA"));
    nodeConnection.setBB(rs.getInt("BB"));
    wdContext.nodeXX().addElement(nodeConnection); // adding the node
    catch(Exception ex)
    finally
    try
    conn.close(); // closing the connection
    catch(Exception e)
    welcome to SDN and All the best from SDN Webdynpro JAVA
    Regards
    Chaitanya.A

  • How to connect 10g database through Enterprise manager???

    Hi All,
    I want to connect the database through Enterprise manager.
    My database is on 10g. Version is 10.1
    Please tell me the procedure to connect the database through E.M.
    Thanks and Regards,
    Prathamesh.

    Are you thinking of the Enterprise Manager supplied with Oracle9i? If yes - it doesn't work quite that way ... and the 9i java OEM is not compatible.
    Use the enterprise manager supplied with the 10g database, called the dbconsole (look for a service or start it using 'emctl start dbconsole') and access it using http://{localhost}:5500/em
    If that doesn't satisfy you, load the updated version of the OEM 9i java standalone from the 10g client disk.

  • No connection to an oracle database

    Hello
    I have installed database Rel. 2. JDevelopper 9.0.3.2 with BI Beans 9.0.3.6.
    Additionally I installed the warehouse builder 9.2.0.2.8.
    After I created a repository, a runtime repository and a target schema, I wanted to connect to my Oracle Database. But in the second window when you create a connector I can't choose a database. I can only mark unspecified...
    Does anybody know why???
    Damian

    Yes I tried to use OWB.
    I looked at OTN Documentation
    (Oracle9i Warehouse Builder Installation and Configuration Guide)
    So I installed OWB Design Time with the Installer, then I
    installed the Design Repository using the Repository
    Assistant. In addition I performed the OWB Server Side installation using Oracle Universal Installer. Then I installed a Runtime Repository, a Runtime Access User and a Warehouse Builder Target Schema.
    After this installation I started the OWB Client and connected as Repository User. I received the make a ODBC Connection. But I want also make a connection to my local oracle database within a connector...
    Now in this Printscreen (http://home.datacomm.ch/crettaz/printscreen.jpg) I can't choose my database. I have do configure more things?

  • Connecting to database through jsp

    i want to connect to database through jsp actually my requirement is i want to populate data in one list box in accordance with the selected option in another list box this must done in the same jsp and i must manupulate every thing java script can i found any solution to this with example

    just write ur code in scriplets if it is jdbc code & if it is html then write it out side scriplet.

Maybe you are looking for

  • Open module for managing property file and environment variables

    Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProper

  • NEW FOLDER, for word processing, like Page and others?

    We're with a new IMac & iWork. We want to start a folder for docs if not also templates. It is for a word processing folder under Page, iWork and new Mac OSX.

  • Call core function/constructor by its String name

    Hi, I worked out a way to call a function whose name is in a String variable. That is: function myFunction()      trace("Hello!"); var callFunction:String = "myFunction"; this[callFunction]();     // "Hello!" However, this does not work with "core" f

  • Urgent: The C++ class generator won't work

    Hi, I use Windows2000, and I downloaded xdk_cpp_9_0_1_0_0.zip and set the environment as ORA_NLS33 to D:\Oracle\nlsdata ORACLE_HOME to D:\Oracle ORA_XML_MESG to D:\Oracle\xdk\mesg using control panel for setting user envoronment variables. I didn't f

  • How to cascade page skins throughout page groups ...

    Is there a way to apply the same HTML Page Skin throughout all the pages within a page group without having to apply it to each page individually? Is there a way to do this programmatically?