Hibernate Proxool about Hibernate.proxool.existing_pool setpoint problems

Source: Internet
Author: User
Tags prepare
There are some problems with using Hibernate to connect pool with Proxool today. The problem is that when you do not manipulate the database through the Web, you are prompted unable to open JDBC connection for schema management target For example, when using JUnit or the main method to perform a database operation, the following error occurs Exception in thread "main" org.hibernate.tool.schema.spi.SchemaManagementException:Unable to open JDBC connection for schema management target at O Rg.hibernate.tool.schema.internal.TargetDatabaseImpl.prepare (targetdatabaseimpl.java:42) at Org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration (schemamigratorimpl.java:57) at Org.hibernate.tool.hbm2ddl.SchemaUpdate.execute (schemaupdate.java:134) at Org.hibernate.tool.hbm2ddl.SchemaUpdate.execute (schemaupdate.java:101) at Org.hibernate.internal.sessionfactoryimpl.<init> (sessionfactoryimpl.java:472) at Org.hibernate.boot.internal.SessionFactoryBuilderImpl.build (sessionfactorybuilderimpl.java:444) at Org.hibernate.boot.internal.MetadataImpl.buildSessionFactory (metadataimpl.java:170) at Com.express.util.HibernateUtil.getSessionFactory (hibernateutil.java:31) at com.express. util.
 Hibernateutil.opensession (hibernateutil.java:47) at Insertorder.main (insertorder.java:13)

caused by:java.sql.SQLException:No suitable driver found for Proxool.proxool
At Java.sql.DriverManager.getConnection (drivermanager.java:689)
At Java.sql.DriverManager.getConnection (drivermanager.java:270)
At Org.hibernate.proxool.internal.ProxoolConnectionProvider.getConnection (proxoolconnectionprovider.java:69)
At org.hibernate.engine.jdbc.env.internal.jdbcenvironmentinitiator$ Connectionproviderjdbcconnectionaccess.obtainconnection (jdbcenvironmentinitiator.java:180)
At Org.hibernate.tool.schema.internal.TargetDatabaseImpl.prepare (targetdatabaseimpl.java:38)
... 9 more

After several modifications and tests, the result is found in the setup
The value of Hibernate.proxool.existing_pool has some conflicts, this value is set to False, when Hibernate starts to be called, it initializes the Proxool, makes the database connection and so on.
When set to true, the existing proxool is used. When using JUnit or the main method to perform database operations, because these operations are not servletconfigurator listening, so there is no initialization of proxool, resulting in no database connection operation, so that the program error.
The above for personal understanding, if there are errors, can comment on the Exchange

2016.10.15
deployed the project to Linux today and found that the database connection still had this error, and when I set the Hibernate.proxool.existing_pool to False, the problem was resolved, and the reason was not known, For now,
Ps:windos setting Hibernate.proxool.existing_pool to True
Linux setting Hibernate.proxool.existing_pool to False

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.