The solution to this problem requires the elimination of two interrelated problems.
Firstly, there is no java/Java.inc file deployed in the original JavaBridge.war . It is generated, which is problematic due to the error you encountered that is hidden inside java/Java.inc .
Secondly, the java/Java.inc contains a variable that grows before it is initialized.
Fix these issues as follows:
- Download the JavaBridge.war file.
- Extract the
java/Java.inc file by calling: java -cp JavaBridge.war TestInstallation , according to the documentation . - Fix any errors that occur (for example, missing php5-cli).
- Edit
java/Java.inc . - Go to line 1994.
- Paste the following code directly above line 1994:
if (empty ($ client-> cancelProxyCreationTag)) {
$ client-> cancelProxyCreationTag = 0;
}
The else block (lines from 1989 to 1998) should resemble:
} else { $result=clone($client->cachedJavaPrototype); $result->__factory=$cacheEntry->factory; $result->__java=++$client->asyncCtx; $result->__signature=$cacheEntry->signature;
Save the file.
Then recreate the .war file as follows:
- Create a new, empty, temporary directory
- Unzip the original JavaBridge war file into a temporary directory.
- Move the
java directory to a temporary directory; make sure it contains the updated Java.inc file! - Archive of a broken
JavaBridge.war file. - Create a new version of JavaBridge.
For example, this may resemble:
mkdir temp unzip ../JavaBridge.war mv ../java . mv ../JavaBridge.war /tmp zip -r ../JavaBridge.war *
The problem must be resolved.
source share