|
From: <php...@li...> - 2010-01-17 19:18:21
|
Hi, like other containers (EJB for example), the PHP/Java Bridge container terminates the current transaction if a java.lang.RuntimeException or java.lang.Error crosses the container boundary. However, it does not terminate it immediately, to give you a chance to clear the error condition before the PHP script terminates. Please see http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaProxy.inc.html#functionjava_last_exception_clear for details. Please see our FAQ entry "Why doesn't the bridge throw a java.lang.RuntimeException or Error as a PHP JavaException by default?" > [[o:Response$ > UndeclaredThrowableErrorMarker]]->execSelect. Cause: > java.lang.NoSuchMethodException: execSelect(). Candidates: [] VM: please take a look at the error message again; your code: $query = Java("com.hp.hpl.jena.query.QueryFactory")->create($sparqlString); //---OK. has thrown a java.lang.Error or java.lang.RuntimeException, which is reported as a PHP warning. In the next step you ignore the warning, take the RuntimeException and try to invoke execSelect() on it, which fails, of course. If you want java.lang.Error and java.lang.RuntimeException to fail fast, define("JAVA_PREFER_VALUES", true) before including Java.inc. Regards, Jost Boekemeier |