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)
birt-runtime-osgi-4-2-1 on tomcat / maven dependencies
Samo
Hi,<br />
<br />
I gotta use a different runtime (birt-runtime-osgi4-2-1) to run my emitter.<br />
Now I want do deploy it on a tomcat server. How can I use the birt-runtime-OSGI on it?<br />
Unfortunately the dependencies which i used for my pom.xml were not enough to get all necessary libarys.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.8.1.v20120830-144521</version>
</dependency>
<dependency>
<groupId>org.eclipse.birt.runtime</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<version>3.3.100.v20120522-1822</version>
</dependency></pre>
<br />
If I download the birt-runtime-osgi there are jars like emitterconfig.jar and so on.<br />
Do I miss some other dependencies?<br />
<br />
<br />
I hope my problem is understandable.<br />
<br />
Thanks,<br />
Samo
Find more posts tagged with
Comments
mwilliams
Are you getting errors? If so, can you post them in here?
Samo
Hi Michael,
I'm actually trying it on a different way. I don't have a servlet which is using my emitter yet.
What I did ist:
- I've used the maven dependencies to download the libaries and copied the libaries to my local folder to run a local java application to test the emitter.
But I can not compile my project cuz I still miss some libaries (see below).
Either I gotta copy the libaries manually or is there any other dependency for maven to use the osgi-runtime?
I hope you understand what I'm trying to do.
I still need the maven dependencies for the following packages:
Samo
Hi Michael,<br />
<br />
I solved it by using local repositories with maven.<br />
<br />
If I run my servlet to create a new html page it works once and afterwards I get an error that the OSGIPlatform can not start.<br />
<br />
By the way I use also a Platform.shutdown in my servlet.<br />
<br />
Please look at the picture below:<br />
<br />
<br />
This is my servlet<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>public class DataLoadForBirt extends HttpServlet {
private static final long serialVersionUID = 1L;
// private IReportEngine birtReportEngine = null;
protected static Logger logger = Logger.getLogger("org.eclipse.birt");
public DataLoadForBirt() {
super();
}
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
try{
executeHTML5Report();
}catch(Exception e){
e.printStackTrace();
System.out.println(e.toString());
System.out.println("END");
}
}
static void executeHTML5Report() throws Exception {
// TODO Auto-generated method stub
IReportEngine engine = null;
EngineConfig config = null;
config = new EngineConfig();
//config.setEngineHome("C:/birt-runtime-osgi-4_2_1/birt-runtime-osgi-4_2_1/ReportEngine");
//config.setEngineHome("/..");
//config.setLogConfig("c:/birt/logs", Level.FINE);
//Platform.startup(config); //OR without Parameter, I've tested both!
Platform.startup();
IReportEngineFactory factory = ( IReportEngineFactory ) Platform.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);
engine.changeLogLevel(Level.FINEST);
IReportRunnable design = engine.openReportDesign("/html5Test.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
String format = "HTML5";
HTML5RenderOption html5Options = new HTML5RenderOption();
html5Options.setOutputFormat(format);
html5Options.setOutputFileName("html5Testen.html");
task.setRenderOption(html5Options);
task.run();
task.close();
engine.destroy();
Platform.shutdown();
System.out.println("We are done!!");
}
}
</pre>
Regards,<br />
Samo
mwilliams
Awesome! Sorry for the delayed response! Glad you got it working! And, thanks for updating with the final result!