web stats
Import Custom JAR inside MIRTH. ( - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-07-2016, 11:27 AM
Awdesh Awdesh is offline
What's HL7?
Join Date: Jun 2016
Posts: 1
Awdesh is on a distinguished road
Default Import Custom JAR inside MIRTH. (

I am using MIRTH to call to external API endpoint which is https. Since MIRTH doesn't inherently has capability to call to https, it throws ssl exception. I created a jar which will allow localhost to bypass ssl checking. Now I put that jar inside MirthConenct->custom-lib folder. Below is my jar's structure.

package Mirth.ssl;
public class TrustSSLCerts{
............. }
from Transformer's javascript writer I do


foo() {
var ssl = new TrustSSLCerts();
On deploying channel and sending dummy data, it errors out-:

ReferenceError: "TrustSSLCerts" is not defined.

I am running MIRTH ( Any help regarding that is highly appreciated.
Reply With Quote
Old 07-08-2016, 01:30 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
Join Date: Oct 2013
Location: Portugal
Posts: 280
AlexNeiva is on a distinguished road

Hello Awdesh,

after you copy the jar file to custom-lib did you restart Mirth Service?
i use a more updated Mirth version but i use jar files too and to call them out i do:

var obj = new Packages.Mirth.ssl();
var ret = obj.TrustSSLCerts();
and at first glance i see that you are calling a class and not a function... try calling a function inside your class.


package Mirth.ssl;

public class TrustSSLCerts
           public static void MySSL()
then on Mirth:

var obj = new Packages.Mirth.ssl.TRustSSLCerts();
var ret = obj.MySSL();
Give it a try.

Best Regards
Reply With Quote

custom, import, jar, reference error

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 05:01 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation