Answered
CF8 Java object init error
I am having a little trouble with a java object that used to
work fine on CF7 but now doesn't work on CF8. I have submitted a
request to our address correction software vendor (QAS) that they
provide me with a version that is compatible with CF8 but was
hoping perhaps someone could shed a little light on why it might be
failing.
I'm not much of a Java developer and I've never seen the source for the QAS jar files, but my best guess is that it may have something to do with this statement I found on the colfusion 8 documentation:
"The init method is not a method of the object, but a ColdFusion identifier that calls the new function on the class constructor. So, if a Java object has an init method, a name conflict exists and you cannot call the object's init method."
Here is the error I get:
Object Instantiation Exception.
An exception occurred when instantiating a Java object. The class must not be an interface or an abstract class. Error: ''.
The error occurred in C:\ColdFusion8\CustomTags\QAS.cfm: line 111
Called from C:\Inetpub\seesroot\seesweb\fc.cfm: line 148
109 : <!--- Create the QuickAddress Object and set the engine and picklist type --->
110 : <cfset searchService = createObject('Java','com.qas.proweb.QuickAddress')>
111 : <cfset searchService.init(sWSDL)>
112 : <cfset searchService.setEngineType(searchService.VERIFICATION)>
113 : <cfset searchService.setFlatten(true)>
The sWSDL variable is set earlier in that QAS custom tag and contains a url to a local WSDL file:
16 : <cfscript>
17 : sWSDL = " http://localhost:2021/proweb.wsdl";
They have a .net implementation and I tried using that insted but I get the exact same error.
Thanks for any help you can offer.
I'm not much of a Java developer and I've never seen the source for the QAS jar files, but my best guess is that it may have something to do with this statement I found on the colfusion 8 documentation:
"The init method is not a method of the object, but a ColdFusion identifier that calls the new function on the class constructor. So, if a Java object has an init method, a name conflict exists and you cannot call the object's init method."
Here is the error I get:
Object Instantiation Exception.
An exception occurred when instantiating a Java object. The class must not be an interface or an abstract class. Error: ''.
The error occurred in C:\ColdFusion8\CustomTags\QAS.cfm: line 111
Called from C:\Inetpub\seesroot\seesweb\fc.cfm: line 148
109 : <!--- Create the QuickAddress Object and set the engine and picklist type --->
110 : <cfset searchService = createObject('Java','com.qas.proweb.QuickAddress')>
111 : <cfset searchService.init(sWSDL)>
112 : <cfset searchService.setEngineType(searchService.VERIFICATION)>
113 : <cfset searchService.setFlatten(true)>
The sWSDL variable is set earlier in that QAS custom tag and contains a url to a local WSDL file:
16 : <cfscript>
17 : sWSDL = " http://localhost:2021/proweb.wsdl";
They have a .net implementation and I tried using that insted but I get the exact same error.
Thanks for any help you can offer.