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)
PHP JavaBridge: Getting no ReportEngine
takeshi
Hello,<br />
<br />
we're using BIRT 2.6.2 in conjunction with PHP/JavaBridge to integrate BIRT Reports into our webapplication.<br />
<br />
For this, we build a custom JavaBridge.war file with the BIRT2.6.2 files included.<br />
<br />
This war file works fine on three different combinations of Tomcat and Apache Servers.<br />
<br />
Now we installed it on another machine and it stopped working. JavaBridge runs, but when i want to get the BirdReportHandle it returns NULL instead of the handle. No error message is thrown. Anybody knows a solution to this problem?<br />
<br />
The code i'm using:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<?php
define ("JAVA_HOSTS", "TOMCAT_SERVER:PORT");
define ("JAVA_SERVLET", "/JavaBridge/JavaBridge.phpjavabridge");
require_once("java/Java.inc");
echo java("java.lang.System")->getProperties();
$ctx = java_context()->getServletContext();
$birtReportEngine = java("org.eclipse.birt.php.birtengine.BirtEngine")->getBirtEngine($ctx);
java_context()->onShutdown(java("org.eclipse.birt.php.birtengine.BirtEngine")->getShutdownHook());
var_dump (java_values($birtReportEngine));
?>
</pre>
<br />
Java Properties are reported correctly, so i assume the connection to the bridge is established. But $birtReportEngine = java("org.eclipse.birt.php.birtengine.BirtEngine")->getBirtEngine($ctx); just gives me NULL. On the other, working machines, the Handle Object is returned.<br />
<br />
Any idea on this topic is appreciated.
Find more posts tagged with
Comments
JasonW
When tomcat explodes the war in the webapps directory you should have a folder like:
\JavaBridge2.6.2\WEB-INF\platform Your JavaBridge may be named differently, but you should have the platform directory. It has a plugins and a configuration directory. Look in the configuration directory and verify that there are other file/folders besides the config.ini. Whatever user is running tomcat needs access to write in this directory.
Jason
takeshi
Hello Jason,
thanks for your fast answer. I'll check this when i have access to the machine.
Is it possible to configure BIRT that it doesn't have to write under the webapps folder, but to a user dir?
JasonW
You can modify the configuration.ini in the platform/configuration directory to change the location. Look at this thread:
http://www.birt-exchange.org/org/forum/index.php/topic/20893-birt-26-and-ibm-websphere-can-not-startup-the-osgi-framework/page__st__20
Jason
takeshi
OK, granting write access to the tomcat user has resolved this issue. Changing the directory by modifying the location did not work. Thank you.
JasonW
Changing the directory should work if the process has read write.
Jason