hi. i'm a newbie to hibernate. other than reading a few chapters here and there and doing a couple tutorials, i don't know a whole lot about it. but, according to some people i know, they say that hibernate is difficult to work with because of its "quirks," and it's difficult to debug. first off, i'm kinda skeptical because they tended to be managerial types with no or very little skills in development. so, that's why i'm posting here, where you guys can either validate or invalidate these arguments and provide specific examples. Thanks!
Hibernate is one of the best ORM (object-relational-mapping) frameworks available. Modern day development however uses JPA. JPA provides an API for the developer. JPA itself depends on what is known as a JPA Provider. You can use Hibernate as the JPA Provider in your application. Other JPA providers include Oracle TopLink, Eclipse Link and so on. Since you are asking for a sample app, have a look at Best way to use JPA in web-tier.
That sample app still uses Hibernate even though the application code uses JPA. JPA is the standard approach and allows you to switch the provider transparently. Of cause well knowing about the JPA provider allows you to optimize the persistence performance of your app.
I would echo Kamal's sentiment: Hibernate is a really great JPA implementation which also provides a huge amount of functionality beyond the JPA spec. Because it's such a powerful framework, it can feel a bit complicated in some use cases but I think the power far outweighs the complexity. I would definitely challenge the notion that it's difficult to debug - Hibernate has really great logging which can show you an excellent trace log of what's happening in your running application. This makes it very simple to see what's actually happening and get to the root of any problems. And because it's open source, you can always pull the source into your favorite IDE and dig right into the internals with a debugger.