Skip to main content
Support

KB Article #179933

NoClassDefFoundError, when trying to save Scripting filter in Policy Studio

Problem

  • Pop up error when saving a Policy Studio Scripting filter, script includes class like com.vordel.mime.Multipart or FormURLEncodedBody or XMLBody
  • NoClassDefFoundError: Unable to load class [...] due to missing dependency com/sun/mail/util/QPDecoderStream or QPEncoderStream
  • Problem occurs on any 7.5.x Policy Studio, but does not occur on 7.6.x versions.

Resolution

This issue was fixed in 7.6.0, but unfortunately not in 7.5.3. However the workaround is not difficult.


The workaround is to copy the mail.jar from the API Gateway installation to the system running Policy Studio, then add that jar as a runtime dependency.

Steps:

  • From an API GW server copy the current mail jar to your Policy Studio system(s).
    • Ex for 7.5.3: find the mail-1.4.7.jar located in the <APIGW_INSATLL_DIR>/system/lib/modules/ directory, then copy that to a directory on the machine where you run Policy Studio.
  • In policy Studio add the jar by:
    • In your Policy Studio on the File, Edit, Tools, etc. bar; select Window > Preferences > Runtime Dependencies.
    • Click Add to select the mail-1.4.7.jar file.
    • Click Apply when finished. Copies of these JAR files are added to the plugins directory in your Policy Studio installation.
    • Stop policy studio and start it with the 'policystudio -clean' command. Note that it may take a little bit longer for Policy Studio to start then usual during the first run.