how to configure connection pooling in JPA/Hibernate application (Without Spring)?


This question already has an answer here:


Back in the old days, you had to load the appropriate driver class using Class.forName(org.postgresql.Driver.class) construct. With JDBC 4.0 drivers it's no longer necessary - but you may give it a try.

Alternatively, try starting your application with -Djdbc.drivers=org.postgresql.Driver, it does virtually the same as Class.forName snippet, but doesn't require you to hardcode the driver class. Hope it helps.

From the answer

I am able to resolve the problem.

And after apending this line to c3p0-config.xml

<property name="driverClass">org.postgresql.Driver</property>

Need Your Help

SourceTree very slow with many repositories

git performance repository

I work on a lot of small projects on daily basis and need to switch often.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.