4 Replies Latest reply on Mar 2, 2013 1:33 PM by Sham HC

    error! No data source found with name 'mynewdsname' (after asking 0 providers)

    chamila.fernando

      Hi all,

       

      I am trying out the instructions given below.

       

      http://dev.day.com/docs/en/cq/current/developing/jdbc.html

       

      I followed them exactly but removed <cq:include script="head.jsp"/> line from the jsp since I do not have a head.jsp.

       

      my config node settings are as follows.

       

      dbdata.png

      But when I go to the page, I get below error message.

       

      error! No data source found with name 'mynewdsname' (after asking 0 providers)

       

      DB is up and running. I could not find any issue with it. Code is as follows.

       

      <%DataSourcePool dspService = sling.getService(DataSourcePool.class);

        try {

           DataSource ds = (DataSource) dspService.getDataSource("mynewdsname");  

           .........

      %>

       

      Any help will be great. TX