Skip navigation
Currently Being Moderated

Cybersource error on Coldfusion 9

Oct 8, 2009 10:44 AM

We are trying to upgrade to Coldfusion 9 but we can't upgrade our cybersource implementation. We keep getting an error related to RSA libraries. I wonder if CF 9 includes some new libraries that have a conflict with Cybersource. Any ideas?

 

 

 

Error StackTrace:

java.lang.NoSuchMethodError: com.rsa.jsafe.CryptoJ.isFIPS140Compliant()Z

at com.rsa.certj.CertJ.isFIPS140Compliant(Unknown Source)

at com.rsa.certj.CertJ.(Unknown Source)

at com.cybersource.security.SecurityContextJava.(SecurityContextJava.jav a:155)

at com.cybersource.security.SecurityContext.getInstance(SecurityContext. java:31)

at com.cybersource.ws.client.Signature.internalInitializeContext(Signatu re.java:104)

at com.cybersource.ws.client.Signature.(Signature.java:39)

at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:200)

at com.cybersource.ws.client.Client.runTransaction(Client.java:103)

at com.cybersource.ws.client.Client.runTransaction(Client.java:53)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:97)

at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)

 

 
Replies
  • Currently Being Moderated
    Oct 17, 2009 1:19 PM   in reply to EstebanD

    Did you ever make any progress on this.  I'm running up against the same error, but I'm seeing it on CF 8 and 9.  What version are you using?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 7, 2009 12:51 PM   in reply to EstebanD
    We are trying to upgrade to Coldfusion 9 but we can't upgrade our cybersource implementation. We keep getting an error related to RSA libraries. I wonder if CF 9 includes some new libraries that have a conflict with Cybersource. Any ideas?

    I do indeed believe Coldfusion 9 introduces JARs containing new RSA libraries that conflict with the Cybersource code. It is likely that Cybersource has to update its libraries.

     

    I would send the error stack trace to Cybersource Support, explaining that the error is so severe it makes their product unusable. That should get them interested. After all, their name features in the stack trace.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 28, 2010 6:00 AM   in reply to BKBK

    Has anyone found a solution to this? I'm going in circles with Cybersource and they cannot tell me anything. They cannot even say which versions of CF they support but clearly the issue here is they do not support Coldfusion 9.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 5, 2010 11:21 PM   in reply to jmh2006

    Can someone running CF9 try a test for me on a _development_ box.

     

    Put the following jars in  WEB-INF\lib and restart. Run the basic checkout.cfm example.

     

    cybs-cfm.jar
    cybsclients15.jar
    cybssecurity.jar
    xercesImpl.jar **
    xalan.jar **

     

    ** Note: Use the versions provided by cybersource

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2010 12:24 AM   in reply to -==cfSearching==-

    What, you mean the stuff one can download from here:

    http://apps.cybersource.com/cgi-bin/pages/dev_kits.cgi?kit=Java/All_Pl atforms ?

     

    checkout.cfm ran fine... but then again it's just a form.  checkout2.cfm errors with:

     

    Object Instantiation Exception.
    Class not found: CyberSource

     

    This is a bit odd, because it is there in cybs-cfm.jar.

     

    Still... I don't know exactly what your expectations are of this test you're asking people to run...?

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2010 4:46 PM   in reply to Adam Cameron.
    What, you mean the stuff one can download from here:

    http://apps.cybersource.com/cgi-bin/pages/dev_kits.cgi?kit=Java/All_Pl atforms ?

     

     

    Yep, the Simple Order API. My request was really directed to others in the thread already with familiar with the setup and issues. That and lack of sleep account for the glaring absence of details. But thanks for testing it with so little information to go on.

     

    Still... I don't know exactly what your expectations are of this test you're asking people to run...?

     

    I  was trying to get cybersource working w/Tomcat 6 and was also  experiencing problems.  Adding all five jars (not just four) to  WEB-INF\lib seemed to resolve it.  I was curious if that change had any impact  on other configurations.  As presumably, the majority of people are not  using Tomcat.

     

    Class not found: CyberSource
    This is a bit odd, because it is there in cybs-cfm.jar.

     

    ClassNotFoundException or NoClassDefFoundError?  NoClassDefFoundError usually means the class loader is having a problem  loading the class's "definition" for some reason, not that it cannot  find the physical class. I was receiving a lot of  NoClassDefFoundError's at first. But since cybersource and CF seem to share  several libraries (rsa, xalan and xerces) I was not really surprised.

     

     

     

    Anyway, I finally caved in and installed a fresh copy of CF9 + built-in web server this morning. Lo-and-behold installing the jars exactly as described in the readme file worked.  Explicitly adding the jars to the java.class.path in jvm.config seemed to be the critical difference.  For what it is worth, here is what I ended up with.

     

    {cf_root}\WEB-INF\lib:

    cybs-cfm.jar
    cybsclients15.jar
    cybssecurity.jar
    xercesImpl.jar

     

    jvm.config snippet (abs. paths for clarity)

    # JVM classpath
    java.class.path={application.home}/servers/lib,{application.home}/../l ib/macromedia_drivers.jar,{application.home}/lib/cfmx_mbean.jar,{appli cation.home}/../lib/oosdk/classes,{application.home}/../lib/oosdk/lib, {application.home}/lib,C:/dev/ColdFusion9/wwwroot/WEB-INF/lib/cybs-cfm .jar,C:/dev/ColdFusion9/wwwroot/WEB-INF/lib/cybsclients15.jar,C:/dev/C oldFusion9/wwwroot/WEB-INF/lib/cybssecurity.jar,C:/dev/ColdFusion9/www root/WEB-INF/lib/xercesImpl.jar

     

    Message was edited by: -==cfSearching==-

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2010 5:11 PM   in reply to -==cfSearching==-
    ... w/Tomcat 6 ...Adding all five jars (not just four) to  WEB-INF\lib seemed to resolve it.

     

    BTW: Being a relative Tomcat novice, I am not sure that was the right way to go. Just that it seems to be working so far.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 7:38 AM   in reply to EstebanD

    I'm also having a problem getting Coldfusion 9 and the Cybersource API to work together.  I tried adding the 4 jars to the WEB_INF folder under Coldfusion as mentioned in this thread but its still not working.  Cybersource support basically said I'm on my own with this.  I see the following in the coldfusion-event log:

     

    On CF Startup:

    error ROOT CAUSE:
    java.lang.NoSuchMethodError: com.rsa.jsafe.CryptoJ.isFIPS140Compliant()Z
        at com.rsa.certj.CertJ.isFIPS140Compliant(Unknown Source)
        at com.rsa.certj.CertJ.<init>(Unknown Source)
        at com.cybersource.security.SecurityContextJava.<init>(SecurityContextJa va.java:155)
        at com.cybersource.security.SecurityContext.getInstance(SecurityContext. java:31)
        at com.cybersource.ws.client.Signature.internalInitializeContext(Signatu re.java:104)
        at com.cybersource.ws.client.Signature.<clinit>(Signature.java:39)
        at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:200)
        at com.cybersource.ws.client.Client.runTransaction(Client.java:103)
        at com.cybersource.ws.client.Client.runTransaction(Client.java:53)
        at CyberSource.runTransaction(CyberSource.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:97)
        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
        at cfcheckout22ecfm959397778.runPage(C:\cybersource\simapi-java-5.0.2\co ldfusion\samples\nvp\checkout2.cfm:33)
        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
        at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363 )
        at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.ja va:48)
        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
        at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
        at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:7 4)
        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePers istenceFilter.java:28)
        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
        at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
        at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter. java:126)
        at coldfusion.CfmServlet.service(CfmServlet.java:200)
        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:8 9)
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:42)
        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
        at jrun.servlet.FilterChain.service(FilterChain.java:101)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 286)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 543)
        at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.ja va:203)
        at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:320)
        at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:428)
        at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

     

    javax.servlet.ServletException: ROOT CAUSE:
    java.lang.NoSuchMethodError: com.rsa.jsafe.CryptoJ.isFIPS140Compliant()Z
        at com.rsa.certj.CertJ.isFIPS140Compliant(Unknown Source)
        at com.rsa.certj.CertJ.<init>(Unknown Source)
        at com.cybersource.security.SecurityContextJava.<init>(SecurityContextJa va.java:155)
        at com.cybersource.security.SecurityContext.getInstance(SecurityContext. java:31)
        at com.cybersource.ws.client.Signature.internalInitializeContext(Signatu re.java:104)
        at com.cybersource.ws.client.Signature.<clinit>(Signature.java:39)
        at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:200)
        at com.cybersource.ws.client.Client.runTransaction(Client.java:103)
        at com.cybersource.ws.client.Client.runTransaction(Client.java:53)
        at CyberSource.runTransaction(CyberSource.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:97)
        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
        at cfcheckout22ecfm959397778.runPage(C:\cybersource\simapi-java-5.0.2\co ldfusion\samples\nvp\checkout2.cfm:33)
        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
        at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363 )
        at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.ja va:48)
        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
        at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
        at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:7 4)
        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePers istenceFilter.java:28)
        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
        at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
        at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter. java:126)
        at coldfusion.CfmServlet.service(CfmServlet.java:200)
        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:8 9)
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:42)
        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
        at jrun.servlet.FilterChain.service(FilterChain.java:101)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 286)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 543)
        at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.ja va:203)
        at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:320)
        at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:428)
        at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

     

        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:70)
        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
        at jrun.servlet.FilterChain.service(FilterChain.java:101)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 286)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 543)
        at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.ja va:203)
        at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:320)
        at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:428)
        at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

     

     

     

    On Submission:

    javax.servlet.ServletException: ROOT CAUSE:
    java.lang.NoClassDefFoundError: Could not initialize class com.cybersource.ws.client.Signature
        at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:200)
        at com.cybersource.ws.client.Client.runTransaction(Client.java:103)
        at com.cybersource.ws.client.Client.runTransaction(Client.java:53)
        at CyberSource.runTransaction(CyberSource.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:97)
        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
        at cfcheckout22ecfm959397778.runPage(C:\cybersource\simapi-java-5.0.2\co ldfusion\samples\nvp\checkout2.cfm:33)
        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
        at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363 )
        at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.ja va:48)
        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
        at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
        at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:7 4)
        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePers istenceFilter.java:28)
        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
        at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
        at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter. java:126)
        at coldfusion.CfmServlet.service(CfmServlet.java:200)
        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:8 9)
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:42)
        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
        at jrun.servlet.FilterChain.service(FilterChain.java:101)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 286)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 543)
        at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.ja va:203)
        at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:320)
        at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:428)
        at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

     

        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:70)
        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
        at jrun.servlet.FilterChain.service(FilterChain.java:101)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java: 286)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java: 543)
        at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.ja va:203)
        at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPoo l.java:320)
        at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j ava:428)
        at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool. java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

     

    I'm using the JVM that came with Cybersource under ColdFusion9/runtime/jre.  Should I be using a different JVM?  Everything was working fine under CF8 its just when we upgraded to CF9 that we hit a brick wall.  I'm on Windows Server 2003.

     

    Anyone else get Cybersource API working with Coldfusion 9?

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 7:56 AM   in reply to Cold Drink

    There is another .jar file (jsafeFIPS.jar) that you need to delete (and hope its not important) from the CF9 install. We got it working in a test environment but haven't done it in production since we wonder if the kludgy fix will cause other issues.  If Cybersource has decided not to support ColdFusion any longer the fix may be to get rid of Cybersource or run Cybersource from a server with CF7 or CF8.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 8:03 AM   in reply to Cold Drink

    Here is some info on the .jar file I mentioned (jsafeFIPS.jar):

     

    This jar file  implements RSA standards for FIPS compliance. I am not sure what cold fusion is  using it for.

     

    Let us know how it goes.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 10:47 AM   in reply to EstebanD

    Thanks for the quick responses.  I tried removing jsafeFIPS.jar, restarted CF and got the following error:

     

    error ROOT CAUSE:
    java.lang.NoSuchMethodError: com.rsa.jsafe.CryptoJ.isFIPS140Compliant()Z
        at com.rsa.certj.CertJ.isFIPS140Compliant(Unknown Source)

     

    So I put that file back then I downloaded the most recent java API from cybersource thinking that mght help.  Then I tried submitting with that (after making my key file path change, etc.) and I'm still getting the same error in the logs:

     

    error (JRun Service: ProxyService [jrun.servlet.jrpp.JRunProxyService@fde0d5]) JRunPRoxyServer.invokeRunnable:
    java.lang.IllegalStateException

     

    error ROOT CAUSE:
    java.lang.NoClassDefFoundError: Could not initialize class com.cybersource.ws.client.Signature
        at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:200)

     

     

    I made sure the class paths were in jvm.config.  Our server originally had CF8 on it, which I uninstalled before installing CF9.  I'm not sure why that would be an issue though.  EstebanD, did you install CF9 on a brand new server or did your server have an earlier version of CF on that server at one point?

     

    It wish Cybersource was more help.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 10:54 AM   in reply to EstebanD
    • The most important.. Set the cybersource library paths in

    C:\ColdFusion9\runtime\bin\jvm.config

     

    Yes, that was the critical difference for me.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 7, 2010 11:57 AM   in reply to -==cfSearching==-

    Apparently when you add items to the class path through the Administrator it puts the paths into the jvm.config file but puts them under jvm arguments instead of jvm classpath.  Is this a bug in CF9?  I don't know why it would add them to the arguments to vm.

     

    Anywho, that fixed it for me.  Thanks everyone for the help.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 7:36 AM   in reply to Cold Drink

    How do you even add a path via the administrator. I have some docs that tell me:

     

    --
    Add the absolute path to imagecr3.jar, in the installation directory, to your
    "ColdFusion Class Path" path in the CF Administrator. You will find this under "Server Settings",
    then "Java and JVM"
    ---

    and there is NO SUCH SETTING that I can see in the CF Admin.
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 8:01 AM   in reply to Krullion

    What version and edition of ColdFusion are you using?

     

    I also do not see a Java and JVM section on my ColdFusion.  I suspect it is because I am using the Enterprise - Multihome edition and this edition is set up as servers under a JRun4 java configuration rather then a JRun4 runtime inside a ColdFusion configuration which is what happens for the more common standard|stand-alone editions.

     

    As such, I suspect configuring JVM configurations is a more manual process of editing the appropiate files under the JRun4 directories as there are many more possible permutations in this type of setup.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 8:08 AM   in reply to Krullion

    It should mention (somewhere..) that is for server configurations only. I believe multi server configurations have a separate tool for modifying the jvm settings (?).  Either way, the settings are stored in jvm.config. So you can always modify that file manually. But be sure to make a backup first. If you mess it up, your server might not start.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 8:13 AM   in reply to -==cfSearching==-

    Hi, thanks for the response guys.... I'm running:

     

    Version        9,0,0,251028 

    Edition      Enterprise  

     

    And I have in fact tried modifying: C:\JRun4\bin\jvm.config

     

    I just need to add a single jar file... and it strips out my slashes... so, by the time I see it in the CF admin (path/settings,  etc) it looks like:

     

    C:JRun4serverslibimagecr3.jar;

     

    Jason

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 8:30 AM   in reply to Krullion

    You need to escape the slashes "
    ", or even better use "/" instead.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 1:20 PM   in reply to -==cfSearching==-

    -==cfSearching==- wrote:

     

    You need to escape the slashes "
    ", or even better use "/" instead.

     

    Thanks for the help... I need to clarify... between the spaces ad the escaping, I'm  a mess

     

    Here is what I think I am wanting in the jvm.config file. How's this look to you?

     

    java.class.path="C:"\"Program Files (x86)"\"Efflare"\"ImageCR3Service"

    Thanks.

     


     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 2:44 PM   in reply to Krullion

    >> java.class.path="C:"\"Program Files (x86)"\"Efflare"\"ImageCR3Service"

     

    I do not remember if you have to quote the spaces. But if you did, it would only be one set of quotes around the whole path.

     

    I am not near an example at the moment. But try something like:

     

    C:\\Program Files (x86)\\Efflare\\ImageCR3Service\\

     

    ... or

     

    C:/Program Files (x86)/Efflare/ImageCR3Service/

     

    Message was edited by: -==cfSearching==-

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 2:29 PM   in reply to Krullion

    Sorry, I forgot the forums tendency to reduce most email responses to complete gibberish.

     

    I updated the previous response and restored it to its original meaning ;-)

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2010 2:38 PM   in reply to -==cfSearching==-

    Thx so much for your efforts to help.

     
    |
    Mark as:
  • Currently Being Moderated
    May 4, 2012 8:04 AM   in reply to EstebanD

    Has anyone got CyberSource working at all on 64-bit ColdFusion/Windows Server?  I am at the end of my rope here, and not sure what else to do... I've tried everything and that seems to be the only thing in conflict withe EstabanD's setup.  I am getting the "com.rsa.jsafe.CryptoJ.isFIPS140Compliant()Z" error.

     
    |
    Mark as:
  • Currently Being Moderated
    May 4, 2012 12:11 PM   in reply to Fuuzio Bill

    I believe you need to use Cybersource's SOAP API for all 64bit OS.  I don't believe their Simple Order API works on 64bit, windows or linux.  I have SOAP running on 64 bit linux, and just create the xml and use cfhttp to post it to cybersource's server.  Let me know if you want me to PM the code. 

     
    |
    Mark as:
  • Currently Being Moderated
    May 4, 2012 12:16 PM   in reply to Cold Drink

    That would be AWESOME!  Thanks!!

     

    you can reach me at brainboxbill at gmail.  Thanks!!

     

    -Bill

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 11:16 AM   in reply to Cold Drink

    I've had a bunch of requests for the code so I'm just going to post it all here.  It's a simple cfm module page that just builds the xml and cfhttps it.

     

    For the cfhttp call, use https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor for test and https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor for production.

     

    You create the merchant key through the cybersource business center and add that to the cybersource_soap.cfm along with your username.

     

    The SOAP call was modified from Ben Nadel's site, hence all of the comments in the cybersource_soap.cfm page.

     

    I had an issue with our server not trusting the cybersource url in the cfhttp call and got a 500 error.  If you run into that, pull up https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor in Firefox and view page info go to Security - View Certificate - Details - then export the certificate.  Then import that into your keystore on your server.

     

    I'm open to any suggestions to improve the code.  It was one of those projects where I needed to find a way to get it up and running quickly and I haven't touched it since.  Here's the code:

     

    cybersource_soap.cfm page:

    <cfscript>

    if(not isdefined("attributes.action")) attributes.action = "create";

    if(not isdefined("attributes.merchantReferenceCode")) attributes.merchantReferenceCode = "";

    if(not isdefined("attributes.type")) attributes.type = "";//one-time credit card charge=0, monthly charge=1

    if(not isdefined("attributes.firstName")) attributes.firstName = "";//required

    if(not isdefined("attributes.lastName")) attributes.lastName = "";//required

    if(not isdefined("attributes.street1")) attributes.street1 = "";//required

    if(not isdefined("attributes.street2")) attributes.street2 = "";

    if(not isdefined("attributes.city")) attributes.city= "";//required

    if(not isdefined("attributes.state")) attributes.state = "";//required

    if(not isdefined("attributes.postalCode")) attributes.postalCode = "";//required

    if(not isdefined("attributes.country")) attributes.country = "";//required

    if(not isdefined("attributes.phoneNUmber")) attributes.phoneNumber = "";

    if(not isdefined("attributes.email")) attributes.email = "";//required

    if(not isdefined("attributes.grandTotalAmount")) attributes.grandTotalAmount = "";

    if(not isdefined("attributes.card_accountNumber")) attributes.card_accountNumber = "";//required

    if(not isdefined("attributes.card_expirationMonth")) attributes.card_expirationMonth = "";//required

    if(not isdefined("attributes.card_expirationYear")) attributes.card_expirationYear = "";//required

    if(not isdefined("attributes.card_type")) attributes.card_type = "";//required

    if(not isdefined("attributes.card_cvNumber")) attributes.card_cvNumber = "";//needed for authorization

    if(not isdefined("attributes.ccCaptureService_run")) attributes.ccCaptureService_run = "true";//required

    if(not isdefined("attributes.merchant")) attributes.merchant = "";

    if(not isdefined("attributes.subscription_title")) attributes.subscription_title = "";

     

    //subscription specific fields

    if(not isdefined("attributes.subscriptionInfo_frequency")) attributes.subscriptionInfo_frequency = "monthly";//required for subscription

    if(not isdefined("attributes.subscriptionInfo_amount")) attributes.subscriptionInfo_amount = "";//required for subscription FIELD:recurringSubscriptionInfo_amount

    if(not isdefined("attributes.subscriptionInfo_numberOfPayments")) attributes.subscriptionInfo_numberOfPayments = "0";//required for subscription FIELD:recurringSubscriptionInfo_numberOfPayments

    if(not isdefined("attributes.subscriptionInfo_startDate")) attributes.subscriptionInfo_startDate = "";//required for subscription FIELD:recurringSubscriptionInfo_startDate

    if(not isdefined("attributes.subscriptionID")) attributes.subscriptionID = "";

     

    //other fields

    if(not isdefined("attributes.merchantDefinedData_field1")) attributes.merchantDefinedData_field1 = "";

    if(not isdefined("attributes.merchantDefinedData_field2")) attributes.merchantDefinedData_field2 = "";

    if(not isdefined("attributes.merchantDefinedData_field3")) attributes.merchantDefinedData_field3 = "";

    if(not isdefined("attributes.merchantDefinedData_field4")) attributes.merchantDefinedData_field4 = "";

    if(not isdefined("attributes.merchantSecureData_field4")) attributes.merchantSecureData_field4 = "";

    if(not isdefined("attributes.comments")) attributes.comments = "";

    </cfscript>

     

    <cfset username = "[YOUR CYBERSOURCE USERNAME]">

    <cfset merchantKey = "[YOUR CYBERSOURCE MERCHANTKEY]">

     

    <!--- charge --->

    <cfset soapBody="<?xml version=""1.0"" encoding=""UTF-8""?>

           <soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">

         <soapenv:Header>

              <wsse:Security xmlns:wsse=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec ext-1.0.xsd"" soapenv:mustUnderstand=""1"">

                   <wsse:UsernameToken xmlns:wsu=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti lity-1.0.xsd"" wsu:Id=""UsernameToken-23894119"">

                        <wsse:Username>#username#</wsse:Username>

                        <wsse:Password Type=""http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token -profile-1.0##PasswordText"">#merchantKey#</wsse:Password>

                   </wsse:UsernameToken>

              </wsse:Security>

         </soapenv:Header>">

            <cfset soapBody = soapBody & "

            <soapenv:Body>

            <requestMessage xmlns=""urn:schemas-cybersource-com:transaction-data-1.58"">

            <merchantID>#username#</merchantID>

            <merchantReferenceCode>#attributes.merchantReferenceCode#</merchantRe ferenceCode>">

            <cfif attributes.action is "create" or  attributes.action is "recharge">

            <cfset soapBody = soapBody & "

            <billTo>

            <firstName>#attributes.firstName#</firstName>

            <lastName>#attributes.lastName#</lastName>

            <street1>#attributes.street1#</street1>

            <city>#attributes.city#</city>

            <state>#attributes.state#</state>

            <postalCode>#attributes.postalCode#</postalCode>

            <country>#attributes.country#</country>

            <email>#attributes.email#</email>

            </billTo>">

            <cfif attributes.type EQ 0>

            <cfset soapBody = soapBody & "

            <item id=""0"">

            <unitPrice>#attributes.grandTotalAmount#</unitPrice>

            <quantity>1</quantity>

            </item>">

            </cfif>

            <cfset soapBody = soapBody & "

            <purchaseTotals>

            <currency>USD</currency>

            </purchaseTotals>

            <card>

            <accountNumber>#attributes.card_accountNumber#</accountNumber>

            <expirationMonth>#attributes.card_expirationMonth#</expirationMonth>

            <expirationYear>#attributes.card_expirationYear#</expirationYear>

            <cvNumber>#attributes.card_cvNumber#</cvNumber>

            <cardType>#attributes.card_type#</cardType>

            </card>">

            <cfif attributes.type EQ 1>

            <!--- subscription --->

            <cfset soapBody = soapBody & "

            <subscription>

            <title>#attributes.subscription_title#</title>

            <paymentMethod>Credit Card</paymentMethod>

            </subscription>

            <recurringSubscriptionInfo>

            <subscriptionID>#attributes.merchantReferenceCode#</subscriptionID>

            <amount>#attributes.subscriptionInfo_amount#</amount>

            <numberOfPayments>#attributes.subscriptionInfo_numberOfPayments#</num berOfPayments>

            <automaticRenew>false</automaticRenew>       

            <frequency>#attributes.subscriptionInfo_frequency#</frequency>       

            <startDate>#attributes.subscriptionInfo_startDate#</startDate>

            </recurringSubscriptionInfo>">      

            </cfif>

            <cfset soapBody = soapBody & "

            <merchantDefinedData>

            <field1>#attributes.merchantDefinedData_field1#</field1>

            <field2>#attributes.merchantDefinedData_field2#</field2>

            <field3>#attributes.merchantDefinedData_field3#</field3>

            <field4>#attributes.merchantDefinedData_field4#</field4>

            </merchantDefinedData>">

            <cfif attributes.action EQ "recharge">

            <cfset soapBody = soapBody & "

            <orderRequestToken>#attributes.requestToken#</orderRequestToken>">

            </cfif>

            <cfif attributes.type is 0>

            <cfset soapBody = soapBody & "

            <ccAuthService run=""true"" />

            <ccCaptureService run=""true"" />">

            <cfelseif attributes.type EQ 1>

            <cfset soapBody = soapBody & "

            <paySubscriptionCreateService run=""true"" />">

            </cfif>

            <cfelseif attributes.action is "credit">

            <!--- credit --->

            <cfset soapBody = soapBody & "

            <purchaseTotals>

            <currency>USD</currency>

            <grandTotalAmount>#attributes.grandTotalAmount#</grandTotalAmount>

            </purchaseTotals>

            <ccCreditService run=""true"">

            <captureRequestID>#attributes.requestID#</captureRequestID>

            <captureRequestToken>#attributes.requestToken#</captureRequestToken>

            </ccCreditService>">

            <cfelseif attributes.action is "retrieve">

            <!--- retrieve subscription information --->

            <cfset soapBody = soapBody & "

            <PaySubscriptionRetrieveService run=""true"" />

            <recurringSubscriptionInfo>

                <subscriptionID>#attributes.subscriptionID#</subscriptionID>

            </recurringSubscriptionInfo>">

            </cfif>

            <cfset soapBody = soapBody & "

            </requestMessage>

            </soapenv:Body>    

            </soapenv:Envelope>">

     

    <!--- <cfsetting showdebugoutput="no">

    <cfcontent type="text/xml">

    <cfoutput>#trim(soapBody)#</cfoutput>

    <cfabort> --->

     

     

    <cfset objSecurity = createObject("java", "java.security.Security") />

    <cfset storeProvider = objSecurity.getProvider("JsafeJCE") />

    <cfset objSecurity.removeProvider("JsafeJCE") />

     

     

    <!---

        Now that we have our SOAP body defined, we need to post it as

        a SOAP request to the website. Notice that

        when I POST the SOAP request, I am NOT required to append the

        "WSDL" flag to the target URL (this is only required when you

        actually want to get the web service definition).

    --->

    <cfhttp

        url="https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor" method="post"  result="httpResponse">

     

        <cfhttpparam type="header" name="Content-Type" value="application/soap+xml; charset=utf-8">

        <cfhttpparam type="header" name="Content-Length" value="#len(soapBody)#">

     

        <cfhttpparam

            type="xml"

            value="#trim(soapBody)#"

            />

     

     

        <!---

            Most SOAP action require some sort of SOAP Action header

            to be used.--->

     

        <cfhttpparam

            type="header"

            name="SOAPAction"

            value="runTransaction"

            />

     

        <!---

            I typically use this header because CHTTP cannot handle

            GZIP encoding. This "no-compression" directive tells the

            server not to pass back GZIPed content.

     

        <cfhttpparam

            type="header"

            name="accept-encoding"

            value="no-compression"

            />--->

     

        <!---

            When posting the SOAP body, I use the CFHTTPParam type of

            XML. This does two things: it posts the XML as a the BODY

            and sets the mime-type to be XML.

     

            NOTE: Be sure to Trim() your XML since XML data cannot be

            parsed with leading whitespace.

        --->

     

     

    </cfhttp>

     

     

    <!--- <cfset objSecurity.insertProviderAt(storeProvider, 1) /> --->

     

    <!---

        When the HTTP response comes back, our SOAP response will be

        in the FileContent atribute. SOAP always returns valid XML,

        even if there was an error (assuming the error was NOT in the

        communication, but rather in the data).

    --->

     

    <cfif find( "200", httpResponse.statusCode )>

     

        <!--- Parse the XML SOAP response. --->

        <cfset soapResponse = xmlParse( httpResponse.fileContent ) />

     

        <!--- Get reply nodes --->

        <cfset replyNodes = XmlSearch(#soapResponse#,"//*[ local-name() = 'replyMessage' ]")>

        <!--- <cfdump var="#replyNodes#"> --->

        <cfset reasonCode = replyNodes[1].XmlChildren[1].XmlText>

     

        <!--- Set caller variables --->

        <cfloop from="1" to="#arrayLen(replyNodes[1].XmlChildren)#" index="i">

            <cfset tempa = "#replyNodes[1].XmlChildren[i].XmlName#">

            <cfset tempa = rereplace(tempa,"c:","","one")>

            <cfset "#tempa#" = "#replyNodes[1].XmlChildren[i].XmlText#" >

            <cfset "caller.#tempa#" = evaluate(tempa)>

            <cfset "caller.#tempa#_#i#" = evaluate(tempa)>

           <!---  <cfoutput>#tempa#_#i# = #evaluate(tempa)#<br /></cfoutput>  --->

        </cfloop>

     

        <!---

            Query for the response nodes using XPath. Because the

            SOAP XML document has name spaces, querying the document

            becomes a little funky. Rather than accessing the node

            name directly, we have to use its local-name().

     

        <cfset responseNodes = xmlSearch(

            soapResponse,

            "//*[ local-name() = 'Subscriber.AddAndResubscribeResult' ]"

            ) />--->

     

        <!---

            Once we have the response node, we can use our typical

            ColdFusion struct-style XML node access.

     

        <cfoutput>

     

            Code: #responseNodes[ 1 ].Code.xmlText#

            <br />

            Success: #responseNodes[ 1 ].Message.xmlText#

     

        </cfoutput>--->

     

    <cfelse>

        <cfoutput> #httpResponse.statusCode# <br />msg2: #httpResponse.fileContent#</cfoutput>

    </cfif>

     

     

     

    calling page:

    <cfmodule template="cybersource_soap.cfm" subscription_title="" action="create" type="0" merchantReferenceCode="[UNIQUE ID NUMBER PER TRANSACTION]" street1="#billing_address#" firstName="#trim(billing_firstname)#" lastname="#trim(billing_lastname)#" city="#trim(billing_city)#" state="#trim(billing_state)#" postalCode="#trim(billing_zip)#" country="#trim(billing_country)#" phoneNumber="#trim(billing_phone)#" email="#trim(billing_email)#" card_type="[MASTERCARD, VISA, ETC]" card_accountNumber="#trim(ccNum)#" card_expirationMonth="#ccExpireMonth#" card_expirationYear="#ccExpireYear#" card_cvNumber="#ccCVN#" grandTotalAmount="#grandTotalAmount#" comments="">

     

    <cfdump var="#variables#">

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 21, 2012 3:25 PM   in reply to Cold Drink

    I have tried your code, Cold Drink, but have been unsuccessful.

     

    I get this response in the calling page:

    500 Internal Server Error

    msg2:  2012-09-21T22:15:18.038Z   wsse:InvalidSecurity  Security Data : No WS-Security Header

     

    I have imported all of the SSL certs for Cybersource and have been able to connect to their server with a get request and see the page so know that the certificates is not the issue.

     

    Has anyone run into this and if so what was their solutions.

     

    Thanks

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points