[tcljava-user] java::cast issue.
Brought to you by:
mdejong
From: <PFi...@hb...> - 2005-10-27 09:03:55
|
I have an issue with java::cast. Java Code ************** "s" seems to be a hash returned by adminclient object. "s" is casted to type ObjectName then processed by Iterator. Set s = adminClient.queryNames(queryName, null); if (!s.isEmpty()) ################# nodeAgent = (ObjectName)s.iterator().next(); ################ else System.out.println("Node agent MBean was not found"); Jacl Code ************** "beanList" is the hash. Contains one element. See output below. Cannot cast. MSG is "could not cast from java.util.HashSet to javax.management.ObjectName". set beanList [ $AdminClientI queryNames $ObjectNameI $nullI ] puts [ $beanList toString ] puts "\n bean object dimensions are [ java::info dimensions $beanList ] " puts "\n bean object properties are [ java::info properties $beanList ]" set askTedPortalMBeanI [ [ java::cast ObjectName $beanList ] $beanList iterator next ] OutpuT ************** beanList is : [WebSphere:name=xxxxxxxxxxxxxxxxxxxxxxxxxx] bean object dimensions are 0 bean object properties are empty could not cast from java.util.HashSet to javax.management.ObjectName while executing "java::cast ObjectName $beanList " Regards. PATRICK FINNEGAN. =================================================== HBF Health Funds Inc. a registered organisation under the National Health Act HBF Insurance Pty Ltd ACN 009 268 277 This email is a confidential communication intended only for the named Addressee(s). If you are not that person any disclosure, copying, distribution or use of this email or the information in it is prohibited. Please notify us immediately by telephone, (+61) 08 9265 6111 or return email and delete this email. The views in this email may be personal to the author and not those of HBF. |