Quantcast
Channel: SCN : All Content - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3285

Plain JDBC: "Cannot create resource instance" Error

$
0
0

Hello,

 

I made a dynamic web project in Eclipse with a single servlet, whose purpose is to retrieve data from the database which resides at HCP.

I declared JNDI resources in my web.xml file as described here:

https://help.hana.ondemand.com/help/frameset.htm?e5d46793bb5710148c05ee3ad01abd39.html

and then tried to retrieve the data source as described here:

https://help.hana.ondemand.com/help/frameset.htm?39b1fcd42c864eea9fcdf381a64c13b8.html

 

I get the following error in the logs at HCP cockpit:

Exception is thrown by default object creation facroty during retrieving object instance. Exception is: javax.naming.NamingException: Cannot create resource instance

and it is thrown by the following row:

DataSource dataSource = (DataSource) initialContext.lookup("java:comp/env/jdbc/DefaultDB");

How do I fix this issue? Maybe I miss something?

 

Additional info:

1. I use SAP WEB IDE for the client-side. The destination is defined and the parameters are passed to the server-side.

2. The server-side application is bound to the database schema via HCP cockpit.

 

Thank you.


Viewing all articles
Browse latest Browse all 3285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>