Not able to connect Tibco EMS over SSL from gateway.

Document ID : KB000098922
Last Modified Date : 31/05/2018
Show Technical Document Details
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/, application/, 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; Could not initialize class Exception caught! 
java.lang.NoClassDefFoundError: Could not initialize class 
at com.tibco.tibjms.TibjmsSSL.initialize( 
at com.tibco.tibjms.TibjmsxLinkSSL._initSSL( 
at com.tibco.tibjms.TibjmsxLinkSSL.connect( 
at com.tibco.tibjms.TibjmsConnection._create( 
at com.tibco.tibjms.TibjmsConnection.<init>( 
at com.tibco.tibjms.TibjmsQueueConnection.<init>( 
at com.tibco.tibjms.TibjmsxCFImpl._createImpl( 
at com.tibco.tibjms.TibjmsxCFImpl._createConnection( 
at com.tibco.tibjms.TibjmsQueueConnectionFactory.createQueueConnection( 
at com.tibco.tibjms.naming.TibjmsContext$Messenger.request( 
at com.tibco.tibjms.naming.TibjmsContext.lookup( 
at com.tibco.tibjms.naming.TibjmsContext.lookup( 
at javax.naming.InitialContext.lookup( 
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 

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: