<div>Hi,</div><div> </div><div>I am trying to design a report that gets JSON data from a RESTful resource. As far as I understood natively this option isn't available and I have to rely on external classes. I came across <a data-ipb='nomediaparse' href='
http://stackoverflow.com/questions/14228131/how-can-i-import-json-data-from-a-rest-api-into-bir'>this suggestion</a>. I built the necessary jars (basic and dependencies), created a scripted datasource modified the open script then a dataset with fetch script but I cannot get it to work no matter what. All of the time I get the following error:</div><div><pre class="_prettyXprint">...................A BIRT exception occurred. See next exception for more information.Error evaluating Javascript expression. Script engine error: TypeError: [JavaPackage com.actuate.json.JSONParser] is not a function, it is object. (/report/data-sources/script-data-source[
@id="83"]/method[
@name="open"]#5) Script source: /report/data-sources/script-data-source[
@id="83"]/method[
@name="open"], line: 0, text:__bm_OPEN(). (Element ID:1)at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:99................................... </pre></div><div>(I included the most important part of the message)</div><div> </div><div>1) So what is the cause of such an error? Not loading the class properly?</div><div> I tried to load the resource from the property box</div><div> I tried to load the external jars in the classpath</div><div> I copied the inside the scriptlib folder</div><div> Nothing worked.</div><div> </div><div>2) In the open script is necessary to import explicitly all of the dependencies of the target class (despite the fact that the java source code does it already)?</div><div> </div><div>3) Is there any other way to achieve my objective? (I am banging my head for a couple of days now.....)</div><div> </div><div>Thanks in advance</div>