HTTP service using server type Tomcat fails to start when REST/JSON plug-in is installed

HTTP service using server type Tomcat fails to start when REST/JSON plug-in is installed

book

Article ID: KB0071517

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 5.14.1, 5.15.0

Description

The following exception is thrown
 
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [NonLoginAuthenticator[StandardEngine[TomcatEngine-1681743413859].StandardHost[localhost].StandardContext[]]]

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;

The issue is caused by BW using the Servlet API JAR from REST/JSON plug-in installation (%BW_PLUGINS_HOME%/lib) instead of the one from %TPCL_HOME%/tomcat/9/lib.

Issue/Introduction

HTTP service using server type Tomcat fails to start when REST/JSON plug-in is installed

Resolution

To resolve the issue, the classpath needs to be updated so that the Servlet API JAR from Tomcat lib directory is used.

Designer -
Add %TPCL_HOME%/tomcat/9/lib as the first entry to tibco.env.CUSTOM_CP_EXT in designer.tra

Deployed application -
Add %TPCL_HOME%/tomcat/9/lib as the first entry to tibco.env.CUSTOM_EXT_PREPEND_CP in bwengine.tra. Then redeploy the application.

Another option is to use server type HttpComponent in HTTP Connection.