Hi everyone!, I'm devoloping my first application using hibernate and I'm getting an error when I'm doing a query to my database. I was looking for solutions the last 3 days and I can't figure out where's the mistake, so I decided to consult you.
Basically, I'm developing a web application where users can create group and adminstrate them. To map this relation I've created a class named user that has a set of groups to administrate and a class named group that has a reference to it's administrator. When I'm trying to find out if a group with a certain name exists and exception it's thrown. Can anybody help me please?
Here's the code:
The hibernate config:
The User class:
The Group class:
The method of the GroupDAO class where I'm getting the exception:
And finally the error:
Anything you could tell me will be very helpful! Thanks everybody in advance!