how to resolve the Error "Sql Exception java.sql.SQLException: Please specify the drivers folder location correctly" which occurs after deploying SAP plugin application using active TID manager on a docker container
book
Article ID: KB0083630
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for SAP Solutions
8.1.1
Description
Issue: After deploying an SAP plugin application which uses a TID manager in active state on a Docker container ,the following error will be thrown. The error states that the SAP plugin is unable to find the JDBC JAR file which is required in order to establish a connection with the database.
Cause: At both design time and run time, the SAP plug-in only uses the drivers in the BW_HOME/bw/ version_number/config/design/thirdparty directory. If this directory does not exist, we have to create one and upload drivers to this directory. However, when working with the BWCE, this folder does not get generated. This is because the bwcf.zip which is the runtime zip file for the BWCE does not have this directory structure. Even if the JDBC drivers are added to the base image using the steps as mentioned in the section "Extending the Base Docker Image" in the User Guide of BWCE, this will not work due to the fact that SAP plugin refers to "BW_HOME/bw/ version_number/config/design/thirdparty" location for the driver JAR files.
Issue/Introduction
How to resolve the Error "Sql Exception java.sql.SQLException: Please specify the drivers folder location correctly" which occurs after deploying SAP plugin application using active TID manager on a Docker container.
Environment
Docker
Resolution
To resolve this one can follow either of the two steps mentioned below
STEP 1 (if the BWCE base image is not created) a) Extract the runtime bwcf.zip file. b) Create a directory named "design" under "bwce_cf\tibco.home\bwce\2.3\config" directory. c) Create a directory named "thirdparty" under "bwce_cf\tibco.home\bwce\2.3\config\design" directory d) Copy the JDBC drivers/jars under "bwce_cf\tibco.home\bwce\2.3\config\design\thirdparty" directory. e) After performing above steps create a new zip file and use it for creating the BWCE base image.
STEP 2 (if the base image is already created and the application container is running) a) Get the container ID or name of the application container using the command: docker ps b) Login to the application container using the command: docker exec -it <Container ID> /bin/bash c) Once logged in Go to "/tmp/tibco.home/bwce/2.3/config" d) Create a directory named "design" under "/tmp/tibco.home/bwce/2.3/config" directory using mkdir. e) Create a directory named "thirdparty" under "/tmp/tibco.home/bwce/2.3/config/design" directory using mkdir. f) Copy the required driver JAR files in a temporary location in your system. g) From the temporary folder on your system or from the directory "/tmp/tibco.home/bwce/2.3/config/design/thirdparty" inside the container copy the JAR driver files using the command below.
docker cp CONTAINER:SRC_PATH DEST_PATH
OR
docker cp SRC_PATH CONTAINER:DEST_PATH
where SRC_PATH=path of the jar file. For Ex :"/home/temporaryfolder/xyz.jar" and CONTAINER=name of the container. For Ex: XYZ and DEST_PATH= path where the jar needs to be copied. For Ex: "/tmp/tibco.home/bwce/2.3/config/design/thirdparty/xyz.jar"
Example of the command:
docker cp XYZ:/home/temporaryfolder/xyz.jar/tmp/tibco.home/bwce/2.3/config/design/thirdparty/xyz.jar
OR
docker cp /home/temporaryfolder/xyz.jarXYZ:/tmp/tibco.home/bwce/2.3/config/design/thirdparty/xyz.jar
h) Once the files are copied, restart the application container using the command:
docker restart CONTAINER
where CONTAINER=name/ID of container
Example of command: docker restart XYZ