jayapra ramsar

Greenhorn
+ Follow
since Nov 14, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jayapra ramsar

I tried to debug using the below code. To obtain list of all context, I used the below code. Please review and help



But I get the below error.

13 years ago
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.

13 years ago