Tomcat 5.5.20 / Oracle  JDBC connection error

Hi All,
I am using Eclipse 3.2/ Tomcat 5.5.20/ Oracle 8i
Inside my java class; right after finding the context, it gives error on line:
conn = dataSource.getConnection();
my server.xml <Resource> settings are proper within one tag...
I am loosing my hair faster... please someone help me..
Error Stack:
javax.servlet.ServletException
     org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
     org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
     org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
     org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
     com.nibtt.beans.ConnectionBean.getConnection(ConnectionBean.java:80)
     com.nibtt.actions.LoginAction.execute(LoginAction.java:44)
     org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
     org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
     org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Regards
Hepzi

Hi Zadok,
I am going insane. Thank God you replied. I am pasting my code here.
I have setup Tomcat5.5.20 <resource> tag as follows: for connection pooling
<Resource      name="jdbc/TestStrutsDB" auth="Container"
          type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory"
          username="SCOTT" password="TIGER"
          driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@111.1.1.1:1521:TEST"
          maxActive="8" maxIdle="4"/>
my application web.xml code:
<resource-ref>
<description>Oracle DB Connection</description>
<res-ref-name>jdbc/TestStrutsDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
my java code:
public Connection getConnection() throws Exception{
          Context ctx = new InitialContext();
Context envContext = (Context)ctx.lookup("java:/comp/env");
javax.sql.DataSource dataSource = null;
     ResultSet rst = null;
     Statement stmt = null;
     try {
          if(envContext == null ) {
     System.out.println( "context is NULL");
          } else
     System.out.println( "context is NOT NULL");
dataSource = (javax.sql.DataSource)envContext.lookup("jdbc/TestStrutsDB");
          if (dataSource != null) {
               System.out.println( "before actual connection to database: "+dataSource.toString() );
               try {
                    conn = dataSource.getConnection();
               } catch (Exception connEx) {
                    System.out.println( connEx.getStackTrace());
          if(conn != null) {
     System.out.println( "Got Connection "+conn.toString());
     stmt=conn.createStatement();
     rst=stmt.executeQuery("select username from testTomcat");
     while(rst.next()){
          System.out.println("User Name is: " + rst.getString("username"));
     rst.close();
     rst = null;
     stmt.close();
stmt = null;
conn.close();
     conn = null;
     // do what you wish with Connection
     } catch (SQLException e) {
          while((e = e.getNextException()) != null) {
                    System.out.println("SQLException: " + e.getMessage());
                    System.out.println("SQLState: " + e.getSQLState());
                    System.out.println("VendorError: " + e.getErrorCode());
                    System.out.println(e.getStackTrace());
     } finally {
     try {
     conn.close();
     } catch (SQLException ex) {
          System.out.println(ex.getStackTrace());
          return conn;
     } //End of Connection function
Please let me know if had gone wrong somewhere
Thanks in advance
Regards
Hepzi

Similar Messages

  • Oracle JDBC Connection Error code 12505 in J2EE

    Hi All,
    I'm in a great problem.Could not connect my J2EE server to my Oracle database server.
    My config/resource.properties file as follows
    ================================
    jdbcDataSource.5.name=jdbc/iisdb
    jdbcDataSource.5.url=jdbc:oracle:thin:@128.51.12.33:15 21:iisals.rsapps;create=true
    jdbcDriver.1.name=oracle.jdbc.driver.OracleDriver
    My config/default.properties file as follows
    ================================
    jdbcDatasources=jdbc/iisdb|jdbc:oracle:thin:@128.51.12.33:1521:iisals.rsapps
    Deployment is successful but while running the application through browser the error is as follows
    =======================================
    javax.ejb.CreateException: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    which is for either SID identification problem or TCP/IP
    port problem.
    But from my PC the same database can be connected through sql plus.
    So I am n't getting where is the problem ??????
    Whether any properties file has to be changed ???
    Can anyone help me in this regards,

    Hai everybody,
    I do have the same problem. I am trying to connet to the oracle8.1.7 database in linux machine from windows98. I am able to connect to the database thro' sqlplus, but when i try to connect using JDBC i am getting the follg error :
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNU
    M=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    can any one rectify this problem. I checked even java.policy file. Everything seems to be ok.
    Thx & regards
    jagan

  • Oracle JDBC Connection Error ?

    Hi all .. i have JDeveloper9.0 and oracle database i have created the following page (which is the first !) to test the connection to oracle database,
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@ page import="java.sql.*"%>
    <%@ page import="oracle.jdbc.driver.*"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <%
    out.println("good things comes for the ones whos wait");
    // testing Database Connection
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.0.24.23:1513:test","ap1s","ap1s");
    Statement st = conn.createStatement();
         ResultSet rs= st.executeQuery("select * from XX_CNSLTNT");
         while(rs.next())
    System.out.println(rs.getString(1));
    %>
    <form method="POST" action="untitled1.jsp">
    <p>
    <input type="text" name="T1" size="20">
    <input type="submit" value="Submit" name="B1">
    <input type="reset" value="Reset" name="B2">
    </p>
    </form>
    </BODY>
    </HTML>
    and its generating me this error, when i compile :
    Error: cannot access directory oracle\jdbc\driver; verify that directory is reachable from classpath and/or sourcepath
    so, does any one have a clue of the problem is ??
    thanx in advance

    Is ojdbc14.jar or classes12.jar in the Classpath?

  • ADF: Gracefully handling JDBC connection errors?  Part II

    Hi gang
    I while back I posted a forum post to find a solution to "display a specific web page when the JDBC connection drops out on our ADF application, specifically the following error: oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection"
    ...you can see the original post here:
    Re: ADF: Gracefully handling JDBC connection errors?
    For the life of me I can't get this to work now. It appears I can't redirect to another page during the call to reportException. I've had a play with different methods of redirecting, as seen in the following code sample:
    public class ErrorHandlerImpl extends DCErrorHandlerImpl {
      public ErrorHandlerImpl() {
        super(true);
      @Override
      public void reportException(DCBindingContainer dCBindingContainer, Exception exception) {
    //    try {
          String message = exception.getMessage();
          if (message.indexOf("JBO-26061") >= 0) {
            // Method 1
            FacesContext fc = FacesContext.getCurrentInstance();
            UIViewRoot viewRoot =
            fc.getApplication().getViewHandler().createView(fc, "faces/errorPage.jspx");
            fc.setViewRoot(viewRoot);
            fc.renderResponse();
            // Method 2              
            // FacesContext fc = FacesContext.getCurrentInstance();
            // fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "goError");
            // fc.responseComplete();
            // Method 3 - required IOExcepition handler
            // FacesContext.getCurrentInstance().getExternalContext().redirect("faces/errorPage.jspx");
          } else
              super.reportException(dCBindingContainer, exception);
    //    } catch (IOException e) {
    }... with no success.
    Has anyobody any other solutions or advice on getting this to work?
    Your help appreciated.
    Thanks & regads,
    CM.
    PS. JDev 11gR1 ADF BC + ADF Faces RC

    Hi Frank
    Yep, I' tried redirect, that was method 3 (you can see all 3 methods I've attempted, last 2 are commented out).
    With the declarative ADFc exception handler, problem is it's a catch all, not specifically for JBO-26061. Can you think of a way I can tailor fit it for JBO-26061 with a custom message "Database down"?
    In addition the exception handler is not consistently called. As example, if you're moving between pages rather than operating on 1 page, the standard af:messages error dialog is shown if the db connection has been dropped, rather than navigating to the exception handler page. As such it seems the DCErrorHandlerImpl.reportExceptions is the better chokepoint to work from.
    Cheers,
    CM.

  • Configure JDBC connection ERROR: no ocijdbc9 in java.library.path

    ERROR: no ocijdbc9 in java.library.path
    step 6 is where I need help!? thanx.
    When configuring a database connection, I chose
    1. Oracle JDBC (connection type)
    2. Authentication (username/password of my D2K repository)
    3. Driver: oci8
    4. Hostname: pmurphy1 (my local machine where my db is)
    5. Port: 1521 default (odbc works on this)
    * 6. Enter custom JDBC url (? please help ?) left blank!!
    I really wanna get started with this cool toy!!!
    Cheers,
    Paully

    I am assuming you are using JDeveloper 3.2x
    Please see the online help for additional details.
    Search help for "JDBC Connection Properties" - With the
    quotations and you will find a page names "JDBC Connection
    Properties"
    This page contains the following info and additional links.
    -John
    ------------- COPIED FROM HELP ---------------
    Oracle JDBC-OCI8 Driver
    Use this type 2 driver when creating a Java application that
    runs against an Oracle8i server. This is a thick driver
    optimized for the Oracle8i database: it cannot be used with
    applets. This driver handles any database protocol (TCP, IPX,
    BEQ, and so on). It is required for applications which are run
    from the machine they are stored on. It can also be used against
    an Oracle7 database.
    This driver requires client software installation. The project
    must also include the correct version of the driver in a library
    and include no other Oracle JDBC library. This driver is
    included in the default Oracle JDBC library for all projects.
    The library is named Oracle 8.1.7 JDBC and it includes both the
    Thin JDBC and JDBC-OCI8 driver library components. For all OCI
    and type 2 JDBC drivers, see Connection Requirements for OCI and
    Type 2 JDBC Drivers.
    ------------- COPIED FROM HELP ---------------

  • Receiving oracle.jdbc.driver error when trying to connect

    Setup:
    Windows 7 64bit
    4GB ram
    SQL Developer 3.2.20.09
    Java platform 1.6.0_37
    Oracle IDE 3.2.20.09.87
    Hello, I'm going to start by saying I'm a rank amateur when it comes to using and understand SQL developer. My entire need for this program is to connect to a virt server at my office and test out my SQL queries against our tables. It's been working great for this purpose until yesterday when I received this error:
    An error was encountered performing the requested operation:
    oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber()I
    Vendor code 0
    I did some searching and found a few references to this error but due to my inexperience I was unable to follow the resolutions and fix the error. This connection was working fine until yesterday afternoon which seemed odd. Based on my control panel, here is what I installed yesterday, I believe I installed both Java's after the error occurred seeing if they would alleviate the issue.
    MySQL Administrator 1.1
    Java SE Development Kit 6 Update 41 (64-bit)
    MySQL Workbench 5.2 CE
    Java 6 Update 41 (64-bit)
    Could one of these be the root of the issue?
    Thanks for the help and sorry for the lack of technical expertise, my need is very narrow and up until now this program has worked great for me.
    -Brad
    Edited by: 998110 on Apr 4, 2013 9:46 AM

    >
    Could one of these be the root of the issue?
    >
    More likely to be that you are now using the wrong version of the oracle jdbc jar file.
    Post the name and version of the JDBC jar file that you think you are using.
    Search the pc for ALL such files.
    Examine the environment variables (e.g. PATH) to see if they reference jdbc jars other than the ojdbc6 jar you should be using.

  • Connect to an Oracle database by using oracle.jdbc.OracleDriver: error

    Hi,
    I'm trying to connect to an Oracle database so we can retrieve notes of tables, views and packages.
    By using the API of Data Modeler (transformation script) we want to add these notes to corresponding objects in Data Modeler.
    I'm starting with this:
    importPackage(java.lang);
    importPackage(java.awt);
    importPackage(java.sql); 
    java.lang.Class.forName("oracle.jdbc.OracleDriver");
    An error occurs when I run this code:
    It has to be a Java thing...
    Anyone a suggestion?

    Problem solved! One of my colleagues referred to this post: Import user defined properties from Oracle Designer
    More in detail: it's about this couple of lines:
    // Copy the ojdbc6.jar file to ..\datamodeler-home\jlib directory 
    // Add this line to datamodeler.conf 
    //      AddJavaLibFile  ../../jlib/ojdbc6.jar 
    I changed my datamodeler.conf file, restarted DM and now there's no longer an error when I am trying to use the Oracle JDBC drive.

  • Eclipse jboss jsp oracle xe connect error

    hi
    i am using eclipse ganymede 342 and my second configuration is:
    jboss as 420 ga
    oracle 10g xe
    windows xp
    jdk15
    when i run my jsp file that contains instructions to connect to oracle 10g xe and query my database i got this error:
    org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 9
    6: <body>
    7: <%
    8: try{
    9: Class.forName("oracle.jdbc.driver.OracleDriver" );
    10: //Class.forName("oracle.jdbc.OracleDriver" );
    11: String url = "jdbc:oracle:thin:@//127.0.0.1:8080:xe";
    12: Connection con = DriverManager.getConnection(url,"system","system" );
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:518)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    javax.servlet.ServletException: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:98)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
         java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         java.lang.Class.forName0(Native Method)
         java.lang.Class.forName(Class.java:164)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    why?
    thanks for your help.

    hi orafad,
    i try current style db:
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//localhost/xe","system","system");
    but i get this error:
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 17
    17: Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//localhost/xe","system","system");
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:518)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    javax.servlet.ServletException: java.lang.NoSuchMethodError: oracle.i18n.text.OraBoot.getCharsetMaxCharLen(Ljava/lang/String;)Ljava/lang/String;
    and then i tried this one:
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:8085:xe","system","system");
    and got this error:
    Error: Erreur d'E/S: The Network Adapter could not establish the connection
    so i think my url connection is good and may be the problem is elsewhere
    thanks for your listening
    ========================
    hi udo,
    i checked the lsnrctl status and this is the result:
    Microsoft Windows XP [version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\xp>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-OCT. -2011 14:02:49
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connexion Ó (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUT du PROCESSUS D'ECOUTE
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
    Date de dÚpart 06-OCT. -2011 23:04:12
    DurÚe d'activitÚ 0 jours 14 heures 58 min. 36 sec
    Niveau de trace off
    SÚcuritÚ ON: Local OS Authentication
    SNMP OFF
    Service par dÚfaut XE
    Fichier de paramÞtres du processus d'Úcoute C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Fichier journal du processus d'Úcoute C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    RÚcapitulatif d'Úcoute des points d'extrÚmitÚ...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=compaq)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8085))(Presentation=HTTP)(Session=RAW))
    RÚcapitulatif services...
    Le service "CLRExtProc" comporte 1 instance(s).
    L'instance "CLRExtProc", statut UNKNOWN, comporte 1 gestionnaire(s) pour ce service...
    Le service "PLSExtProc" comporte 1 instance(s).
    L'instance "PLSExtProc", statut UNKNOWN, comporte 1 gestionnaire(s) pour ce service...
    Le service "XEXDB" comporte 1 instance(s).
    L'instance "xe", statut READY, comporte 1 gestionnaire(s) pour ce service...
    Le service "XE_XPT" comporte 1 instance(s).
    L'instance "xe", statut READY, comporte 1 gestionnaire(s) pour ce service...
    Le service "xe" comporte 1 instance(s).
    L'instance "xe", statut READY, comporte 1 gestionnaire(s) pour ce service...
    La commande a rÚussi
    however, i want to say that i manually changed the http port for oracle (now port 8085) to avoid conflict with jbossAS which use port 8080 by default
    all changes goes correct
    so i change my url connexion like this:
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521:xe","system","system");
    and got the same error
    question: it is not a problem to run eclipse jboss oracle express edition in a virtual machine?
    or may be an error inside my jsp page:
    <%@ page language="java" import="java.sql.*" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Employes</title>
    </head>
    <body>
    <%
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:8085:xe","system","system");
    System.out.println("Connected sucessfully.<br /><br />\n");
    System.out.println("Return all the employees name.<br />\n");
    String sql = "SELECT ENAME FROM EMP";
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    while (rs.next()) {
         out.println(" ename=" + rs.getString("ename") + "<br />\n");
    stmt.close();
    stmt = null;
    conn.close();
    conn = null;
    out.println("<br />Disconnected sucessfully.<br /><br />\n");
    catch (Exception ex) {
    out.println(" Error: " + ex.getLocalizedMessage() + "<br><br>\n");
    %>
    </body>
    </html>
    thanks for your listening
    ==================================
    NB:
    i work into virtual machine oracle virtualbox with windows xp and my configuration is:
    eclipse
    jboss
    oracle express edition
    jdk

  • ADF: Gracefully handling JDBC connection errors?

    Hi gang
    We've a use case to display a specific web page when the JDBC connection drops out on our ADF application, specifically the following error:
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
    I've been researching solutions to this and came up with a near solution of placing the following entry in the application's web.xml file:
    <error-page>
      <exception-type>oracle.jbo.DMLException</exception-type>
      <location>/MyErrorPage.jsp</location>
    </error-page>This works okay but is a blunt mechanism as it captures all DMLExceptions which includes insert/update/delete failures, as well as the JDBC connection drop out.
    Has anybody come up with a better solution for handling JDBC connection drop outs?
    Thanks & regards,
    CM.
    PS. (JDev 11g build 5188, ADF BC + ADF Faces RC)

    Thanks John, that's the solution. For some reason I'd forgotten that DCErrorHandlerImpl exists in the controller layer, not the model layer, so it makes perfect sense to override it and do the redirect.
    Here's what I came up with:
    @Override
    public void reportException(DCBindingContainer dCBindingContainer,
                                Exception exception) {
        try {
            String message = exception.getMessage();
            if (message.indexOf("JBO-26061") >= 0) {
                FacesContext.getCurrentInstance().getExternalContext().redirect("faces/ErrorPageJDBCFailure.jspx");
            } else
                super.reportException(dCBindingContainer, exception);
        } catch (IOException e) {
    }The following OTN post shows some other methods to do the redirect: JSF forward Vs redirect
    Cheers!
    CM.

  • Oracle JDBC receiver error

    Hi,
    I am trying to setup a file to Oracle JDBC receiver scenario.  In this case I am trying to just insert a single line to Oracle.  I get no error in SXMB_MONI, no error in the message mapping test, and no error in the Test configuration in the ID.
    Here is the error I get in the RWB comm channel monitoring for my adapter:
    <i>No "action" attribute found in XML document ("action" attribute missing or wrong XML structure)
    MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
    Exception caught by adapter framework: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
    Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure).</i>
    Here is my structure for the oracle receiver:
    DTOracleReceiver_INSERT
        TEMP_DATA_XI                                             1
             action   (attribute)          xsd:string
             access
                   NCODE                  xsd:string              1
                   VNAME                  xsd:integer            1
                   DDATE                   xsd:date                1
                   NPRICE                  xsd:decimal           1
                   LSTATES               xsd:string               1
    TEMP_DATA_XI is my table name in Oracle
    action is set to constant "INSERT" in the message mapping.
    When I look at the payload in the OracleReceiver adapter, this is what shows up:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MTOracleReceiver_INSERT xmlns:ns0="http://test.com/jdbc">
    - <TEMP_DATA_XI action="INSERT">
        - <access>
            <NCODE>200</NCODE>
            <VNAME>Inserttest</VNAME>
            <DDATE>2007-06-15 09:25:43.0</DDATE>
            <NPRICE>20.00</NPRICE>
            <LSTATES>test of JDBC receiver</LSTATES>
         </access>
      </TEMP_DATA_XI>
      </ns0:MTOracleReceiver_INSERT>
    Any thoughts or ideas on how to fix this error?   Any help would be greatly appreciated.
    Thanks,
    Jake

    I now get a different error:
    Unable to execute statement for table or stored procedure. 'TEMP_DATA_XI' (Structure 'STATEMENTNAME') due to java.sql.SQLException: ORA-00928: missing SELECT keyword
    2007-06-19 10:03:54 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TEMP_DATA_XI' (structure 'STATEMENTNAME'): java.sql.SQLException: ORA-00928: missing SELECT keyword
    2007-06-19 10:03:54 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TEMP_DATA_XI' (structure 'STATEMENTNAME'): java.sql.SQLException: ORA-00928: missing SELECT keyword
    2007-06-19 10:03:54 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'TEMP_DATA_XI' (structure 'STATEMENTNAME'): java.sql.SQLException: ORA-00928: missing SELECT keyword.
    My current datatype for the receiver is:
    DTOracleReceiver_INSERT                                                    1
         STATEMENTNAME                                                          1
                 TEMP_DATA_XI                                                       1
                            action   (attribute)          xsd:string                  required
                            Table                            xsd:string                  1
                            access                                                         0:unbounded
                                   NCODE                  xsd:string              1
                                   VNAME                  xsd:integer            1
                                   DDATE                   xsd:date                1
                                   NPRICE                  xsd:decimal           1
                                   LSTATES               xsd:string               1
    action is mapped to "INSERT"
    Table is mapped to "TEMP_DATA_XI"

  • Oracle JDBC Connectivity

    I am trying to connect to oracle8.0.5 database from JDK1.3 on
    windows 2000 os
    my program code is as follows
    import java.sql.*;
    class JEmpt{
    public static void main (String args [])
         throws SQLException {
         try
              Class.forName("oracle.jdbc.driver.OracleDriver");
              Connection conn =
              DriverManager.getConnection
    ("jdbc:oracle:thin:@127.0.0.1:1521:ORCL","SYSTEM","MANAGER");
              Statement stmt = conn.createStatement ();
              ResultSet rset = stmt.executeQuery ("select
    ENAME from EMP");
              while (rset.next ()) {
              System.out.println (rset.getString (1));
         catch(Exception e)
              System.out.println("Exception : "+e.getMessage
    but i get the following error
    Exception in thread "main" java.sql.SQLException: Connection
    refused: no further information
    at oracle.jdbc.dbaccess.DBError.check_error<DBError.java:228>
    at
    oracle.jdbc.driver.OracleConnection.<init><OracleConnection.java:
    110>
    at oracle.jdbc.driver.OracleDriver.connect<OracleDriver.java:148>
    at java.sql.DriverManager.getConnection<Unknown Source>
    at java.sql.DriverManager.getConnection<Unknown Source>
    at Employee.main<Employee.java:23>
    your help wii be highly appreciated
    looking forward for yr reply
    lekha

    Hi lekha
    try this:
    import oracle.jdbc.driver.*;
    DriverManager.registerDriver(new OracleDriver());
    conn = DriverManager.getConnection(...)
    and ensure that your CLASSPATH can see
    classes111.zip/classes12.zip.
    Tarik

  • Oracle.jdbc.driver error using jdk1.2.2 on Win 2k

    Im trying to run a jsp page that is dependent on an oricle database. However whenever I try to connect to the database over a thin line client I always get a java.lang.ClassNotFoundException error. I've gone over the path and classpath serveral time, and can't get it to work.
    classpath =
    C:\jdk1.2.2\lib\tools.jar;C:\Program Files\Tomcat4.0\common\lib\servlet.jar;C:\ORANT\jdbc\lib\classes102.zip;
    C:\ORANT\jdbc\lib\classes111.zip;C:\jdk1.2.2\bin\java.exe;
    C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2\lib\dt.jar;
    path =
    C:\WINNT\system32;C:\WINNT\system32;C:\jdk1.2.2\bin\java.exe;C:\ORANT\jdbc\lib;
    If anyone knows how to fix this problem Id appreciate it.

    it doesn't say, it just gives me this error message.
    javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
         at org.apache.jsp.index$jsp._jspService(index$jsp.java:105)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, Compiled Code)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, Compiled Code)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, Compiled Code)
         at java.lang.Thread.run(Thread.java:472)
    root cause
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java, Compiled Code)
         at java.lang.Exception.(Exception.java, Compiled Code)
         at java.lang.ClassNotFoundException.(ClassNotFoundException.java, Compiled Code)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java, Compiled Code)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java, Compiled Code)
         at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java, Compiled Code)
         at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java, Compiled Code)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java, Compiled Code)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java, Compiled Code)
         at org.apache.jsp.index$jsp._jspService(index$jsp.java:87)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, Compiled Code)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java, Compiled Code)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, Compiled Code)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, Compiled Code)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, Compiled Code)
         at java.lang.Thread.run(Thread.java:472)

  • JDBC Connect error on Linux: UnsatisfiedLinkError

    Hi,
    I'm running one of the sample JDBC programs
    provided by Oracle (This installation is on
    Linux system). This simple program tries to
    connect to Database after accepting all the
    parameters. When I run this program, I get
    the following error.(I'm using Java2).
    Any ideas/solution(s) would be appreciated.
    Rgds,
    $ java JdbcCheckup
    Please enter information to test connection to the database
    user: scott
    password: tiger
    database (a TNSNAME entry): ORCL.localhost
    Connecting to the database...Connecting...
    Exception in thread "main" java.lang.UnsatisfiedLinkError: make_c_state
    at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:148)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:103)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
    at java.sql.DriverManager.getConnection(DriverManager.java:453)
    at java.sql.DriverManager.getConnection(DriverManager.java:133)
    at JdbcCheckup.main(JdbcCheckup.java:43)
    null

    Hi again,
    now, as I found out how to get around the broken forum login, thank you, Dave, for your reply. You were right, the configuration was the problem.
    I did Naming.rebind("//localhost/MyServiceName", serviceObject); which worked well on Windows even when connecting remotely. On Linux I had to put the actual IP address of the machine to make it work, i.e. something such as Naming.rebind("//192.162.2.99/MyServiceName", serviceObject); ...simpler than I feared... ...just in case someone encounters similar trouble.
    Ulrich

  • Enable SSL between oracle JDBC Connection in weblogic server.

    Hi ALL,
    I have an requirement to enable SSL Mechanism in weblogic JDBC Connection Pool.we are using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production and Driver as "jdbc:oracle:thin@..." / oracle.jdbc.OracleDriver.
    weblogic server 8.1 SP4
    can anybody know what are the steps / configuration has to be done for enable Oracle Advanced Security encryption on the JDBC Oracle Thin driver with a WebLogic JDBC Connection Pool.
    Thanks,
    Karthik,

    Hi,
    I changed the code as given below. Still getting the same error. Can I migrate my question to jdbc section? I am new to this forum.
    import java.sql.*;
    public class jdbc {
    public static void main(String[] args) throws ClassNotFoundException, SQLException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url = "jdbc:oracle:thin:@localhost:1521:xe";
    Connection conn =
    DriverManager.getConnection(url,"jestin","jj");
    conn.setAutoCommit(false);
    Statement stmt = conn.createStatement();
    ResultSet rset =
    stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next()) {
    System.out.println (rset.getString(1));
    stmt.close();
    System.out.println ("Ok.");
    jestinjoy@debian:~/java$ javac -classpath /usr/lib/java/ jdbc.java
    jestinjoy@debian:~/java$ java jdbc
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at jdbc.main(jdbc.java:7)
    same error when I give the command without classpath

  • JDBC connection error in Crystal Reporting through ESRI Dekho product

    Wow, I am so far out of my depth here I am not even sure I am in the correct forum.  I have recently started using the GIS software ESRI product Dekho (a web based browser basically) and the reporting tool is Crystal Reports.  The JDBC connection required for me to connect to data held in a corporate oracle db is failing with a driver error and I don't know how to troubleshoot it.  ESRI support seem to think it's a Crystal Reports issue.  If anyone has any idea what I am talking about please respond, including pointing me to a forum which might assist, if this one is not where I should be asking such a question.  Thanks in advance.

    Simon here from Esri Australia, I work in the support team for the Dekho product, that this client was having problems with.
    We established that our Dekho product was passing the relevant information over to Crystal and that Crystal was having issues connecting to a database due to an issue with Crystal not having the correct JBDC drivers installed.
    = Therefore we concluded that the client should get in touch with you to resolve these JDBC driver issues.
    The error in the report is:
    ['Failed to open the connection, Details:JDBC driver not found"|http://i7.photobucket.com/albums/y254/jak-c/Outlook1.jpg]
    We believe that the issue is specifically a Crystal Reports issue on connecting to an Oracle database. 
    If we take Dekho out of the equation, the issue is still apparent.
    We did some testing on Oracle XE and were able to get it to communicate with Crystal Reports ok.
    We had to make the following change:
    1. copied the database drivers from:
    C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib
    to
    C:\Program Files (x86)\Business Objects\Common\4.0\java\lib\external\
    2. Edit "C:\Program Files (x86)\Business Objects\Common\4.0\java\lib" to include the above JAR file into the classpath tag.
    We touch on this in [our own web-help|http://www.dekho.com.au/help/31/default.htm?turl=Documents%2Fconfigurecrystalreports.htm], although this is more specific to SQL Server.
    The client had problems setting up this Crystal Reports to Oracle link, due to drivers missing.
    Can you generate a support ticket for this client and assist her with getting CR drivers working with her version of Oracle?
    As a sidenote - Esri Australia is a distributor for Esri, and not sure if the OEM extends to us?
    We would like to get a better relationship with you on how to deal with Crystal related issues with our own product.
    For issues like the above, we would like to come up with a more efficient means for our clients to get resolutions to their issues, and if the issue stems to outside our product - a good process for our support team to log a ticket on behalf of our client and pass all the relevant info across, so that a solution can be resolved quickly.
    - Do you have a contact in Australia that we could talk to about this?
    Let me know if you need the clients contact details - I believe this is still an issue for her.

Maybe you are looking for

  • IMac 2.66 Radeon HD 2600 Pro: some Excel files won't display in ppt decks

    Running Leopard 10.5.8 and MS Office 2004 Two iMac (8.1) 2.66 GHz with ATI Radeon HD 2600 Pro video won't display some Excel files in PowerPoint decks, but iMac 1.83 GHz Core Duo will display o.k. as will MacBook Pro, MacBook, etc. Installing a trial

  • Hyperlink from Apex page to MS Word. any body guide please

    I want to open a Microsoft word document from oracle apex page. i create a hyperlink and give him the path like <a href="d:\abc.doc"></a> it is not working properly. can any body guide me how can i open the .doc by pressing a button or by creating a

  • Constant values and encapsulation

    Hi All, lookat the code below: class Test{ public static final int flag = 10; Public static void main(String args[]) System.out.println(i); }here the constant value i is used inside the same class. Now generally, we use to make separate java file for

  • IDOC Type for Tcode CC01 and CC02 (Create / Change Change Numbers)

    We are trying to integrate Change Master from a 3rd party system to SAP R/3 4.72.What is the IDOC Type for Tcode CC01 and CC02 (Create / Change Change Numbers)

  • Java script error with adobe form

    Hi All, We had installed Adobe Document server recently. while trying to open the ess - expense detail form through PDF we are gettng following error in sequence Intenet Explorer Script error 1. 'sapUrDomainRelaxing' is undefined 2. object expected 3