Skip to content

Using Cybersource SDK in Multiple Application on same server giving error #106

Open
@splashvarun

Description

@splashvarun

We are running two Web Application from a single Tomcat Server. Both applications have dependency on Cybersource SDK for payment processing. Calling cybersource api works from only first application. When 2nd application tries to access the API, we get following error:

com.cybersource.ws.client.ClientException: error constructing MAC: java.security.InvalidAlgorithmParameterException: unknown parameter type. at com.cybersource.ws.client.Client.runTransaction(Client.java:174) ~[cybersource-sdk-java-6.2.6.jar:?] at com.cybersource.ws.client.Client.runTransaction(Client.java:76) ~[cybersource-sdk-java-6.2.6.jar:?]

If we restart server, call second application first, that will work and other application will give error.
We have tried multiple environment as follows, but it still gives error:

  1. JRE 8, Tomcat 8, Cybersource SDK 6.2.4
  2. JRE 10, Tomcat 9, Cybersource SDK 6.2.6

The only workaround right now is to put cybersource SDK jar and all dependent Jar in tomcat library so that classes are loaded by the server class loader. This causes issue of distributing the application that we have, because we have to manage the cybersource related dependencies separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions