Wednesday Jul 23, 2008

Issues while Connecting GlassFish and MySQL (Netbeans 6.1)

I downloaded the Netbeans 6.1 which was bundled with GlassFish v2 UR 2 and MySQL 5.0 
Community Server and was playing around with it. I created a simple JSP with a dropdown. 
This dropdown has values populated from a table.  

When I ran this, I got the following error - 

RAR5038:Unexpected exception while creating resource for pool mysqlPool. Exception 
: No PasswordCredential found
RAR5117 : Failed to obtain/create connection from connection pool [ mysqlPool ]. 
Reason : No PasswordCredential found
RAR5114 : Error allocating connection : [Error in allocating a connection. 
Cause: No PasswordCredential found]
WebModule[/WebApplication1]java.sql.SQLException: Error in allocating a connection. 
Cause: No PasswordCredential found
java.lang.RuntimeException: java.sql.SQLException: Error in allocating a connection. 
Cause: No PasswordCredential found
        at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow
(CachedRowSetDataProvider.java:416)

I opened up the Admin console of the GlassFish and tied to ping 
(Resources -> JDBC ->Connection Pools -> mysqlPool )

It threw a “No passwordCredentials found” error. As expected.

Then, I moved on to the “Additional properties” and tried adding password as a new property. 
I set the “Password” property to have a blank value as during installation of MySQL, I let the default 
password be(which was a blank password). This seemed to be a mistake, because it is not possible to add 
“Password” as a new property and set the value to be blank.

Thus, I logged into MySQL and set the password - 

C:\\Program Files\\MySQL\\MySQL Server 5.0\\bin>mysql -u root mysql
Welcome to the MySQL monitor.  Commands end with ; or \\g.
Your MySQL connection id is 18
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.

mysql> SET PASSWORD FOR root@localhost=PASSWORD('newpassword');
Query OK, 0 rows affected (0.23 sec)


After this, added the new password in Admin console.I clicked on “Save” both in the “additional properties” 
page and also in the “General” page. 

I tried pinging now, and it worked fine. However, when I ran the application, it threw a 
“NoPasswordCredentials found” exception again.

I logged into “Admin Console” again, but could not find the “Password” property I had set. 
I tried a few times, but the password property kept disappearing. 

I tried a lot of things – restarting GlassFish/creating a new JDBC resources and new connection 
pool/ changing the property files....nothing worked.

I had to create a new web application project to solve this problem.  


Wednesday Apr 25, 2007

Review of "Tuesdays with Morrie"



I got this book as a bday gift. I was quite skeptical about this one. But I started reading it anyway. The book suprised me. It was such a refreshing read.

It is the true story of a Sesame Street graduate and Brandeis University sociology professor,  Morrie Schwartz and his relationship with student Mitch Albom(the author). The book talks about a few important life lessons that Mitch learns from his professor, who is dying from Amyotrophic Lateral Sclerosis (ALS).

Mitch, though successful, has his priorites all mixed up. The book is about how Morrie(his professor) sets them straight. They talk about love, family, work and so many more important things. It gives us a special insight about how Morrie feels when death stares right in his face.

But the best part lies in the fact that such complex things have been described in such a simple, down-to-earth manner. The beauty lies in its simplicity.

It brings back memories of my college days. I had a prof., Mrs. Angelina Geetha, who guided me not just during my college days, but also after. She has seen me though a lot of my problems with her abundant common sense and her helping tendency. I still remember the lessons she imparted me. (Nope! Not the classroom ones!)

The book as been on the New York Times bestseller list for four years now. If you still have not read the book, you should...








About

157438

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today