java-cfenv changes special characters in the password of DB2 jdbc connection strings
search cancel

java-cfenv changes special characters in the password of DB2 jdbc connection strings

book

Article ID: 298176

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

With upgrading to a TAS version that includes java_buildpack_offline  v4.62.0 or v4.63.0 (2.11.45-48, 2.13.27-30, 4.0.9-12 or 5.0.2) users can experience issues while using DB2 connections since those 2 builpacks version add a new framework, java_cf_env, which supplies the Java CfEnv library to Spring Boot 3 apps, instead of the deprecated Spring AutoReconfiguration library and changes special characters in the password when using DB2, due to url enconding. 

The related error would look like the following.
com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10214][10050][4.32.28] java.util.Properties object passed to java.sql.Driver.connect() cannot be overridden by URL: jdbc:db2://DB2dns.entry.de:0815/TEST_DB0T:user=USER1;password=XXXXXXXXX;. ERRORCODE=-4461, SQLSTATE=42815


Environment

Product Version: 4.0

Resolution

Java Buildpack v4.63.1+ fixes the issue.

Users can either upgrade the builpack or upgrade TAS to a version that includes it, such as 2.11.49+, 2.13.31+, 4.0.13+ or 5.0.3+.