4 Replies Latest reply on Feb 4, 2016 6:41 AM by Abhinav Gupta

    Exception: java.lang.ClassCastException: org.jboss.as.connector.subsystems.datasources.WildFlyDataSource cannot be cast to javax.sql.DataSource

    Irshad Ahamed Newbie

      Hello Friends,

       

      I am getting this exception if I do a test using Management Console, I am getting success once I deploy the war file I am getting these execpetion

       

      Context initialContext = new InitialContext();

             DataSource datasource = (DataSource)initialContext.lookup("java:/Mysql");;

          result = datasource.getConnection();