I'm using Netbean 7.3, Glassfish 3.1.2
I always get this error and I cannot proceed to do my project:
WARNING: RAR5038:Unexpected exception while creating resource for pool mysql_tests_rootPool. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ mysql_tests_rootPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause:
Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)]
Error in getList() -->Error in allocating a connection. Cause: Connection could not be allocated because: Access denied for user 'root'@'localhost' (using password: NO)
Initially my project cannot even run. But after including these 2 line of code under persistence.xml, my project can run, but it can only access the database once.
I included "root" and "password" when doing all the setup etc but still, I'm getting this error. Tried a lot of methods but none works!
Please help!
Thanks!!
解决方案
I've solved this error. I'm posting this because someone could have encounter the same thing as me.
The problem lies with the data source. Apparently something happen during the creation of data source. The password parameter is missing. So I deleted the current data source and created a new one again and the problem is solved.