|
From: <php...@li...> - 2008-10-09 23:45:24
|
I am unable to install php-java-bridge on ubuntu 8.04 and was hoping someone could point me in the right direction. ubuntu 8.04 apache2 (2.2.8-1ubuntu0.3) php5 (5.2.4-2ubuntu5.3) tomcat5.5 (5.5.25-5ubuntu1.1) java-6-sun-1.6.0.06 all installed from .deb package archives and working fine without modification change tomcat/server.xml to listen on 8080 instead of 8180 (apache2 on 80) extracted JavaBridge.war (from php-java-bridge_5.3.2.1_j2ee.zip) into /var/lib/tomcat5.5/webapps restart tomcat and .war extracted/deployed ok symlink /var/www/JavaBridge to JavaBridge http://localhost:8080/JavaBridge gives me error HTTP Status 404 - Servlet PhpCGIServlet is not available http://localhost:80/JavaBridge gives me the index page but none of the bridge examples work. I'm not too familiar with tomcat and the error messages unfortunately don't mean much to me. Please help Cees fwiw, this is what http://localhost:80/JavaBridge/sessionSharing.php shows me protocol error: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Could not initialize class php.java.bridge.http.ContextServer org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:294) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:619) root cause java.lang.NoClassDefFoundError: Could not initialize class php.java.bridge.http.ContextServer php.java.servlet.PhpJavaServlet.init(PhpJavaServlet.java:101) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:619) |
|
From: <php...@li...> - 2008-10-10 10:07:11
|
Hi,
this is not a tomcat issue, it is a Java problem.
Unlike .NET the Java platform doesn't have a module system, so that changes to the run-time environment can cause such errors.
Java works around this problem by using separate class loaders for different paths. For example if foo has been compiled against bar1 but the current loader cannot access bar1 (even though it is available from another loader), you will get the error message: NoClassDefFoundError: foo cannot be instanciated (or foo cannot be found). You will *not* get a clear error message saying that bar1 is not available, that's why nobody can debug such problems.
Please remove all JavaBridge.jar and all php-servlet.jar and all php-script.jar libraries from the system, clean the temp and the work/Catalina dir and try again.
If that still fails, re-install the entire environment. The problem will vanish after that.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-10-13 00:57:06
|
It must be something else I'm not getting. New install of ubuntu-8.04 server (LAMP), sun-java6-jdk, tomcat5.5, php5-cgi Tomcat working fine (tomcat5.5-webapps) and apache2/php5 working fine. However, deployed JavaBridge.war. Still a problem 404 error, Servlet PhpCGIServlet is not available fwiw, running standalone (no tomcat) as java -jar JavaBridge.jar SERVLET:8080 3 javabridge_servlet.log does work, both http://localhost:8080/test.php and http://localhost/JavaBridge/test.php give ok result Cees |
|
From: <php...@li...> - 2008-10-13 15:15:27
|
Hi,
sounds as if you tomcat installation cannot start a standard web application.
Please either use a standard Tomcat installation instead of check the tomcat error log and pass that information on to the debian tomcat maintainer.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-10-13 01:47:48
|
I have just discovered that this is a Tomcat issue in /etc/default/tomcat5.5 # Use the Java security manager? (yes/no, default: yes) # WARNING: Do not disable the security manager unless you understand # the consequences! # NOTE: java-gcj-compat-dev currently doesn't support a security # manager. #TOMCAT5_SECURITY=yes changing this to TOMCAT5_SECURITY=no fixes the problem and javabridge works as expected. Can someone please explain what the consequences of this is ? cheers Cees |
|
From: <php...@li...> - 2008-10-13 15:25:21
|
Hi, > # WARNING: Do not disable the security manager unless you > understand the consequences! Don't use the debian-patched tomcat, unless you understand the consequences. :) > Can someone please explain what the consequences of this is It forbits access to PHP. However, if you use the debian-patched tomcat, you must fix more than just this setting. For example debian starts tomcat using a user-switch, leaving all environment variables untouched. This means that user.home points to /root (!) even though tomcat is running as user tomcat. Please either use Andre's PHP/Java Bridge debian port or install a standard tomcat download from http://tomcat.apache.org. Regards, Jost Boekemeier |