From: <php...@li...> - 2008-04-24 11:27:27
|
I am having a strange problem on certain boxes with the JavaBridge. It works fine on others. The following is logged: --------------------------- Apr 24 11:57:00 VMBridge ERROR: An exception occured: java.net.SocketException: Connection reset java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at php.java.bridge.Parser.read(Parser.java:86) at php.java.bridge.Parser.parse(Parser.java:163) at php.java.bridge.Request.handleRequest(Request.java:377) at php.java.bridge.Request.handleRequests(Request.java:485) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Apr 24 11:57:00 VMBridge DEBUG: contextfactory: context destroyed (remove context factory): ContextFactory: Context# 29@, credentials: [no credentials], SimpleContextFactory: class php.java.bridge.http.SimpleContextFactory, current loader: sun.misc.Launcher$AppClassLoader@11b86e7 Apr 24 11:57:00 VMBridge DEBUG: contextfactory: removed context: ContextFactory: Context# 29@, credentials: [no credentials], SimpleContextFactory: class php.java.bridge.http.SimpleContextFactory, current loader: sun.misc.Launcher$AppClassLoader@11b86e7, # of contexts: 0 Apr 24 11:57:00 VMBridge DEBUG: contextfactory: servlet done waiting for ContextFactory 13480046 for 30000 ms Apr 24 11:57:00 VMBridge DEBUG: end (thread returned to pool): Thread[VMBridgeHttpServerThreadPool#1,5,VMBridgeHttpServerThreadPool#1] Apr 24 11:57:00 VMBridge DEBUG: end (thread returned to pool): Thread[JavaBridgeContextRunner#1,5,JavaBridgeContextRunner#1] --------------------------- The PHP code is pretty simple and straightforward. When the line $batchQuery->addStationData( $stationData ); is activated, the bridge (or PHP) crashes (and the http request from the Browser is killed, so it might be PHP/Apache dying). On other machines (even with older JavaBridge), it works fine. <?php $class_path = null; $class_path .= 'jet-upload-shared.jar;'; $class_path .= 'jet-log-loader-client.jar;'; $class_path .= 'mediatel-utils.jar;'; $class_path .= 'jbossall-client.jar;'; $class_path .= 'jboss-aop-jdk50-client.jar;'; $class_path .= 'jboss-aspect-jdk50-client.jar;'; $class_path .= 'jboss-ejb3-client.jar;'; $class_path .= 'jnp-client.jar;'; $class_path .= 'deml-client.jar;'; $class_path .= 'de-client.jar;'; $class_path .= 'mtier-client.jar;'; $class_path .= 'log4j.jar'; require_once('Java.inc'); java_require( $class_path ); $batchList = new Java( "java.util.ArrayList" ); $indexValue = 1; $station['rajar_wave'] = 141; $station['rajar_wavelength'] = 6; $station['audience_id'] = 1149; $station['rsl'] = 95; $batchQuery = new Java( "uk.mediatel.de.wrappers.BatchQuery", $indexValue, 'impacts', (int)$station['rajar_wave'], (int)$station['rajar_wavelength'], (int)$station['audience_id'] ); // Specify the RSL codes for the stations we are dealing with $stationData = new Java( "uk.mediatel.de.wrappers.StationData", (int)$station['rsl'] ); echo 'indexValue = ' . $indexValue.'<hr>'; echo 'rajar_wavelength = '.(int)$station['rajar_wavelength'].'<hr>'; echo 'rajar_wave = '.(int)$station['rajar_wave'].'<hr>'; echo 'audience_id = '.(int)$station['audience_id'].'<hr>'; echo 'rsl = '.$station['rsl'].'<hr>'; //WHEN THE FOLLOWING LINE IS ACTIVATED, THE BRIDGE OR PHP CRASHES //$batchQuery->addStationData( $stationData ); echo "ok"; exit; ?> Any suggestions are welcome! Cheers, Antonio |