Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 15 Oracle Analytics Lounge
- 208 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
OBIEE 12c - Google Charts Error - "Pre Flight No Access-Control-Allow-Origin header is present on th

My team recently got merged under a new manager of which has a few things that she would like implemented in OBIEE 12c (Google analytics, Google Charts and Google maps).
I believe I got google analytics working sufficiently, but am now trying to get Google Charts working.
Initially when I was trying to get Google charts working, I was hitting an error with [content security policy] directives (I was also hitting this error with Google Analytics).
I was able to find an article through oracle support and was able to fix this error for both google analytics and google charts (yay progress!)
This fixed the google analytics error, but with google charts I was now hitting another error.
Failed to load https://www.gstatic.com/charts/loader.js: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://<myserver>' is therefore not allowed access.
This is my java script code in my reports narrative
Prefix
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> // Load the Visualization API and the corechart package. google.charts.load('current', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.charts.setOnLoadCallback(drawChart); // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { // Create the data table. var data = new google.visualization.DataTable(); data.addColumn('string', 'Domestic vs International'); data.addColumn('number', 'Accept Count'); var myArray=[];
Narrative
myArray.push(["@1", @2]);
Postfix
data.addRows(myArray); // Create and draw the visualization. var chart = new google.visualization.PieChart(document.getElementById('donutchart')); chart.draw(data, {width: 700, height:300, pieHole: 0.4, pieSliceText: 'value'}); }// colors can be customized with this: colors:['#50F550','#FFA500', '#FF3C3C', '#FFFF78','#287AC3','#9123DA', '#00BFB5', '#C6687B', '#68C6C2' ] }</script><div id="donutchart" style="width: 400px; height: 300px;"></div>
I tried to dig around about the preflight Access-Control-Allow-Origin error, and I found quite a few articles but nothing specific to OBIEE.
I found some articles that mention how I can implement access control in weblogic. I checked in weblogic and from what I could tell we dont have any sort of settings for access control.
I did initially find a lot of articles on how to implement google charts - And all the articles made it sound easy peasy and none mention anything about security
So I was wondering, has anyone else hit this error or similar?
Any help would be much appreciated
Answers
-
Does/Has anyone tried using Google charts in OBIEE? Or seen the above error?
0