What I\'m trying to do is to update my database after a period of time. So I\'m using java scheduler and connection pooling. I don\'t know why but my code only working once. It
Try stopping and restarting your server (I assume you are using Eclipse and a Tomcat server). Maybe when you created your context xml file as it did was empty initially, your server was not able to synchronize its contents hence its inability to find the database connection resource name you later specified in the context.xml file.
i.e. if you have not already solved this problem.