<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Problem using HSBCHashGenerator CFX</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_advanced?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Tue, 30 Sep 2014 13:50:05 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-09-30T13:50:05Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Problem using HSBCHashGenerator CFX</title>
      <link>https://forums.adobe.com/message/6777179?tstart=0#6777179</link>
      <description>&lt;!-- [DocumentBodyStart:0bc207a0-ba20-4fab-85b6-d364434abf0e] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Just a little update:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If I put cpitools.jar into /opt/coldfusion10/cfusion/wwwroot/WEB-INF/classes&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And then add /opt/coldfusion10/cfusion/wwwroot/WEB-INF/classes into the ColdFusion Class Path, the error changes to this:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000; font-family: verdana, arial, helvetica, sans-serif; font-size: xx-small;"&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #000000; font-family: verdana, arial, helvetica, sans-serif; font-size: xx-small;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;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?!&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;OK - the answer is not to use CFX at all!&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Just instantiate a JavaObject and call its method:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfset HashGenerator = createObject("java","com.clearcommerce.CpiTools.security.HashGenerator")&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfset OrderHash = HashGenerator.generateHash(v,ss)&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:0bc207a0-ba20-4fab-85b6-d364434abf0e] --&gt;&lt;img src='/beacon?t=1415919225621' /&gt;</description>
      <pubDate>Tue, 30 Sep 2014 12:59:03 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6777179?tstart=0#6777179</guid>
      <dc:date>2014-09-30T12:59:03Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Problem using HSBCHashGenerator CFX</title>
      <link>https://forums.adobe.com/message/6776937?tstart=0#6776937</link>
      <description>&lt;!-- [DocumentBodyStart:eafe3e10-6858-4180-a819-635507574ec6] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Upgrading from MX7 to 10.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Got a .jar file "cpitools.jar" which I've put into /opt/coldfusion10/jre/lib&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If I do a jar -tf on it, I get:&lt;/p&gt;&lt;p&gt;com/clearcommerce/CpiTools/security/Encrypter.class&lt;/p&gt;&lt;p&gt;com/clearcommerce/CpiTools/security/HashGenerator.class&lt;/p&gt;&lt;p&gt;com/clearcommerce/CpiTools/security/SecCrypto.class&lt;/p&gt;&lt;p&gt;META-INF/MANIFEST.MF&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I've registered it in the CFIDE:&lt;/p&gt;&lt;p&gt;TagName: &lt;a class="jive-link-external-small" href="http://hzhsep14b.dmclub.net/CFIDE/administrator/extensions/cfx_javaedit.cfm?tagname=CFX%5FHSBCHashGenerator&amp;amp;csrftoken=9B9068358313CE2E26802683F8C9DDD7A68186EF" rel="nofollow"&gt;CFX_HSBCHashGenerator&lt;/a&gt;&lt;/p&gt;&lt;p&gt;ClassName: com.clearcommerce.CpiTools.security.HashGenerator&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;BUT when I try to call it...&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;CFX_HSBCHashGenerator SharedSecret="#ss#" HashElement="#datainput#"&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I get the error message: The CFX custom tag CFX_com.clearcommerce.CpiTools.security.HashGenerator was not found in the custom tag database. You must add custom tags to the database before using them. If you have added your tag to the database, check the spelling of the tag within your template to ensure that it matches the database entry.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;-----&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So when it says "you must add custom tags to the database" - it's referring to the registration of the Java CFX, right?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So I've done that. so I check the spelling of the tag - looks OK to me (and it is unchanged since the functional MX7 code).&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Obviously the mapping is working to some extent - CF was clever enough to realise that when I say &amp;lt;CFX_HSBCHashGenerator...., I am referring to something with "com.clearcommerce.CpiTools.security.HashGenerator".&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So what's my blindingly obvious in retrospect error?!&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:eafe3e10-6858-4180-a819-635507574ec6] --&gt;</description>
      <pubDate>Tue, 30 Sep 2014 12:50:23 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6776937?tstart=0#6776937</guid>
      <dc:date>2014-09-30T12:50:23Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

