5 Replies Latest reply on Mar 6, 2002 7:41 PM by David Jencks

    ClassCastException getting datasource

    Adam Young Newbie

      I found a few other posts that seem to have this problem, but none that got a n answer.

      Here's the code:

      Object o = getInitialContext().
      javax.sql.DataSource source = (javax.sql.DataSource) o;

      and here is the exception:

      [ERROR,Default] java.lang.ClassCastException: org.jboss.pool.jdbc.xa.XAPoolDataSource
      [ERROR,Default] at com.getcare.servlet.DatabaseAction.perform(DatabaseAction.java:47)
      [ERROR,Default] at org.apache.struts.action.Action.execute(Action.java:369)

      This worked before I moved to the Tomcat 4.1-Jboss2.4.4 build. Is this a problem with the jboss version of the jdbc 2.0 extension conflicting with the standard definition? There is a jar ile in the Tomcat Directory that is the standard sun implementation.