I am using Springsource Tool Suite 2.5.1 and tc server 2.1. I am trying to configure a data source to PostgresSql. I followed the steps outlined in
Apache JDBC Set-up.
1. I tried to add data source resource in $CATALINA_BASE/conf/Catalina/localhost/<myappcontextfilename>.xml file similar to the one below. Unfortunately, Springtool suite keeps overwriting this file and the <Resource name...> definition given is lost. Springsuite overwrites it with <Context docBase.... source=..../>
2. Then I attempted to define it as a global resource though the Apache link warns that it some time does not work. The definition is given below.
3. Then I add the resource reference in web.xml as below.
4. But when the spring tc server comes up, it gives the below error
5. Finally I configured the data source using Data Source Explorer. I set-up with the same parameters as given above in <GlobalNamingResources>. When I click on
Test Connection, I get Ping Successful message. When I expand the 'jdbc/postgres' connection in Data Source Explorer, I am able to see myapp database.
6. But when I use the below code snippet to obtain data source, I still get the error.
I get the below error.
Please Help! I have been struggling with this for almost 3 days . Thanks in advance for all your help.