Home > Mobile >  POST API giving error that database not initialized for given JNDI Properties ? How to solve this is
POST API giving error that database not initialized for given JNDI Properties ? How to solve this is

Time:11-04

I am trying to make a small POST API, for which I want to use DBlookup using carbon Datasource. I have connected deployment.toml to Oracle 11.2 "XE" database by adding details in deployment.toml. However, when I run the server, I get this warning.

WARN {DBLookupMediator} - DataSource: XE was not initialized for given JNDI properties :{}

Why is this problem happening? Any leads would mean a lot. Thanks

I tried to write all code properly, using wso2 documentation. However, I am unable to connect it to oracle db as mentioned above errror comes as follows: * WARN {DBLookupMediator} - DataSource: XE was not initialized for given JNDI properties :{} * Below is the the configuration I added in deployment.toml:

[[datasource]]
id = "XE"
url = "jdbc:oracle:thin:@localhost:1521/XE"
username = "tcods"
password = "123"
driver = "oracle.jdbc.driver.OracleDriver"

CodePudding user response:

Try adding jdbc/ prefix in your connection pool configurations for the dsName.

<connection>
   <pool>
     <dsName>jdbc/XE</dsName>
   </pool>
</connection>
  • Related