getting ClassCastException when getting datasource - Websphere

This is a discussion on getting ClassCastException when getting datasource - Websphere ; Hi All, When i am trying to get the DataSource by using the JNDI it is giving me the ClassCastException. When I check the Object what it is returning , i found that it is returning com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource type of Object. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: getting ClassCastException when getting datasource

  1. getting ClassCastException when getting datasource

    Hi All,

    When i am trying to get the DataSource by using the JNDI it is giving me the
    ClassCastException. When I check the Object what it is returning , i found
    that it is returning com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource type of
    Object. Pls help me why i am getting ClassCast Exception.

    Thanks & Regards,
    Chary



  2. Re: getting ClassCastException when getting datasource

    You shouldn't get a ClassCastException for that. So that said, forgive the
    basic question "what are you casting it to ? (should be
    javax.sql.DataSource).

    Dave


    "Chary" wrote in message
    news:d0dupb$72ss$1@news.boulder.ibm.com...
    > Hi All,
    >
    > When i am trying to get the DataSource by using the JNDI it is giving me

    the
    > ClassCastException. When I check the Object what it is returning , i found
    > that it is returning com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource type of
    > Object. Pls help me why i am getting ClassCast Exception.
    >
    > Thanks & Regards,
    > Chary
    >
    >




+ Reply to Thread