Home
Analytics
Unable to access JAR Content in Report
Muthul
Hi,
I get below error running the report design.Please advise.
*************************************************************************************************************
+ A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "DbInfo" is not defined. (javascript/CompanyDivInfo.js#28)
Script source: javascript/CompanyDivInfo.js, line: 28, text:
getDivisionStr()
*************************************************************************************************************
To display the Company & Division name, I call functions getCompanyStr(), getDivisionStr() functions from the CompanyDivInfo.js in the Expression builder.
CompanyDivInfo.js invokes DBInfo.class to retrieve details.
BIRT.JAR File contains the DBInfo.class file. I have added all the JARs and Java Script Files under resources folder and are available to the report. Also added them under Window-> Preference-> Report Design -> ClassPath.
The same project was exported and tried in other machines and it works but in my machine I always get this error and unable to read from JAR File and display data.
Thanks and Regards,
Muthul.
Find more posts tagged with
Comments
mwilliams
Does your machine have the same setup as these other machines? Did you try adding the jar file as a resource in the property editor for the report?
Muthul
Yeah. I added them to resources in property editor and the same project works in other machines.
If by chance you have a sample project related to accessing JARS connected with sample database, please send me across.
Thanks and Regards,
Muthul.
mwilliams
The actual project is exactly the same? You copy the files to another machine and it runs set up exactly the same? What is your setup? Do you have the same OS, etc that the other machines have? If the project works in other machines, it would have to be something with your setup. Either where you're putting the actual jar file or something. I actually have not used a jar in the designer. I always use a java project with .java files. Then create the jar when deploying.
Let me know. If we can't figure something out that's wrong in your setup. I'll take a scripted dataSet project and jar it up and try to set it up in the designer.
Muthul
I also have a java project here with .java files and we built jar from that project and add it to the resources folder in the property editor during report desig to retrieve data from jars.
The Eclipse set up also remains same as other machine. It's very wierd and I just could not get the pattern.
Thanks for your help.Pass me the scripted data source with jars. Let me see if that helps.
I shall try send one sample jar and report design file.
Thanks and Regards,
Muthul.
Muthul
I have my Development Project settings similar to this sample Project settings attached in BIRT 2.6.2.
The Sample Project is able to retrieve data from Jar but not sure why I'm not able to achieve the same feat in my development project.
Kindly help me with this.
Muthul
Do any one faced a similar issue? It's totally wierd behavior.
I have tried exporting the BIRT Report Project and tried in 5 different machines. It works in 2 machine and in other machines I'm ot able to read the jar classes in BIRT Report Design.
Appreciate any help in this.
Thanks and Regards,
Muthul.
Muthul
Thanks All. The Root Cause is due to Java Version Mismatch.
JARs are recompiled using JDK 1.5 and we are able to access them in all machines.
Thanks and Regards,
Muthul.