SerialConnection - Weblogic

This is a discussion on SerialConnection - Weblogic ; I am trying to cast a SerialConnection to a weblogic Connection and recieve the following " ReportServlet runReport java.lang.ClassCastException: weblogic.jdbc.rmi.SerialConnection" We are running a weblogic 7 cluster and oracle 9i. It seems that whenever I create a connection Weblogic returns ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: SerialConnection

  1. SerialConnection


    I am trying to cast a SerialConnection to a weblogic Connection and recieve the
    following
    " ReportServlet runReport java.lang.ClassCastException: weblogic.jdbc.rmi.SerialConnection"

    We are running a weblogic 7 cluster and oracle 9i.
    It seems that whenever I create a connection
    Weblogic returns a Serial Connection.
    When I try to cast this to a WLConnection I get the excption.
    // Code to get Connection
    public java.sql.Connection getConnection()
    {
    java.sql.Connection conn = null;
    try {
    conn = dataSource.getConnection();
    }
    catch (Exception exc) {
    System.out.println("Unable to get connection: " + exc);
    }
    When I try to execute the code below
    java.sql.Connection JConn = (java.sql.Connection)conn;
    System.out.println( JConn.getClass() );

    The out put is weblogic.jdbc.rmi.SerialConnection
    Angus


  2. Re: SerialConnection


    "Angus Whittaker" wrote in message news:40bcf009$1@mktnews1...

    To what and why are you trying to cast the result of dataSource.getConnection()?

    Regards,

    Slava Imeshev

    >
    > I am trying to cast a SerialConnection to a weblogic Connection and recieve the
    > following
    > " ReportServlet runReport java.lang.ClassCastException: weblogic.jdbc.rmi.SerialConnection"
    >
    > We are running a weblogic 7 cluster and oracle 9i.
    > It seems that whenever I create a connection
    > Weblogic returns a Serial Connection.
    > When I try to cast this to a WLConnection I get the excption.
    > // Code to get Connection
    > public java.sql.Connection getConnection()
    > {
    > java.sql.Connection conn = null;
    > try {
    > conn = dataSource.getConnection();
    > }
    > catch (Exception exc) {
    > System.out.println("Unable to get connection: " + exc);
    > }
    > When I try to execute the code below
    > java.sql.Connection JConn = (java.sql.Connection)conn;
    > System.out.println( JConn.getClass() );
    >
    > The out put is weblogic.jdbc.rmi.SerialConnection
    > Angus
    >




+ Reply to Thread