1 Reply Latest reply on Jun 29, 2017 10:29 AM by Patrick A Van Der Hyde

    Tableau connecting Apache Solr using WebDataConnector

    Sharath BA

      Hi,

       

      I need to connect Apache Solr using Tableau, since there is not direct connector I'm trying through Web Data Connector using JSON files in Apache Solr. I'm following the process provided in Tableau Online Help link, using the same Simulator. So, my WDC simulator is running on localhost with port 8888 and Apache Solr local core is also running on same localhost with port 8983 and I get below error when I click on the Fetch Table Data:

       

      XMLHttpRequest cannot load http://localhost:8983/solr/counter_sample/select?indent=on&q=*:*&wt=json. Origin http://localhost:8888 is not allowed by Access-Control-Allow-Origin.

       

      I googled for the related error, as I'm not Java script developer, and got four of lines of code and added the same in to the java script but still didn't resolve my issue.

       

      $(document).ajaxSend(function(e, xhr, options) { 

        xhr.setRequestHeader( 'Access-Control-Allow-Origin', '*');

        xhr.setRequestHeader( 'Access-Control-Allow-Headers', '*');

        xhr.setRequestHeader( 'Content-Type', 'application/json; charset=utf-8' );

        });

       

       

       

      Screen Shot 2017-06-22 at 8.14.27 PM.png

       

      Please let me if any other information is required.

       

      Thanks,

      Sharath