Addertjes Onder Het Gras / hiaten

This web page shows some downsides I found in software packages. Each of them, on their own, can cause major troubles to newbies trying to use the software. For more experienced people they spoil the fun using the software and often cause headaches. Some issues may exist by incident, some may be caused by policy of the software author. As soon as an issue is gone to my knowledge, it will be striked out from this website. Known workarounds will be listed too, as long as they are required.
Terug naar overzicht
???PHP/Java Bridgeprogramming

Installation archive lacks "java/" file and "php-cgi" package prerequisite

My quest is to run UCanAccess on top of the bridge, trying to execute SQL-queries on Microsoft Access databases on Linux from PHP. Being a new user, I spent quite some time figuring out how to get it running on my Debian Linux server as a webapp for Tomcat. Just some moments ago I succeeded, still I think the process can be made much easier. Therefore I will try to illustrate the steps I took and what went wrong initially:
  • Step 1: I read the text on top of this page:
    • Requirement 1: Java 1.4 or above: solved by doing: `sudo apt-get install openjdk-7-jdk`
    • Requirement 2: a standard JEE server: solved by doing: `sudo apt-get install tomcat8`and adding the following to /etc/tomcat8/tomcat-users.xml: <role rolename="manager-gui"/><role rolename="admin-gui"/><user username="tomcat" password="********" roles="manager-gui,admin-gui"/>
    • Requirement 3: do not search for a PHP extension: satisfied.
  • Step 2: I downloaded the documentation using the link on top of this page:
  • Step 3: I extracted JavaBridge.war from the documentation archive
  • Step 4: I tested the PHP installation using `java -classpath JavaBridge.war TestInstallation`.
    • Fail 1: testing failed because of the executable file "php-cgi" missing, despite requirement "3", I had to do `sudo apt-get install php5-cgi`.
  • Step 5: I watched the animated gif movie mentioned on the bottom of the installation page:
  • Step 6: as seen in the movie, I copied JavaBridge.war to the webapps folder (also tried with JavaBridgeTemplate.war), by doing `sudo cp ~/JavaBridge.war /var/lib/tomcat8/webapps`.
  • Step 7: I verified in the Tomcat-manager that the webapp actually got deployed: `lynx http://localhost:8888/manager`
    • Fail 2: the webapp Javabridge failed to start, to find out why I did `sudo vi /var/lib/tomcat8/logs/localhost.2015-06-20.log.` This showed that the 'java' folder (or '') was somehow required and could somehow not be found, preventing the webapp to start.
  • Step 8: I extracted* to /var/lib/tomcat8/webapps/JavaBridge/*.
    • Success: the webapp started and this call worked, providing access to all the nice example PHP-scripts: `lynx http://localhost:8888/JavaBridge`
So my hope is that the documentation can be improved upon a bit, and that the 'java' folder (or just the 'java/' file) can be integrated into both JavaBridge.war and JavaBridgeTemplate621.war (after all the template is the one shown in the animated gif demonstration). It would be nice if this could be done, because I almost gave up upon this great tool because of these issues and I've seen in the mailing list archive that other people wrestle with such issues as well. After all Tomcat is one of the recommended and supported choices for JavaBridge.


PHP/Java Bridge, along with Tomcat, is a great solution for integrating Java source code with PHP. Unfortunately its installation procedure was not well documented.