|
From: <php...@li...> - 2008-02-20 06:19:59
|
Hi Jost, I have done exactly this: >Basically users should be able to install the bridge with 3 simple steps: > >1. Rename JavaBridge.war to myApp.war and add all needed Java and PHP libraries to the > myApp.war > >2. Copy myApp.war to the J2EE autodeploy folder, wait until the directory myApp appears > >3. Copy the directory myApp over to the Apache or IIS document root > >4. Browse to http://yourHost.com/myApp and run the PHP/Java applications. my test.php is like this: <?php echo $_SERVER['SERVER_PORT']."\n"; require_once("http://192.168.15.62:8080/myApp/java/Java.inc"); java_require("Test.jar"); $system = java("java.lang.System"); echo " OS: ".$system->getProperty("os.name")."\n"; $test = java("Test"); echo "plz work \n"; ?> I am trying to run the test.php on apache and the log is this: [Wed Feb 20 01:07:06 2008] [error] [client 192.168.15.62] PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:JavaBridge]]->updateJarLibraryPath((o:String)[o:String], (o:String)[o:String], (o:String)[o:String], (o:String)[o:String]). Cause: java.io.IOException: Could not open jar file Test.jar, reason: The system cannot find the file specified Responsible VM: 1.5.0_09@http://java.sun.com/" at:\n#-30 php.java.bridge.DynamicJavaBridgeClassLoader.checkJarFile(DynamicJavaBridgeClassLoader.java:108)\n#-29 php.java.bridge.JarLibraryPath.createUrls(JarLibraryPath.java:193)\n#-28 php.java.bridge.JarLibraryPath.checkURLs(JarLibraryPath.java:118)\n#0 http://192.168.15.62:8080/myApp/java/Java.inc(259): java_ThrowExceptionProxyFactory->getProxy(1, NULL, true)\n#1 http://192.168.15.62:8080/myApp/java/Java.inc(409): java_Arg->getResult(true)\n#2 http://192.168.15.62:8080/myApp/java/Java.inc(415): java_Client->getWrappedResult(true)\n#3 http://192.168.15.62:8080/myApp/java/Java.inc(619): java_Client->getResult()\n#4 http://192.168.15.62:8080/myApp/java/Java.inc(1609): java_Cl in http://192.168.15.62:8080/myApp/java/Java.inc on line 222 before the deployment of the JavaBridge would at least produce the default set of test / example pages but now trying to get at the 192.168.15.62:8080/myApp just hangs - with this at the end of the log Feb 19, 2008 11:19:08 PM org.apache.catalina.core.ApplicationContext log INFO: f892a4@70be88 --> <S v="#0 http://192.168.15.62:8080/myApp/java/Java.inc(259): java_ThrowExceptionProxyFactory->getProxy(1, NULL, true) #1 http://192.168.15.62:8080/myApp/java/Java.inc(409): java_Arg->getResult(true) #2 http://192.168.15.62:8080/myApp/java/Java.inc(415): java_Client->getWrappedResult(true) #3 http://192.168.15.62:8080/myApp/java/Java.inc(619): java_Client->getResult() #4 http://192.168.15.62:8080/myApp/java/Java.inc(1609): java_Client->invokeMethod(0, 'updateJarLibrar...', Array) #5 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\myApp\test.php(7): java_require('Test.jar') #6 {main}" /> Feb 19, 2008 11:19:08 PM org.apache.catalina.core.ApplicationContext log INFO: f892a4@70be88 --> </Y> Feb 19, 2008 11:19:08 PM org.apache.catalina.core.ApplicationContext log INFO: f892a4@70be88 <-- <S v="W1tvOkV4Y2VwdGlvbl06ImphdmEubGFuZy5FeGNlcHRpb246IEludm9rZSBmYWlsZWQ6IFtbbzpK YXZhQnJpZGdlXV0tPnVwZGF0ZUphckxpYnJhcnlQYXRoKChvOlN0cmluZylbbzpTdHJpbmddLCAo bzpTdHJpbmcpW286U3RyaW5nXSwgKG86U3RyaW5nKVtvOlN0cmluZ10sIChvOlN0cmluZylbbzpT dHJpbmddKS4gQ2F1c2U... i have tried exact as you said - and a whole lot more, i love php AND java and i really need this to work! plz more help :( ~tim |