Problem in connecting JSP with Oracle 9i.

Hi,
I am having problem in connecting JSP with Oracle 9i.
I am using windows XP and my JDK version is 1.4. For executing JSP I am using
"jakarta-tomcat-5.5.4-preconfigured". My database name is global.
I have set java_home, j2ee_home, oracle_home, path, classpath as follows:
j2ee_home=c:\sun\appserver
java_home=c:\sun\appserver\jdk
oracle_home=C:\oracle\ora92
path=C:\Sun\AppServer\bin;C:\Sun\AppServer\jdk\bin;C:\oracle\ora92\bin
classpath=C:\Sun\AppServer\lib\j2ee.jar;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\oracle\ora92\jdbc\lib\nls_charse
t12.zip
My code is as follows:
<%@ page language="java" %>
<%@ page import ="java.sql.*"%>
<%
try
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@global", "scott", "tiger");
catch(SQLException e)
out.println(""+e);
out.println("Connected");
%>
I tried other program:
<%@ page language="java" %>
<%@ page import ="java.sql.*"%>
<%
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:global","scott","tiger");
out.println("Connected");
%>
I am getting following error:
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 5 in the jsp file: /jsp/oracle.jsp
Generated servlet error:
oracle.jdbc.OracleDriver cannot be resolved or is not a type
     org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
     org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Thanking you in advance,
Anurag

maneesh108 wrote:
hi this is maneesh1) Read the thread it has been answered.
2) The thread is very old. Don't resurrect old threads.
I'm locking this zombie thread.
Kaj

Similar Messages

  • Problem in connecting netbeans with oracle 10g express edition

    hi friends... i need help in connecting the database with netbeans..... in netbeans, under services option... i have a option for database... but am not getting any drop-down while right clicking to add a new database... i tried in both netbeans6.9 and netbeans7... what should i do to connect netbeans7 to oracle 1og express edition.... pls help me friends.... pls do reply

    First of all, I think your dot... button is broken, it keeps repeating which makes it SO much harder to read your post.
    Secondly, I suggest you take your question to the Netbeans mailing lists. This is a Java programming forum, not a technical support forum for the hundreds of tools available to support Java programming.
    http://netbeans.org/community/lists/index.html

  • Problem In connecting Client with oracle

    hello all,
    I am trying to connect a system, with my oracle server, but the client machine is also having oracle installed on it. Is it possible to connect same machin with my oracle server. I am working on Oracle 8i.

    Except version incompatibility, any Oracle system can connect to any Oracle DB, any Oracle server can work as Client to another Oracle server.
    On the machine that works as Client you have only to configure a TNS alias to connect to the DB on the other machine.

  • 500 Internal Server Error while connecting JSP with Oracle

    Hello Friends,
    We Have installed Oracle Applications 11i in our orgaization which run on HP-UX 11.11 (HP Unix). I have created a JSP file in which I am trying to connect the database using OracleConnectionCacheImpl Class File in oracle.jdbc.pool directory. But it shows an error message as:
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    I have also installed Oracle HTTP Server on my personal machine at which this code runs perfectly only the error comes when i try to connect oracle from Oracle HTTP Server installed on our HP Unix Server.
    the path for pool package is:
    /appltest/apps/prodora/iAS/oem_webstage/oracle/jdbc/pool
    the location of JSP file is:
    /appltest/apps/prodcomn/portal/TEST_test/test
    What I think is I have to play with the CLASSPATh entries, but dont know how. Please help me in solving this issue...
    For your reference the JSP code is:
    <%@ page import="java.sql.*, javax.sql.*, oracle.jdbc.pool.*" %>
    <jsp:useBean id="ods" class="oracle.jdbc.pool.OracleConnectionCacheImpl" scope="session" />
    <%
    try
    ods.setURL("jdbc:oracle:thin:@test:1546:test");
    ods.setUser("kpm_hr");
    ods.setPassword("kpm_hr");
    Connection conn = ods.getConnection();
    Statement stmt = conn.createStatement();
    Resultset rset = stmt.executeQuery("select first_name,last_name from kpm_hr.kpm_hr_emp_mst where empcode='P0580'");
    rset.next();
    out.println(rset.getString(1)+" "+rset.getString(2);
    catch(SQLException e)
    out.println(e);
    } Thanks in adavnce,
    Ankur

    Just to verify, which relevant log files have you found?
    catch(SQLException e) {
    out.println(e);
    } Have you search the console log file?
    A quick observation reveals that your jsp is just a standalone java program executed inside jsp. Suppose you just run it as a standalone program. Any error then?
    Another way going forward is to install oc4j standalone of the same version. It is very easy to install: just download the oc4j-extended.zip and unzip it and run "java -jar oc4j.jar". Put you jsp inside j2ee/home/default-web-app and run. You should see relevant log messages in j2ee/home/log/server.log and j2ee/home/application-deployments/yourApp/application.log.
    You should have Jdeveloper of some appropriate version installed. If you have not, install one. It might be not a little bit high learning curve at first, but the rewards are quick and amazing, especially since jdev 10.1.3. (I am speaking from my experience.) Try it with Jdeveloper.

  • Urgent problem in connecting servlet and oracle

    Hi
    I have problem in connecting servlet with oracle.Kindly let me know what all the classes i should include in classpath to get connected.Where will i find the oracle driver.Kindly help me to do this.
    With regrds
    Vaiju

    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/index.html
    http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/toc.htm
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/index.html

  • Unable to connect forms6i with oracle 10g

    hi:
    i am facing a problem to connect forms6i with oracle 10.2 g. i already make a entry in TNSNAMES.ora file in forms folder.
    while i am trying to connect it dispaly "ORA-12203: TNS:unable to conect to destination" error.
    please help. Thanks in advance.
    Regards,
    Abhishek

    Hi
    i already make a entry in TNSNAMES.ora Another option...
    1. Pls Verify that the net service name you entered was correct including no spaces.
    2.Verify that the ADDRESS portion of the connect descriptor which corresponds to the net service name is correct.
    3.Ensure that the destination process (for example the listener) is running at the remote node and the cabel of ur local net work connecting to ur server is well connected and working well.
    4. Test ur local network cabel and try to make the connection to another computer set.
    5.u can check from Start > control panel > administrative tools > services that the service name is started or not if it is Started Restarted or refresh it.
    6. Ensure that the listener is running at the remote node and that the ADDRESS parameters specified in TNSNAMES.ORA are correct.
    and the more ....
    Hope this helps...
    Regards,
    Abdetu...

  • Error in connecting webdynpro with oracle

    Hi
          while connecting webdynpro with oracle, i am getting this type of error. I imported the classes12.jar file also.
    <b>Error:</b>
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    The <b>coding</b> which i used to connect is as follows,
    Class.forName("oracle.jdbc.driver.OracleDriver");
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection(
              "jdbc:oracle:thin:@entegdt36:1521:dbserver",
              "scott","tiger");
              pst=conn.prepareStatement("select * from Test");
              rs=pst.executeQuery();
              while(rs.next())
                   res=res+rs.getString(1);
                   wdThis.wdGetContext().currentContextElement().setName(res);
    Please help me to solve this problem.
    It's very urgent.
    Thanks in advance.

    Hi,
    Go to technical landscapes and create a technical landscape for your ECC backend system.
    This should solve the problem.
    Regards
    Bharathwaj.

  • How to connect java with oracle

    can any body show me the code of how to connect java with oracle database.
    thank you

    To configure Oracle JDBC:
    1. Add Oracle JDBC JAR file classes12.zip or ojdbc14.zip to classpath.
    2. Load and register the JDBC driver.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    3. Obtain a connection:
    String url="jdbc:oracle:thin:@<host>:1521:<database>
    Connection con = DriverManager.getConnection(url,
    "myLogin", "myPassword");
    4. Create a SQL statement.
    Statement stmt = con.createStatement();
    5. Obtain a result set.
    ResultSet rs = stmt.executeQuery(
    "SELECT ...");

  • How connect BI with Oracle DB

    Hi gurus,
    I have a BI system in Iseries(DB4), I tried connect BI to Oracle Database with UD connect, I followed the UD conect GUIDE for BW 3.5, I used JDBC Driver Ojdbc6.jar.
    I have a issue with the test JDBC connector.
    http://<myserverBI>:50000/TestJDBC_Web/TestJDBCPage.jsp
    I get the error
    java.lang.UnsupportedClassVersionError: (oracle/jdbc/driver/OracleDriver) bad major version at offset=6
    Exception id: [42003C008197020B0000000000001995000495444B967B67]
    Thanks
    William Neira

    Environment:
    Our BI version is 7.01 , OS is iseries.
    The target Oracle DB version is 11g(11.2.0.1.0, 64bits on AIX).
    Configuration procedure :
    1. Import Oracle driver "ojdbc6.jar" and create new driver which named "Oracle " under
    JDBC Connector ->Runtime ->Driver in Visual Admin.
    2. Jco RFC BI_J2EE and RFC TCP in SM59, the connection test is OK.
    3. Connector container-> resource adapter ->add
    library:ORACLE
    4. Connector container-> Managed connection Factory -> Properties
    DriverName: oracle.jdbc.OracleDriver
    Password: ****
    User:SIEC
    URL:  jdbc:oracle:[email protected]:1522:SIEC
    the error persist
      java.lang.UnsupportedClassVersionError: (oracle/jdbc/driver/OracleDriver) bad major version at offset=6
    Exception id: [42003C00819702E10000001A000019950004954808C45F78]
    Thanks.
    William Neira

  • 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?

  • Installation Problem in SAPNW7.0 with Oracle on RHEL5.4

    Hi Everyone,
            I am installing SAP NETWEAVER7.0 SR3 with ORACLE 10.2.0.4 on RHEL5.4 Operating System. I have installed the java
    and i have install the ORACLE 10.2.0.4 Successfully. I set the environment variable in vi .bash_profile and i set the kernal parameters with their values in vi /etc/sysctl.conf file then run the command sysctl -p. Later i run the ./sapinst script the cd /NW7.0/
    BS_Installation Master_2005/ IM_LINUX_x86_64. It went fine up to the 24th phase. At the 24th phase "start instance" i got the error.
    The error message is
    " ERROR 2010-10-10 12:03:03.542
    CJS-20022  Could not start instance 'DVEBMGS00' of SAP system QAS"
    I did try my level best to resolve it. Can any one tell me what could be the issue and how to resolve it.
    Thanks

    startdb.log
    Sun Oct 10 16:45:11 IST 2010
    LOGFILE FOR STARTING ORACLE
    Trying to start QAS database ...
    Sun Oct 10 16:45:11 IST 2010
    checking required environment variables
    ORACLE_HOME  is >/oracle/QAS/102_64<
    ORACLE_SID   is >QAS<
    Sun Oct 10 16:45:11 IST 2010
    check initora
    Sun Oct 10 16:45:11 IST 2010
    check initora
    Sun Oct 10 16:45:11 IST 2010
    checking V2 connect
    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 10-OCT-2010 16:45:11
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    /usr/sap/QAS/SYS/profile/oracle/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = SAP.WORLD) (PROTOCOL = TCP) (HOST = quality) (PORT = 1527))) (CONNECT_DATA = (SID = QAS) (GLOBAL_NAME = QAS.WORLD)))
    OK (10 msec)
    tnsping: V2 connect to QAS
    Sun Oct 10 16:45:11 IST 2010
    Connect to the database to check the database state:
    R3trans: connect check finished with return code: 12
    Database not available
    Sun Oct 10 16:45:11 IST 2010
    Shutdown database
    First trying to shutdown the database - May be,
    the database is in the nomount or mount state
    Sun Oct 10 16:45:12 IST 2010
    starting database
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Oct 10 16:45:12 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    ERROR:
    ORA-09925: Unable to create audit trail file
    Linux-x86_64 Error: 13: Permission denied

  • Upload file in JSP with Oracle Database 10gR2

    How to upload file with oracle database 10gR2??
    i can't find how to upload..
    i've tried to create a procedure in oracle and execute in netbeans but the file save in directory and then from directory save to database.
    it means the file save in 2 location, in directory and database..
    does anybody know how to save file direct from the JSP file into database without save in directory?
    this is the procedure..
    create or replace PROCEDURE load_file (
    p_id number,
    p_photo_name in varchar2) IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename('DIR_TEMP', p_photo_name);
    -- insert a NULL record to lock
    INSERT INTO temp_photo
    *(id, photo_name, photo)*
    VALUES
    *(p_id , p_photo_name ,EMPTY_BLOB())*
    RETURNING photo INTO dst_file;
    -- lock record
    SELECT photo
    INTO dst_file
    FROM temp_photo
    WHERE id = p_id
    AND photo_name = p_photo_name
    FOR UPDATE;
    -- open the file
    dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
    -- determine length
    lgh_file := dbms_lob.getlength(src_file);
    -- read the file
    dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
    -- update the blob field
    UPDATE temp_photo
    SET photo = dst_file
    WHERE id = p_id
    AND photo_name = p_photo_name;
    -- close file
    dbms_lob.fileclose(src_file);
    END load_file;

    Well your Oracle procedure is designed to load a file, so that's what it does. If you want it to load from a data stream such as an upload, you need to rewrite it accordingly.
    So far this is not a Java question at all.

  • Facing problem while connecting N70 with bluetooth

    I am connecting N70 with my laptop thru bluetooth. But im facing a error msg saying that hardware problem with MODEM.
    do i need to install Modem & if so which one suitable.
    all others application working thru bluetooth expect net connection.
    description:
    Window XP
    Nokia PC suite letest one
    thru blutooth.
    plz suggest. Thanks

    When one installed pcsuites successfully it installed all drivers including the modem, the reasons why it takes sometimes when one is prompted to connect the cable.
    Try to uninstall pcsuite again & run the pcsuites cleaner afterwards then re-install pcsuite. Don't connect the cable until told to so & check. If it does fail again, make a backup & format your phone; is the firmware of your N70 the latest one?
    Knowledge not shared is knowledge wasted!
    If you find it helpfull, it's not hard to click the STAR..

  • Connectivity issue with Oracle Source

    Hi,
    Am trying to run a SSIS package to pull data from Oracle. Package was running fine from BIDS.But when i run the job from Sql Agent am getting the below error.Can you please help me on this.Am using 2012 version of SSIS
    Message
    Executed as user: ABCDEF\SQLDEV015. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.5548.0 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  9:32:29 PM  Error: 2014-12-22 21:32:31.32
        Code: 0x000002BD     Source: Package4 Connection manager "ORACLE"     Description: Oracle Home not found.  End Error  Error: 2014-12-22 21:32:31.32     Code: 0x0000020F     Source: Connect
    to ORACLE Oracle Source [2]     Description: The AcquireConnection method call to the connection manager ORACLE failed with error code 0x80004005.  There may be error messages posted before this with more information on why the AcquireConnection
    method call failed.  End Error  Error: 2014-12-22 21:32:31.32     Code: 0xC0047017     Source: Connect to ORACLE SSIS.Pipeline     Description: Oracle Source failed validation and returned error code 0x80004005.  End
    Error  Error: 2014-12-22 21:32:31.32     Code: 0xC004700C     Source: Connect to ORACLE SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2014-12-22 21:32:31.32    
    Code: 0xC0024107     Source: Connect to ORACLE      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  9:32:29 PM  Finished:
    9:32:31 PM  Elapsed:  1.422 seconds.  The package execution failed.  The step failed.

    Hi SSDL,
    According to the error message, the issue is that the user cannot connect to the Oracle server. To fix this issue, please refer to the following suggestions:
    Verify the Oracle server is installed on the server that the connection string indicates. It means that verify the connection string is incorrect.
    Does the user that runs the package the correct
    authorization?
    Check if the SQL Agent job step that runs this package is set to run it in 32 bit mode.
    The following two similar threads are for your references:
    http://stackoverflow.com/questions/26790105/ssis-package-fails-in-sql-server-agent-but-not-in-visual-studio-odbc-connectio
    http://www.attunity.com/forums/microsoft-ssis-oracle-connector/issues-pulling-data-oracle-package-fails-1472.html
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Problems using SQL*Loader with Oracle SQL Developer

    I have been using TOAD and able to import large (milllions of rows of data) in various file formats into a table in an Oracle database. My company recently decided not to renew any more TOAD licenses and go with Oracle SQL Developer. The Oracle database is on a corporate server and I access the database via Oracle client locally on my machine. Oracle SQL Developer and TOAD are local on my desktop and connected through TNSnames using the Windows XP platform. I have no issues with using SQL*Loader via the import wizard in TOAD to import the data in these large files into an Oracle table and producing a log file. Loading the same files via SQL*Loader in SQL Developer, freezes up my machine and I cannot get it to produce a log file. Please help!

    I am using SQL Developer version 3.0.04. Yes, I have tried it with a smaller file with no success. What is odd is that the log file is not even created. What is created is a .bat file a control file and a .sh file but no log file. The steps that I take:
    1.Right click on the table I want to import to or go to actions
    2. Import Data
    3. Find file to import
    4. Data Preview - All fields entered according to file
    5. Import Method - SQL Loader utility
    6. Column Definitions - Mapped
    7. Options - Directory of files set
    8. Finish
    With the above steps I was not able to import 255 rows of data. No log file was produced so I don't know why it is failing.
    thanks.
    Edited by: user3261987 on Apr 16, 2012 1:23 PM

Maybe you are looking for

  • Printing concerning an older HP LaserJet 5000.

    We're a design studio with 4 Mac's and have this HP printer for a longtime and love it. A real work horse and low maintenance. Two of our cpu's are running Mavericks, 2 are running 10.7.5 and the older one is still running 10.5.8. This older 10.5.8 c

  • How do I get back features from older Firefox versions?

    Some features of older version FF are gone from FF 4.0. 3 I particularly miss: (1) Percentage bar in upper left corner page of Inbox messages. GONE! (2) I could click on arrow on right side panel (annoying ads) and hide said panel and widen my Inbox

  • The located assembly's manifest definition with name 'openfoundation' does not match the assembly re

    Ok. been working on this for the better part of a day. I am having trouble with the .net web controls. trying to create a simple portlet that populates a text box with values from a 2nd text box when a button is selected. both text boxes are in the s

  • How to use ADD value in the form field

    Hi all, I want to add +44 code infront of the Tele no field. How could wei achieve this?.. with regards prabu

  • Po release issue

    Dear all I create new release procedure for purchase order .but after all release, when PO is released if I make some changes in PO system cannot block it for release again, I want it should be. Pls suggest how can I configure it?