spring-boot


Spring boot web application not working with oracle wallet


I am working on spring boot on both command line runner and web application. Both applications require to be implemented with oracle wallet, so I implemented the oracle wallet. The command line runner is able to connect to database using spring jdbc template using oracle datasource but same configuration is not been able to create the bean for datasource object. When same has been implemented with database user name and password, I am able to connect.
I am taking help from this post - [Connect to Oracle DB from Spring-jdbc with Oracle Wallet authentification
with code similar to,
System.setProperty("oracle.net.tns_admin", "path/to/your/tnsnames");
OracleDataSource ds = new OracleDataSource();
Properties props = new Properties();
props.put("oracle.net.wallet_location", "(source=(method=file)(method_data=(directory=path/to/your/wallet)))");
ds.setConnectionProperties( props );
ds.setURL("jdbc:oracle:thin:/#dbAlias"); //dbAlias should match what's in your tnsnames
return ds;
I have all my properties set from application.properties of boot application and I am getting null pointer exception on creating the datasource.
Any pointer or help in this regard will be much appreciated.
Thanks in advance,
Sandip

Related Links

STS - Cannot start a Spring-Starter-Project using gradle after upgrading to buildship-eclipse-gradle-plugin 2.0
Why did deprecate method locations in #ConfigurationProperties?
Spring Boot #SpringBootApplication Annotation is not working for classes in different packages
Spring batch using spring boot
Couchbase query exception on runtime Unsupported parameter type for key: class com.couchbase.client.protocol.views.Query
Can i use SNMP4J for Spring boot web-based application to monitor when application functionality?
Java compiler version for Maven build of a Spring Boot product
Redirect to login page during java.sql.SQLException: Timed out waiting for a free available connection
How to block Cassandra from trying to connect automatically
How do you copy stomp websocket sessions to redis in spring
Polling S3 bucket for files and processing using spring integration aws
Sharing session between Sails JS and Spring Boot
spring boot java.io.EOFException: null
looking for a sample code for springboot, activemq(topic)
Spring Data JPA Multiple Data Sources
how automaticly access control to path url without using #preAuthorize and has permisson in spring boot

Categories

HOME
airflow
google-cloud-pubsub
oracle-sqldeveloper
gaussian
pandoc
squeak
datetimepicker
artifactory
checkpoint
autocad
servicenow
symfony-3.2
clip-path
yacc
rtc
element
lambda-calculus
popup
responsive
exchange-transport-agents
web-testing
infopath
jsfiddle
multibinding
cucumberjs
views
google-street-view
draw2d
summernote
ajaxcontroltoolkit
coccinelle
screen-scraping
ckeditor4.x
deployment-descriptor
pydub
boost-log
blockly
directions
oracle-nosql
webclient
zimbra
headphones
pymunk
azure-vm-scale-set
mkdir
border-layout
rtsp
quartz
servicebus
remap
import.io
openxava
wink
liferay-ide
opticalflow
disassembly
mac-app-store
db2-zos
trendline
wordpress-plugin
fadein
nonblocking
controlpanel
newlib
joomla3.3
nmock
fileinputstream
stderr
accpac
dockerpy
indices
quickfixn
javadb
nsurlrequest
redmine-plugins
livescript
telerik-appbuilder
xps
slimscroll
class-library
object-oriented-database
scidb
wpd
coinbase-php
junction-table
pageload
string-length
openafs
beep
parsec
mysql-connector
project-files
log-shipping
cryptolicensing
database-agnostic
morfik
bootstrap-protocol

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App