bthirupathireddy

Getting NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils

0 votes

Hi 

We are using onespan integration in Guidewire 8.0.7 version and I was able to create the package in my local environment . we promoted our code to the one of testing environment. When we click save draft package button on the onespanpackagepopupscreen we are getting the NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils exception. We tried different ways to resolve this issue but none of them worked. We really have no clue why this class is not being able to recognized by the compiler at runtime. 

 


Reply to: Getting NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils

0 votes

Hi  bthirupathireddy,

 

Thanks for your post! I am not aware we have the class under this path - The only OneSpanJSONUtils I can find is under acc.oneSpan package. However, the path gw/accelerators/onespan does sound familiar to me, could you advise where in the code does it (either the class, or the path) get referenced?

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

Thanks Duo for replying. 

Initially onespan package was present in acc.onespan only later we moved entire folder to new path which is gw.accelerators.onespan.

I have gone thorough the tomcat logs and able to identify the root cause of the issue. we have folder json in onespan package which has all json related java classes.

There is a reference "gw.accelerators.onespan.json.Json" in OneSpanJsonUtil.gs class which is considering as invalid by the JVM and throwing following exception

INFO: java.io.IOException: gw.lang.parser.exceptions.ParseResultsException: OneSpanJSONUtils.gs

Errors: 

"gw.accelerators.onespan.json.Json" is not a valid type.

how to make this class compiled by JVM ? please suggest 


Reply to: Getting NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils

0 votes

It's strange we have json folder in our onespan code package. I have attached my folder structure. Can you share onespanJsonutil.gs class references and path where they are getting referenced from ?

 


Attachments

Reply to: Getting NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils

0 votes

In your class you are not even referencing "uses acc.onespan.json.Json " you are using uses gw.lang.reflect.json.Json. But in my local I don't have this file in respective jar file. Will you please share the jar file where gw.lang.reflect.json.Json getting referenced ?

 

OneSpanScreenshot


Reply to: Getting NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils

0 votes

we are implementing onespan integration for GW v8.0.7. Can you share this "gosu-core-api-1.13.31.jar" file I will try with Jar file


Reply to:

0 votes

I am not sure if this will introduce any conflict since it's part of the gosu core APIs. Before you trying to do that, is this your team who manually added the utility library (the json folder) to the "gw/acc/accelerators/onespan" path? Could you share the files under the "gw/acc/accelerators/onespan" to [email protected], so that I can have a better understanding what changes have been made on top of the original code?

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

We are able to resolve this issue and we are not getting that exception in our testing environment. I have committed all .class files of JSON library as a Jar file. Thanks for help. 

but in testing environment we are not able to create package we are getting this exception "The specified user cannot be found." although the sender APIkey is different and recipient is different. I didn't get this error in my local environment. What should I do to fix this issue ?


Reply to:

0 votes

From the error message "The specified user cannot be found.", it sounds like you are specifying sender in the transaction creation UI, while the sender is not under the current API Key holder's account? If that's the case, you could do a quick test by removing the sender, or double confirm and use a sender that is available under the account.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Getting NoClassDefFoundError: gw/accelerators/onespan/OneSpanJSONUtils

0 votes

Thanks I entered the wrong APIkey that's it was unable to aunthenticate the user. Thanks Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off