Not able to connect Tibco EMS over SSL from gateway.

Document ID : KB000098922
Last Modified Date : 31/05/2018
Show Technical Document Details
Issue:
Further investigation, we try to access the published service end point using the JMS end point. We got a response back with PolicyResultStatus="Internal Server error" 

In logs with FINE level tracing, we get more info and stack trace of the erro : 
..... 
2018-05-21T09:44:55.032+1000 FINE 1004 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -3: Request Header: accept:application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*, accept-encoding:gzip, deflate, accept-language:en-AU, connection:Keep-Alive, host:test.nonprod, user-agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) 
2018-05-21T09:44:55.033+1000 FINE 1004 com.l7tech.server.policy.assertion.ServerAuditDetailAssertion: -3: Request: 
2018-05-21T09:44:55.033+1000 WARNING 1004 com.l7tech.server.policy.assertion.ServerJmsRoutingAssertion: 4: Caught unexpected Throwable in outbound JMS request processing: Could not initialize class com.tibco.security.TIBCOSecurity; Could not initialize class com.tibco.security.TIBCOSecurity. Exception caught! 
java.lang.NoClassDefFoundError: Could not initialize class com.tibco.security.TIBCOSecurity 
at com.tibco.tibjms.TibjmsSSL.initialize(TibjmsSSL.java:1820) 
at com.tibco.tibjms.TibjmsxLinkSSL._initSSL(TibjmsxLinkSSL.java:269) 
at com.tibco.tibjms.TibjmsxLinkSSL.connect(TibjmsxLinkSSL.java:397) 
at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1359) 
at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:4333) 
at com.tibco.tibjms.TibjmsQueueConnection.<init>(TibjmsQueueConnection.java:39) 
at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:200) 
at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:253) 
at com.tibco.tibjms.TibjmsQueueConnectionFactory.createQueueConnection(TibjmsQueueConnectionFactory.java:89) 
at com.tibco.tibjms.naming.TibjmsContext$Messenger.request(TibjmsContext.java:325) 
at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:657) 
at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:491) 
at javax.naming.InitialContext.lookup(InitialContext.java:417) 
at com.l7tech.server.transport.jms.JmsServiceLocator.lookup(Unknown Source) 
at com.l7tech.server.transport.jms.JmsUtil.connect(Unknown Source) 
at com.l7tech.server.transport.jms.JmsUtil.connect(Unknown Source) 
at com.l7tech.server.transport.jms2.JmsResourceManager.a(Unknown Source) 
at com.l7tech.server.transport.jms2.JmsResourceManager.getConnection(Unknown Source) 
at com.l7tech.server.transport.jms2.JmsResourceManager.doWithJmsResources(Unknown Source) 
at com.l7tech.server.policy.assertion.ServerJmsRoutingAssertion.checkRequest(Unknown Source) 
at com.l7tech.server.policy.assertion.composite.ServerCompositeAssertion.iterateChildren(Unknown Source) 
at com.l7tech.server.policy.assertion.composite.ServerAllAssertion.checkRequest(Unknown Source) 
at com.l7tech.server.policy.ServerPolicy.checkRequest(Unknown Source) 
........ 

All TibcoEMS lib jar file are in place as expected with right permission.
All tibco jar files are taken from TibcoEMS installation.
I could see the class in question exists as part of tibcrypt.jar. 
-------------------------------------------- 
[root@server1 ~]# ll -h /opt/SecureSpan/Gateway/runtime/lib/ext/ 
total 4.3M 
-rw-r--r-- 1 layer7 layer7 63K May 15 12:07 javax.jms-api-2.0.1.jar 
-rw-r--r-- 1 layer7 layer7 3.3M May 15 12:07 ojdbc7.jar 
-rw-r--r-- 1 layer7 layer7 386K May 21 08:45 tibcrypt.jar 
-rw-r--r-- 1 layer7 layer7 152K May 21 08:45 tibjmsadmin.jar 
-rw-r--r-- 1 layer7 layer7 16K May 21 08:45 tibjmsapps.jar 
-rw-r--r-- 1 layer7 layer7 386K May 21 08:45 tibjms.jar 
-rw-r--r-- 1 layer7 layer7 14K May 21 08:45 tibrvjms.jar 
---------- 
 
Resolution:

Configuring SSL in EMS Clients 
To use an SSL connection to the EMS server, a client must include these JAR files in the CLASSPATH. 
• tibcrypt.jar 
• slf4j-api-1.5.2.jar 
• slf4j-simple-1.5.2.jar 
These JARs are included with the TIBCO Enterprise Message Service installation ... 

Adding those missing two .jar files for sl4j in our Gateway installation and it is all happy and working like a charm. 
complete list of .jar files we have for tibco EMS: 

javax.jms-api-2.0.1.jar 
slf4j-api-1.5.2.jar 
slf4j-simple-1.5.2.jar 
tibcrypt.jar 
tibjmsadmin.jar 
tibjmsapps.jar 
tibjms.jar 
tibrvjms.jar