Does any have good experience using CFOBJECT with Java?
Having a problem calling methods from an Object of type Iterator. The
MyHelper class in the below example has a method called
getExtensionListNames() that returns an Iterator (actually, it returns
list.keySet().iterator() where list is a TreeMap). When I try to access any
methods on the Iterator (e.g. myIterator.hasNext()) it bombs with
java.lang.IllegalAccessException.
Any suggestions would be appreciated.
Using: CF 5.0 & JRun 3.1
====
CFML
====
<CFOBJECT ACTION="CREATE" TYPE="Java" CLASS="MyHelper" NAME="myObj">
<cfscript>
myObj.init();
myObj.loadDataFromModel(); <!--- Loads data into TreeMap --->
myIterator = myObj.getExtensionListNames();
</cfscript>
<cfset bool = myIterator.hasNext()>
======
Result
======
Error Diagnostic Information
Unhandled System exception !
java.lang.IllegalAccessException: java/util/TreeMap$Iterator. Java exception
occurred in call to method.
The error occurred while processing an element with a general identifier of
(CFSET), occupying document position (26:1) to (26:35) in the template file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists