From: <php...@li...> - 2007-05-31 15:44:09
|
After upgrading from 3.0.7 to 4.0.7, it looks like I can't use foreach() over a HashSet. It implements Collection, so in theory, it should work (it used to), but a NoSuchMethodException is thrown over a call to "getIterator". HashSet has an iterator() method (like all Collections), so I'm curious why the Bridge is attempting to call getIterator() on my behalf. Exception pasted below. Thanks for your help, Jonathan [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:HashSet]]->getIterator. Cause: java.lang.NoSuchMethodException: getIterator(). Candidates: [] Responsible VM: 1.5.0_08@http://java.sun.com/" at: #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1106) #-4 php.java.bridge.Request.handleRequest(Request.java:342) #-3 php.java.bridge.Request.handleRequests(Request.java:388) #0 http://localhost:8080/JavaBridge/java/Java.inc(151): java_ThrowExceptionProxyFactory->getProxy(50, true) #1 http://localhost:8080/JavaBridge/java/Java.inc(304): java_Arg->getResult(true) #2 http://localhost:8080/JavaBridge/java/Java.inc(310): java_Client->getWrappedResult(true) #3 http://localhost:8080/JavaBridge/java/Java.inc(489): java_Client->getResult() #4 http://localhost:8080/JavaBridge/java/Java.inc(735): java_Client->invokeMethod(49, 'getIterator', Array) #5 http://localhost:8080/JavaBridge/java/Java.inc(853): java_JavaProxy->__call('getIterator', Array) #6 http://localhost:8080/JavaBridge/java/Java.inc(886): Java->__call('getIterator', Array) #7 C:\deploy\merged\php-client\IndivoAPI.class.php(974): JavaObject->getIterator() #8 C:\deploy\merged\php-client\IndivoAPI.class.php(932): IndivoAPI->updateDocument('d961ccb2-a7ca-4...', 'usr4038835@indi...', 'usr4038835@indi...', Object(java_InternalJavaObject), 'urn:org:indivo:...', '0597a897-d50f-4...') #9 C:\websites\indivo\phplib\personal.function.php(298): IndivoAPI->updateDocumentWithObject('d961ccb2-a7ca-4...', 'usr4038835@indi...', 'Sample User', 'patient', 'usr4038835@indi...', Object(java_InternalJavaObject), 'urn:org:indivo:...', '0597a897-d50f-4...') #10 [internal function]: saveDemographics(Array) #11 C:\websites\indivo\phplib\xajax_0.2.4\xajax.inc.php(997): call_user_func_array('saveDemographic...', Array) #12 C:\websites\indivo\phplib\xajax_0.2.4\xajax.inc.php(656): xajax->_callFunction('saveDemographic...', Array) #13 C:\websites\indivo\viewer.php(19): xajax->processRequests(true) #14 {main}] |