• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Petclinic of Spring2.5.6 with MYSQL and GLASSFISH

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Im trying to configure petclinic sample of spring2.5.6 with mysql and glassfish. I configured jdbc.properties with all the mysql details.
when I try to access db from app, the following error occurs:

Data access failure: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root '@'localhost' (using password: YES))

Ive tried out the following without any success:
1) Reset the root password for mysql
2) Grant all the privileges on petclinic db to 'root' user in Mysql.


Is it the problem with Mysql or with Glassfish? Kindly advise/suggest the solution.

Thanks.

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a DataSource configuration for connecting to MySQL in Glassfish? And what is your DataSource bean in your Spring configuration. Is it pointing to the DataSource that Glassfish put into its JNDI tree?

Mark
 
Yeddu Prabhakara Rao
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Spritzler wrote:Do you have a DataSource configuration for connecting to MySQL in Glassfish? And what is your DataSource bean in your Spring configuration. Is it pointing to the DataSource that Glassfish put into its JNDI tree?

Mark



Mark,

Thanks for responding. No, I dont have Datasource configuration for MySQL in Glassfish. My DataSource bean in Spring configuration uses org.apache.commons.dbcp.BasicDataSource.



Is it mandatory to have Datasource configured in Glassfish (using JNDI name) ?
Earlier, I've deployed another application without Datasource configured in Glassfish, I was only using Datasource bean which has Oracle db related info, and it worked perfect.
Now, Is datasource configuration mandatory when using MySQL with Glassfish ?

Regards,
Yeddu.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic