From: <php...@li...> - 2010-06-02 02:39:47
|
Hi, Am trying to get JavaBridge "installed" on Tomcat but not having much luck. I'm working on Ubuntu 9.10 Desktop and have installed Tomcat6 using "sudo apt-get install tomcat6 tomcat6-admin tomcat6-examples tomcat6-docs" and I get the Tomcat "It works!" page via http://localhost:8080/. The Tomcat Web Application Manager and Tomcat Virtual Host Manager also work. PHP5 was installed via "sudo apt-get install php5-cli php5-cgi" and have I modified "/etc/php5/cgi/php.ini" so that "allow_url_include = On". Following http://php-java-bridge.sourceforge.net/pjb/installation.php, and running "java -classpath JavaBridge.war TestInstallation" I get no errors: Starting a simple servlet engine: [/usr/lib/jvm/java-6-sun-1.6.0.20/jre/bin/java, -jar, /home/bernard/Desktop/JB/./ext/JavaBridge.jar, SERVLET_LOCAL:8083] Jun 02 12:13:29 JavaBridge INFO : VM : 1.6.0_20@http://java.sun.com/ Jun 02 12:13:29 JavaBridge INFO : JavaBridge version : 6.1.2.1 Jun 02 12:13:29 JavaBridge INFO : logFile : Jun 02 12:13:29 JavaBridge INFO : default logLevel : 3 Jun 02 12:13:29 JavaBridge INFO : socket : SERVLET_LOCAL:8083 Jun 02 12:13:29 JavaBridge INFO : java.ext.dirs : /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/ext:/usr/java/packages/lib/ext Jun 02 12:13:29 JavaBridge INFO : php.java.bridge.base: /home/bernard Jun 02 12:13:29 JavaBridge INFO : thread pool size : 20 Jun 02 12:13:29 JavaBridge INFO : JavaBridgeRunner started on port INET_LOCAL:8083 Invoking php: [/usr/bin/php-cgi, -n, -d, allow_url_include=On, /home/bernard/Desktop/JB/./test.php] Now check the /home/bernard/Desktop/JB/./RESULT.html. Read the INSTALL.J2EE and/or INSTALL.J2SE documents. I dropped JavaBridge.war into CATALINA_HOME (/usr/share/tomcat6) and nothing happened - no autodeploy. I restarted Tomcat and still nothing. I moved JavaBridge.war to CATALINA_BASE (/var/lib/tomcat6) and the autodeployment happened. I then browsed to http://localhost:8080/JavaBridge and I get a 404 page. Restarting Tomcat has no effect. Looking at /var/lib/tomcat6/logs/catalina.2010-06-02.log I noticed: 02/06/2010 1:38:52 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive JavaBridge.war 02/06/2010 1:38:55 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart 02/06/2010 1:38:55 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/JavaBridge] startup failed due to previous errors Also there's this exception trace in /var/lib/tomcat6/logs/localhost.2010-06-02.log, but not sure if it's a red herring: 02/06/2010 1:38:55 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class php.java.servlet.ContextLoaderListener java.lang.ExceptionInInitializerError at php.java.bridge.Util$Logger.<init>(Util.java:108) at php.java.servlet.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:138) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:902) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1326) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:636) Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /tmp/tomcat6-temp read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) at java.security.AccessController.checkPermission(AccessController.java:553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkRead(SecurityManager.java:888) at java.io.File.exists(File.java:748) at php.java.bridge.Util.initGlobals(Util.java:372) at php.java.bridge.Util.<clinit>(Util.java:58) ... 21 more Thanks (yet again)! Bernard. _________________________________________________________________ If It Exists, You'll Find it on SEEK. Australia's #1 job site http://clk.atdmt.com/NMN/go/157639755/direct/01/ |
From: <php...@li...> - 2010-06-02 07:04:44
|
Hi Bernhard, when we say tomcat, we mean tomcat from http://tomcat.apache.org If you want to use some other software, please contact its vendor for support. > Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /tmp/tomcat6-temp read) Sounds as if you have installed some software which cannot read its own temp directory. Please download and install tomcat from http://tomcat.apache.org. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-06-02 12:42:15
|
I have a similar problem with 64bit system. Can someone please volunteer to help with the installation. I can setup a server with credentials. I'd be happy to pay for your time. Server is 64bit ubuntu 9.04 If you are trying to run java code from php and not vice versa ( run php on tomcat) you don't need tomcat do you? I'm not sure I understand how things work because on the 32-bit system I turn off tomcat and php is still able to instatiate java objects. Thanks, Jordan On Wed, Jun 2, 2010 at 12:04 AM, < php...@li...> wrote: > Hi Bernhard, > > > when we say tomcat, we mean tomcat from http://tomcat.apache.org > > If you want to use some other software, please contact its vendor for > support. > > > > Caused by: java.security.AccessControlException: access denied > (java.io.FilePermission /tmp/tomcat6-temp read) > > Sounds as if you have installed some software which cannot read its > own temp directory. > > > Please download and install tomcat from http://tomcat.apache.org. > > > Regards, > Jost Bökemeier > > > ------------------------------------------------------------------------------ > > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2010-06-02 14:59:12
|
Hi Jordan, > I'm not sure I understand how things > work because on the 32-bit system I turn off tomcat and php is still able to > instatiate java objects if you installed the PHP Apache- or command line SAPI, you can call a (remote-) server simply by fetching Java.inc. Whether or not PHP is 64 or 32 bit, or the Java VM is 64 or 32 bit doesn't matter. The XML protocol will take care of the details. Please download JavaBridge.jar and start it: java -jar JavaBridge.jar SERVLET:8087 4 "" In your PHP scripts add: require_once("http://yourServerRunningJavaBridgejar.com:8087/JavaBridge/java/Java.inc"); to the beginning of your script. That's all. Regards, Jost Bökemeier On 6/2/10, php...@li... <php...@li...> wrote: > I have a similar problem with 64bit system. Can someone please volunteer to > help with the installation. I can setup a server with credentials. I'd be > happy to pay for your time. > > Server is 64bit ubuntu 9.04 > > If you are trying to run java code from php and not vice versa ( run php on > tomcat) you don't need tomcat do you? I'm not sure I understand how things > work because on the 32-bit system I turn off tomcat and php is still able to > instatiate java objects. > > Thanks, > Jordan > > On Wed, Jun 2, 2010 at 12:04 AM, < > php...@li...> wrote: > >> Hi Bernhard, >> >> >> when we say tomcat, we mean tomcat from http://tomcat.apache.org >> >> If you want to use some other software, please contact its vendor for >> support. >> >> >> > Caused by: java.security.AccessControlException: access denied >> (java.io.FilePermission /tmp/tomcat6-temp read) >> >> Sounds as if you have installed some software which cannot read its >> own temp directory. >> >> >> Please download and install tomcat from http://tomcat.apache.org. >> >> >> Regards, >> Jost Bökemeier >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users >> > ------------------------------------------------------------------------------ > > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |