|
From: <php...@li...> - 2007-09-07 21:00:45
|
I believe I ran into the same error at one point. If I remember right, the way I fixed it was by removing the war file from Tomcat completely, deleting the folder named JavaBridge in the Tomcat folder (if this fails you'll need to restart first), then adding it back to the folder (thus deploying it and recreating the JavaBridge folder--effectively reinstalling the bridge)
Also, make sure that PHP does NOT load the php_java extension. It doesn't need it and it may be where the function is already being declared.
Hope this helps.
--Nathan Shaskin
Compliance Publishing
php...@li... wrote: Help! I ran into a bizarre problem that I simply don't understand.
As soon as I include the PHP/Java bridge in my code (i.e. as soon as I
include the following statement in my PHP file):
------------------------------
...
require_once('http://localhost:8080/JavaBridge/java/Java.inc');
...
------------------------------
I am getting the following PHP error:
------------------------------
Fatal error: Cannot redeclare java_last_exception_get() in
http://localhost:8080/JavaBridge/java/Java.inc on line 1431
------------------------------
Not only is the include done using "require_ONCE()" (capitalization
here for emphasis only), but the Java.inc also is internally
additionally guarded by:
------------------------------
if(!function_exists("java_get_base")) {
...
function java_get_base() {
...
}
... lost of stuff among them also:
function java_last_exception_get() {
...
}
}
?>
------------------------------
So, IMHO it should NEVER EVER be possible that anything contained in
this file is ever redeclared.
And why is the error only at the function
"java_last_exception_get(...)" which is somewhere after the middle of
the file, while there are lots of other functions declared before it,
which - if for some reason the file would indeed be re-read - should
already cause errors much earlier...
I simply don't understand what's going in here. Anyone who had similar
encounters and/or can shed some light onto this?
I am using this XAMPP v1.6.3a (a ready-packed combination of Apache
v2.2.4 & PHP v5.2.3 & Zend Optimizer v3.3.0 & MySQL v5.0.45 - see
http://www.apachefriends.org/en/xampp-windows.html) plus the Tomcat
v6.10.13 -addon (on which I run the JavaBridge.war file).
on WinXP Pro.
Michael
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
|