bonecp

A child container failed during start

穿精又带淫゛_ 提交于 2019-12-13 08:29:34
问题 I am getting below error; SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SimpleJDBCRealms]] at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) at org.apache.catalina.core

Jooq, Spring, And BoneCP connection closed twice error

拟墨画扇 提交于 2019-12-12 20:57:14
问题 I am using Spring 4.0.0, along with jOOQ 3.2.0 and BoneCP 0.8.0 for a web application. I have the PersistenceContext configured the same as this guide (please skim read it's a little too much code to paste here) http://www.petrikainulainen.net/programming/jooq/using-jooq-with-spring-configuration/ but with a smaller number of max connections and closeConnectionWatch = true for error checking. From what I can deduce, this guide is a non-XML version of the jOOQ website's own guide seen here

BoneCP doesn't recover from broken connection

你说的曾经没有我的故事 提交于 2019-12-12 11:24:49
问题 I have a problem with BoneCP (0.7.1 RELEASE). I though that BoneCP.getConnection() ensures it would return Connection object assuming that DB is alive. Here is how I configured my pool private void setupConnectionPool() throws SQLException { // setup the connection pool String connectUri = "jdbc:mysql://master-mysql:3306/base?zeroDateTimeBehavior=convertToNull&tinyInt1isBit=false&useCompression=true"; BoneCPConfig config = new BoneCPConfig(); config.setJdbcUrl(connectUri); config.setUsername(

BoneCP & Derby - How to properly shutdown

ぃ、小莉子 提交于 2019-12-12 09:48:03
问题 I have: BoneCP CONNECTION_POOL = ...; CONNECTION_POOL.getConfig().setJdbcUrl("jdbc:derby:database...;shutdown=true"); Connection connection = CONNECTION_POOL.getConnection(); connection.close(); CONNECTION_POOL.shutdown(); However this results in the following exception: 3274 [com.google.common.base.internal.Finalizer] ERROR com.jolbox.bonecp.ConnectionPartition - Error while closing off internal db connection java.sql.SQLException: Cannot close a connection while a transaction is still

BoneCP 0.7.1.RELEASE and hibernate 4.1.*

可紊 提交于 2019-12-10 16:43:47
问题 I try to add BoneCP to hibernate and have: java.lang.ClassNotFoundException: org.hibernate.connection.ConnectionProvider I couldn't find this interface in new hibernate packages and have 2 questions : 1) Could you share link or example how to manually configure BoneCP 0.7.1 with hibernate 4.1.*? (I only added connection.provider_class=com.jolbox.bonecp.provider.BoneCPConnectionProvider in hibernate.cfg.xml) 2) Someone tested BoneCP 0.8.0-alpha1? It's work good with new hibarnate, but has

How to use Spring BoneCPDataSource bean as data source for Log4j 2 JDBC appender?

倾然丶 夕夏残阳落幕 提交于 2019-12-07 12:41:45
问题 I would like to log log4j2 messages into relational database. Documentation for JDBC appender is here. I can use as database connection provider these sources: ConnectionFactory DataSource DriverManager but is there some way how to use datasource bean (com.jolbox.bonecp.BoneCPDataSource) what we use in entire application? 回答1: You can do it in 4 steps (step 2 & 3 are log4j2 config for web app): Step 1: Create log4j2.xml file (without JDBC appender) and put it in WEB-INF folder <?xml version=

Slick and bonecp: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already error

跟風遠走 提交于 2019-12-07 09:10:17
问题 Locally when I am developing my application I launch my play2 application using sbt run I love how I can make code changes, and then reload my browser to see my changes. After about roughly 10 code changes or so, I get a postgresql too many connection error (see below). My db connection is using the below DatabaseAccess.scala class. I'm guessing on each reload it is creating a bunch of connections to postgresql. In my Global am currently doing: override def onStart(app: Application) { Logger

Using bonecp as Tomcat 5.5 datasource

与世无争的帅哥 提交于 2019-12-07 09:09:00
问题 I try to get Tomcat to use BoneCP as a connection pool because DBCP doesn't work correctly here. I tried to add it to the context.xml that defines my webapp like this: <Context path="/reports" privileged="true" crossContext="true"> <Resource name="jdbc/IKOffice" type="com.jolbox.bonecp.BoneCPDataSource" auth="Container" username="ik" password="******" jdbcUrl="jdbc:postgresql://localhost:5434/IKOffice_Core" lazyInit="true" partitionCount="1" ... more properties ... logStatementsEnabled="false

BoneCP & Derby - How to properly shutdown

女生的网名这么多〃 提交于 2019-12-06 02:13:44
I have: BoneCP CONNECTION_POOL = ...; CONNECTION_POOL.getConfig().setJdbcUrl("jdbc:derby:database...;shutdown=true"); Connection connection = CONNECTION_POOL.getConnection(); connection.close(); CONNECTION_POOL.shutdown(); However this results in the following exception: 3274 [com.google.common.base.internal.Finalizer] ERROR com.jolbox.bonecp.ConnectionPartition - Error while closing off internal db connection java.sql.SQLException: Cannot close a connection while a transaction is still active. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache

Using bonecp as Tomcat 5.5 datasource

时间秒杀一切 提交于 2019-12-05 17:01:32
I try to get Tomcat to use BoneCP as a connection pool because DBCP doesn't work correctly here. I tried to add it to the context.xml that defines my webapp like this: <Context path="/reports" privileged="true" crossContext="true"> <Resource name="jdbc/IKOffice" type="com.jolbox.bonecp.BoneCPDataSource" auth="Container" username="ik" password="******" jdbcUrl="jdbc:postgresql://localhost:5434/IKOffice_Core" lazyInit="true" partitionCount="1" ... more properties ... logStatementsEnabled="false" /> </Context> But when I try to access the resource, it always says: javax.naming.NamingException: