Hi, I have created a JNDI data-source using my weblogic console but I am not able to access the object from my clover. Below are the details
In weblogic 10.3.6, I have given the JNDI name for datasource as : java/mydb
To get DB connection from clover I have given this → jndiName=java:/comp/env/jdbc/mydb
Earlier I have Tomcat as server and I was able to get DB connection when I configured the resource details in tomcat/conf/server.xml, but when I am using clover on weblogic server I am getting below error:
Caused by: org.jetel.exception.JetelException: Cannot establish DB connection to JNDI:java:/comp/env/jdbc/mydb While trying to look up /comp/env/jdbc/mydb in /app/webapp/clover.war/1811641702. caused by: javax.naming.NameNotFoundException: While trying to look up /comp/env/jdbc/mydb in /app/webapp/clover.war/1811641702.; remaining name ‘/comp/env/jdbc/mydb’
Please let me know where I am doing mistake, what is the process of accessing the JNDI object.
Hello, chaitanya_r,
Please try to replace java:/comp/env/jdbc/mydb with jdbc/mydb
Let me know if this does not help, please.
Best regards,
Thanks a lot for replying. I am getting below error after changing to jdbc/mydb
Cannot establish DB connection to JNDI:jdbc/mydb While trying to lookup ‘jdbc.mydb’ didn’t find subcontext ‘jdbc’. Resolved ‘’ caused by: javax.naming.NameNotFoundException: While trying to lookup ‘jdbc.mydb’ didn’t find subcontext ‘jdbc’. Resolved ‘’; remaining name ‘jdbc/mydb’
Please let me know if I am missing anything else. I have created the JNDI datasource in my weblogic server with name as ‘jdbc/mydb’
Hi chaitanya_r,
we checked that on one of our test servers. Please take a look on attached screenshot.
Also we checked that:
* “jdbc/TestDB” works
* but “java:comp/env/jdbc/TestDB” does not
on WebLogic.
Seems to us, there is issue with getting DataSource. Potential troubles:
* Do you really configured data source with “jdbc/TestDB” name? Please check typos in both Weblogic console and CloverETL Server
* Check upper/lower case.
I hope this helps.
Thanks,
Yes I have created the datasource object using JNDI similar to the screenshot you have give below. But still I am facing this issue. Is there anything else that I need to check because the error says that it is trying to look inside clover.war:
caused by: javax.naming.NameNotFoundException: While trying to look up /comp/env/jdbc/mydb in /app/webapp/clover.war/1811641702.;
I have created the JNDI for datasource using weblogic console, but how can I map that to clover web application. Is there any additional step which I am missing here?
Hi, chaitanya_r,
There is no additional step. You just have to properly create datasource (the easiest way is usually sufficient) and war application started in the same environment. That is all. Application should be able to to get to the datasource via short JNDI name “jdbc/TestDB”. If you have some more advanced deployment, your administrator should be able to set datasource properly.
Best regards,