File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes MySQL, Maven, Hibernate, MacOSX - Authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "MySQL, Maven, Hibernate, MacOSX - Authentication" Watch "MySQL, Maven, Hibernate, MacOSX - Authentication" New topic
Author

MySQL, Maven, Hibernate, MacOSX - Authentication

R Graham
Greenhorn

Joined: Jun 11, 2006
Posts: 1
Hi,

I'm trying to get a project working with the above. When I run the hibernate3:hbm2cfgxml goal, I get two stack traces:
The topline of the first is:
'org.hibernate.exception.GenericJDBCException: Getting database metadata'

The topline of the second is:
'Caused by: java.sql.SQLException: Access denied for user 'rogergraham'@'localhost' (using password: YES)'

I do not understand what to put for hibernate.connection.username and hibernate.connection.password.

I have to sudo to run mysql (where it runs as root: yes I know this is bad, but I'm just starting with the Mac so please be forgiving!) But even if I put the root username/password combination in, I get the same error.

Is there something I'm missing here? When you have a JDBC connection and supply the username/password, this is the combination that is set on the database instance itself, right? I'm very confused...

Any help greatly appreciated!


Thanks,
Roger


Best Regards,<br />Roger
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 23628

Roger,
Welcome to JavaRanch!

We have a special forum for ORM. Since this is about Hibernate and not pure JDBC, I'm moving it there. This question does pertain to a bunch of technologies though. If the conversation shifts back to JDBC (or Maven) someone can move it again. For now, I think you will get the most help in the ORM forum.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3, OCAJP
saranga rao
Ranch Hand

Joined: Apr 24, 2007
Posts: 49
Hi,

This is problem of the system authentication... if your system has got the
admin privileges then use this ..........there is no code problem.......

You can also use

rogergraham@IPADDresss (like 192.168.100.13)(then also it will not work)


privileges.............prblm....
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
Quite likely a MySQL authorization issue. Try with standalone MySQL.
 
 
subject: MySQL, Maven, Hibernate, MacOSX - Authentication
 
Threads others viewed
Connecting a Java app. to a MySql DB
Properties File reading
mysql_connect doesnt work :(
Properties File reading
strange problem when accessing MySQL
developer file tools