Questions tagged [apache-commons-dbcp]

Apache-commons-dbcp provides an efficient implementation of the Database Connection Pool under the Apache license.

Many projects support interaction with a relational database. Creating a new connection for each user can be time consuming (often requiring multiple seconds of clock time), in order to perform a database transaction that might take milliseconds. Opening a connection per user can be unfeasible in a publicly-hosted Internet application where the number of simultaneous users can be very large. Accordingly, developers often wish to share a "pool" of open connections between all of the application's current users. The number of users actually performing a request at any given time is usually a very small percentage of the total number of active users, and during request processing is the only time that a database connection is required. The application itself logs into the DBMS, and handles any user account issues internally.

Apache-commons-dbcp coordinates the efforts required to create and maintain an efficient, feature-rich Database Connection Pool package under the ASF.

394 questions
0
votes
1 answer

MySQL with DBCP is creating tons of sockets, gets NoRouteToHostException

We are using DBCP inside a Grails application. The database is on another server, so TCP/IP is in play here. We have monitored the database by doing a show processlist frequently, and we never see above 50 connections. However, the sockets on the…
user1373467
  • 315
  • 3
  • 12
0
votes
1 answer

DBCP datasource not being obtained by Spring container

Background I'm new to spring. I'm using Spring MVC 3 and the spring tools suite by Springsource. I'm running a sample Spring Template they provide. I'm using Apache DBCP for my data source. Problem I have been able to inject beans using annotations…
Usman Mutawakil
  • 4,993
  • 9
  • 43
  • 80
0
votes
2 answers

saving InputStream as clob in oracle using jdbc

I have a csv file uploaded by user, which I need to store as a Clob, in oracle table. Therefore I have this code: MultipartHttpServletRequest mr = (MultipartHttpServletRequest) ctx.getRequest(); final MultipartFile f = mr.getFile("datafile"); …
javagirl
  • 1,635
  • 6
  • 27
  • 43
0
votes
1 answer

apache-commons-dbcp connection pooling - works in dev, not in further environments

I have a Struts2 WebApp using Spring with apache-commons-dbcp. While running in my local development environment, the application opens no more than 8 connections, which is the default value for maxActive. However, once the WAR is moved to a test…
john
  • 165
  • 1
  • 7
0
votes
1 answer

DBCP Stop Working with no Exception

I have a Problem with Apache Commons DBCP. The pool works, but before a random time (Hours), this stop in a loop. I have Threads in Java, and one of them connect to DB with a Sleep of 15 Seconds. this Thread, before de random time stop working, but…
0
votes
2 answers

Error while passing NULL value to procedure using iBatis

We have a Oracle procedure call done using iBatis. One of the IN parameters to the procedure is a VARCHAR2 datatype in procedure and is java.lang.String in Service/DAO layers. The procedure fails whenever this input parameter is passed with NULL…
yathirigan
  • 5,619
  • 22
  • 66
  • 104
0
votes
0 answers

Hibernate 3.2 and apache dbcp eats postgres connections

I have a simple entity bean and use hibernate 3.2.5 to persist it to postgres, prod will be pg 8.4, while I currently develop on 9.1. I use apache commons dbcp 1.4 (and commons pool 1.5.4) a public class DBCPConnectionProvider implements…
Jon Martin Solaas
  • 737
  • 1
  • 10
  • 19
0
votes
1 answer

Which JDK to compile commons-dbcp-1.2.2 ? (problems with JDK5/6/7)

When I try to compile commons-dbcp-1.2.2 with JDK6/7 I get this error: org.apache.commons.dbcp.BasicDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class) in java.sql.Wrapper This is because…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0
votes
1 answer

Error: : public class org.apache.commons.dbcp.BasicDataSource

This error (with all related 'unresolved type' errors) appeared while installing Maven project. There were no changes related to dbcp, I tried to delete all the local repos, installed again and commons-dbcp was downloaded, so dependencies are fine I…
John Doe
  • 9,414
  • 13
  • 50
  • 69
0
votes
3 answers

How to shrink DB Connection Pool?

I am using Apache DBCP with JNDI in my tomcat container to pool connections to a mysql database. Everything works fine but a problem i am seeing is that once a pconnection is pooled it is never released. So after a load spike connection sit their…
Igor Zelaya
  • 4,167
  • 4
  • 35
  • 52
0
votes
1 answer

DBCP Connection properties

We are having hard time figuring out the properties defined, minIdle, maxIdle etc. we are seeing the following error with the following setting InitialSize=5 maxActive=50 maxIdle=40 maxWait=2000 Caused by:…
Java Guy
  • 3,391
  • 14
  • 49
  • 55
-1
votes
1 answer

Importing Apache Commons dbcp2 in Apache Karaf

I have imported my Apache Camel blueprint xml bundle into Apache Karaf. When I try to start the bundle, it is complaining about dbcp2. I've tried to bundle it into my Apache Karaf but still no luck. The error I am getting: Error executing command:…
Pouissante
  • 56
  • 1
  • 5
  • 25
-1
votes
1 answer

apache-commons-dbcp connection pooling maxActive parameter

We are using Apache DBCP 1.4 for database connection pooling, with Java back-end, in our application. We set the value for maxActive = 20(by default), there was a scenario where requests needed more than 20 connection for execution. At that time…
-1
votes
1 answer

What is the best way to keep Apache DBCP connection pool for a Java scheduler task

I have to develop Java scheduler task (Job) which has to run each and every 5 minutes periodically. I have two ideas two keep the connection pool and i don't know what should be the best way. Method 1 : Crates connection pool each and every 5…
Raju
  • 448
  • 1
  • 9
  • 24
-1
votes
1 answer

BasicDataSource gets exhausted after sometimes. DBCP2

I faced a weird issue while testing my application, I got to see in the log that there were exceptions as shown below: 28-Jun-2017 19:25:52.736 SEVERE [http-nio-8443-exec-2]…
Bilbo Baggins
  • 2,899
  • 10
  • 52
  • 77
1 2 3
26
27