tags:

views:

109

answers:

0

I recently deployed a working webapp on my localhost to amazon web services. The problem i'm encountering is - though context.xml has username as 'james', the exception stacktrace mentions otherwise.

org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

It is trying to connect to database with username 'root'. It it be because of caching of the file(context.xml)? How do I tackle that? I have restarted the web server as well, but it's not coming to effect.

Thanks in Advance.

EDIT:

Here's the content of context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Context antiResourceLocking="false" privileged="true" >
    <Resource 
       name="jdbc/NetmarketDB"
       auth="Container"
       type="javax.sql.DataSource"
       removeAbandoned="true"
       removeAbandonedTimeout="30"
       maxActive="100"
       maxIdle="30"
       maxWait="1000"
       username="james"
       password="xxxxxxxxxx"
       driverClassName="com.mysql.jdbc.Driver"
       url="jdbc:mysql://localhost:3306/ams"/>
</Context>

You can see it happening by clicking on Login or Register on the page: http://184.73.118.76/Links.jsp

Is there anything I need to do to bring context.xml changes to effect? I have carried out two actions:
1. touch web.xml in WEB-INF
2. Restart tomcat server.

Desperately need help here.

Thanks again. James.