-
1. Re: Problem using HSBCHashGenerator CFX
alexlake Sep 30, 2014 6:50 AM (in response to alexlake)Just a little update:
If I put cpitools.jar into /opt/coldfusion10/cfusion/wwwroot/WEB-INF/classes
And then add /opt/coldfusion10/cfusion/wwwroot/WEB-INF/classes into the ColdFusion Class Path, the error changes to this:
A ClassCastingException occured. The CFX custom tag CFX_com.clearcommerce.CpiTools.security.HashGenerator needs to implement com.allaire.cfx.CustomTag interface. Ensure that you add this to your custom class.
If I understand this correctly, I can no longer use a generic Java class in CF10 - it HAS to be one that has some ColdFusion specific stubs added.
That sounds like a right royal PITA! I don't want to be messing around changing other people's .jar files and getting my hands dirty with Java. There MUST be a way around this, surely?!
OK - the answer is not to use CFX at all!
Just instantiate a JavaObject and call its method:
<cfset HashGenerator = createObject("java","com.clearcommerce.CpiTools.security.HashGenerator")>
<cfset OrderHash = HashGenerator.generateHash(v,ss)>
