Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Scripted data set problem
ManInBlack
Hello,
I have embedded the birt report engine into our software. My problem is that I can?t access the classes of the classpath.
Within of a script of the rptdesign-file, I can import java packages with
importPackage( Packages.org.my.project.adap );
The jars have to be within of the report engine under the lib folder.
But how can I import java-classes of the classpath within of the script, which are lying under the lib-folder of my software and not in the report-engine?
(The idea is, that my software calls the report-engine, the report-engine executes the report generation, but I need the method-calls of my software which returns the data for the report.)
It would be nice, if you can help me.
Bye
ManInBlack
Find more posts tagged with
Comments
JasonW
One way to do this is to set the classpath in the app context in the EngineConfig.
config.getAppContext().put(EngineConstants.WEBAPP_CLASSPATH_KEY, "myclasspath");
also add
config.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, Thread.currentThread().getContextClassLoader());
Jason
ManInBlack
Hi Jason,
great, thank you this works.
Are there any other possibilities? Because the disadvantage of this method is that the classpath
have to be set two times. First on the start script of my software and even then in the app context within of the EngineConfig.
Thank you.
Bye
ManInBlack
JasonW
You may be able to use the osgi.parentClassloader=fwk setting in the osgi configuration file, but this will make class searches longer.
Jason