Connecting to Oracle Database in Java using Wallets


Below is the reference —

https://stackoverflow.com/questions/7634196/what-is-correct-jdbc-url-syntax-if-oracle-wallets-are-used

I had missed to add the additional imports and set the oracle.net.wallet_location properly. I set the property using the command and restarted the job to fix the issue.

System.setProperty("oracle.net.tns_admin",tnsAdminEnv);
System.setProperty("oracle.net.wallet_location",tnsAdminEnv);

Libraries imported –>

		<!-- https://mvnrepository.com/artifact/com.oracle.database.security/oraclepki -->
		<dependency>
			<groupId>com.oracle.database.security</groupId>
			<artifactId>oraclepki</artifactId>
			<version>23.2.0.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.oracle.database.security/osdt_cert -->
		<dependency>
			<groupId>com.oracle.database.security</groupId>
			<artifactId>osdt_cert</artifactId>
			<version>21.11.0.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.oracle.database.security/osdt_core -->
		<dependency>
			<groupId>com.oracle.database.security</groupId>
			<artifactId>osdt_core</artifactId>
			<version>21.11.0.0</version>
		</dependency>