473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (u

1
This is my first JSP application using mysql database connection. My application is reporting this error: "Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))".

This is what my script look like:

Expand|Select|Wrap|Line Numbers
  1. context.xml:
  2. <Context antiJARLocking="true" path="/5GMODS"> <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
  3.      maxActive="100" maxIdle="30" maxWait="10000" removeAbandoned="true"
  4.      username="root" password="jethro" driverClassName="com.mysql.jdbc.Driver"
  5.      url="jdbc:mysql://127.0.0.1:3306/erata" /> </Context>
  6.  
  7. web.xml:
  8. <resource-ref> <description>DB Connection Pool</description> <res-ref-name>jdbc/TestDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref>
  9.  
  10. TestDBConnection java class:
  11. public boolean isValid()
  12.     {
  13.  
  14.         // Get a connection from the pool
  15.  
  16.  
  17.          try
  18.          {
  19.               pool = (DataSource)ctx.lookup("java:comp/env/jdbc/TestDB");
  20.               conn = pool.getConnection();
  21.  
  22.              if (pool != null)
  23.              {
  24.                 return true;
  25.  
  26.              }
  27.             else
  28.             {
  29.                  err="Unknown DataSource 'jdbc/TestDB'";
  30.                  return false;
  31.             }
  32.         }
  33.         catch(Exception e)
  34.         {
  35.             //System.out.println(e);
  36.              err=e.getMessage();
  37.              return false;
  38.         } 
  39.  
  40.  
  41.            //return status;
  42.  
  43.     }
I am actually using the mysql server in wamp. From the command prompt, i am successful connecting to the mysql server as root(username) and jethro(password). It just not working with my application. Please help me to forge ahead with this project.
Jun 22 '14 #1
1 6484
Is the port 3306 correct?
Jun 22 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kevin Goad | last post by:
Im running Mandrake Linux 9.1 on a Laptop I recently bought, and its purpose its a PHP development machine, and I want to use a MySQL Backend. I think when I was installing MySQL, something got...
3
by: Ian | last post by:
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
2
by: Kiko + | last post by:
Hi, I've been getting this error: Server Error in '/applicationname' Application. ---------------------------------------------------------------------------- ---- Failed to create...
6
by: ASP.Confused | last post by:
I have an ASP.NET page writtein in VB that uses ADODB. I just had to force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses this, and I wanted to be compatible with them.) I...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
4
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a...
1
by: zlf | last post by:
Hello my website has role based access, and user without specific role assigned cannot access specific page in website. When the user try to access a page who has not been granted to access, the...
2
by: =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post by:
Yes, sorry I tried to make it clear in the original question that I want to get the user token of the service - ie. the account the service is running under. I know services don't have user tokens...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.