Converting JSON to POJO using json string as report parameter

253 views Asked by At

We are trying to convert JSON to POJO and then use this POJO data source in BIRT. We are passing json string as a report parameter. We have also linked the same to dataset parameter. Conversion of json string to java objects works when run individually in eclipse. However when we run the report, we get the below exception:

org.eclipse.birt.report.engine.api.EngineException: Cannot execute the statement. org.eclipse.datatools.connectivity.oda.OdaException ; java.lang.reflect.InvocationTargetException

Due to this exception we are unable to view the report in BIRT. Has anyone faced such an issue before? If yes, please let us know the resolution. Any pointers to solve this exception is really helpful. Thanks in advance.

1

There are 1 answers

1
Sanjay On BEST ANSWER

Even I was facing the same issue. Then I realized I had not added supported jars in the BIRT POJO Data Source. Along with the main POJO jar file, please add all the supporting libraries or jar files the classes in POJO jar refers to in the POJO Data Source. For example if the class needs GSON jar, add that jar file in the POJO Data Source.