3 Replies Latest reply on Feb 8, 2008 2:27 AM by jaikiran pai

    PB with wrapping my oracledatasource

    joe lindien Newbie

      I'm trying to use an Oracledatasource to acces my db from a servlet but I' have an error:
      java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource

      here is my code:
      Context ctx;

      try {
      ctx = new InitialContext();
      OracleDataSource ds;
      ds = (OracleDataSource) ctx.lookup("java:OracleDS");

      OracleConnection connection;
      try {
      connection = (OracleConnection) ds.getConnection();
      PrintWriter out = reponse.getWriter();
      The line that bug is underlined, it seems that I Can't cast anything with an oraclesomething whatever it's an oracleconnection, oracledatasource etc..
      I think my datasource is well configured (see below)

      taeslin <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>



      So if anybody could help me, i would be very pleased :)