Post Upgrade to 16.0.3 Via Process GEL Scripts Connecting to External MS SQL Server Database Fails
search cancel

Post Upgrade to 16.0.3 Via Process GEL Scripts Connecting to External MS SQL Server Database Fails

book

Article ID: 256519

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

Post upgrade to 16.0.3, using external connection as MS SQL Server in the process fails with example error:

Error : org.apache.commons.jelly.JellyTagException: null:101:32: <sql:update> Unable to get connection, DataSource invalid: "No suitable driver found for jdbc:sqlserver://localhost:1433;databaseName=clarity"

Steps to Reproduce

  1. On Clarity server running Oracle
  2. Create a process with GEL Script
  3. Activate and run the process


Expected Results: The process should be able to connect to external connection and finish 


Actual Results: The process errors with below error stack 

BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:6:83: <sql:query> Unable to get connection, DataSource invalid: "No suitable driver found for jdbc:sqlserver://<host>:1433;DatabaseName=clarity;" at org.apache.commons.jelly.tags.sql.SqlTagSupport.getConnection(SqlTagSupport.java:156) at com.niku.union.gel.tags.sql.QueryTag.getConnection(QueryTag.java:57) at org.apache.commons.jelly.tags.sql.QueryTag.doTag(QueryTag.java:134) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:248) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:248) at com.niku.union.gel.GELScript.run(GELScript.java:58) at com.niku.union.gel.GELController.invoke(GELController.java:79) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:217) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
 
 

Environment

Release : 16.0.3 and onwards 

Cause

This is due to how connection classes are handled in clarity 

Resolution

  • Create a tag in properties.xml in order for clarity to connect to an external connection 

 <database id="Test" jndiDatabaseId="jdbc/TestDS" vendor="mssql" serviceName="niku" serviceId="Test" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;DatabaseName=clarity;encrypt=false" username="Test" password="<Some Password>" schemaName="Test" upgradeStatus="upgradeNotNeeded"/>

 

Additional Information

By default, the GEL script will look for the Clarity drivers in the external 'database' element in the CSA.
In recent testing, the 'driver' declaration is not required in the GEL script.