Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

BasicDataSource not having property for clientProgramName

In my application we are creating connection pool as shown below <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" ...
Sanjay's user avatar
  • 313
0 votes
0 answers
71 views

Getting error "ORA-28040: No matching authentication protocol exception" with custom DataSourceFactory

I have extended the BasicDataSourceFactory (of [Apache Commons] DBCP) as follows: public class MyFactory extends BasicDataSourceFactory { public MyFactory () {} @Override public Object ...
avitoria's user avatar
0 votes
0 answers
32 views

Couldnt connect to SAP HANA via JDBC using apache dbcp2(connection pool)

I am trying to connect to SAP HANA cloud database. But getting error like java.sql.SQLException: Error preloading the connection pool at org.apache.commons.dbcp2.BasicDataSource.createDataSource(...
asum's user avatar
  • 1
0 votes
0 answers
24 views

Apache DBCP 1.4 || Idle connection timeout in 15 min configuration with Java based application

We are doing GOS oracle database Migration for Java Based application. In Java application , we are using apache DBCP 1.4 to connect to oracle database. Now GOS ,comes with the limitation that Idle DB ...
Vinayak Prabhutendolkar's user avatar
1 vote
1 answer
812 views

Cannot get a connection, pool error Timeout waiting for idle object while using DBPC2

the pom.xml is following: <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-dbcp2</artifactId> <version>2.9.0</version> &...
woxiangbo's user avatar
  • 143
1 vote
1 answer
3k views

An internal object pool swallowed an Exception org.apache.commons.dbcp2.LifetimeExceededException: The lifetime of the connection

I am getting an error as below. org.apache.commons.dbcp2.LifetimeExceededException: The lifetime of the connection [198,970] milliseconds exceeds the maximum permitted value of [60,000] milliseconds ...
Mahesh A R's user avatar
0 votes
1 answer
127 views

Getting typecast error while creating dbcp2.PoolableConnection with dbcp 2.9 version and Ojdbc8

Background - I was using commons-dbcp 1.2 in my project and I am trying to upgrade to latest commons-dbcp2 2.9 version with ojdbc8 to achieve the resiliency that comes from newer dpcp2 version. ...
Anshu's user avatar
  • 69
-1 votes
1 answer
191 views

Importing Apache Commons dbcp2 in Apache Karaf [closed]

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. ...
Pouissante's user avatar
0 votes
1 answer
99 views

Apache DBCP and Oracle Transparent Application continuity

We have an older application that can't failover when one node of our Oracle RAC goes down. It seems it uses an older version of org.apache.commons.dbcp.BasicDataSource. I can make this work when I ...
cptkirkh's user avatar
  • 165
0 votes
0 answers
122 views

BasicDataSource fails after 8 connections allocated

I'm using BasicDataSource (org.apache.commons.dbcp2.BasicDataSource) with a local MySQL database. My application is a Java web service running under Tomcat 8 on an AWS Linux server. No matter how I ...
Flarosa's user avatar
  • 1,801
1 vote
0 answers
408 views

java.lang.NoClassDefFoundError with apache dbcp2 in gradle

I recently created a class which uses BasicDataSource from dbcp2, however when i try to use methods from this class, i get the java.lang.NoClassDefFoundError: org/apache/commons/dbcp2/BasicDataSorce ...
Arthur Isnt original's user avatar
0 votes
1 answer
204 views

Simulate "No operations allowed after connection closed"

I'm getting this error "No operations allowed after connection closed" from grils2x/mysql/dbcp occasionally and I couldn't find a solution. because I get the error hours later, like next day ...
Alex Santos's user avatar
1 vote
0 answers
134 views

how to reload password in dbcp basic datasource

dbcp2 basic datasource is being used for one of our java applications and database password is set by calling this setter setPassword(final String password) passwords are stored in AWS secrete ...
scoder's user avatar
  • 2,611
1 vote
0 answers
269 views

The StackOverFlowError commons-dbcp2 rollback

Suddenly in one of the environment we see the below repeated lines of dbcp2 and eventually the StackOverFlowError. The Hibernate (3.6.10) getHibernateSession().getTransaction().rollback() is called in ...
dowonderatwill's user avatar
0 votes
1 answer
543 views

Apache NIFI custom processor gives error "cannot find suitable driver" [closed]

I have created a nifi processor that is supposed to read something from a database and put the result in an attribute. The code is very trivial, just creating a simple JDBC connection. private ...
Hessam's user avatar
  • 1,415
0 votes
1 answer
144 views

Hi, How can i do operation of others dao with one transaction?

I have dao which methods should be within one transaction What is the best way to do it correctly? Car dao has following method public Car findCar(int numOfPas,String carCategory){ String ...
Justtoasktheneededquestions's user avatar
1 vote
1 answer
643 views

Java and MariaDB connection drivers errors

I can connect Java and Maria DB with JDBC and DriverManager. It works. I can write line in my database's tables ect.... But with "BASIC DATA SOURCE" i can't connect to MariaDB. I use openJDK ...
Quentin Genet's user avatar
1 vote
0 answers
310 views

Can I change the db connection pool size dynamically?

We are preparing to migrate the spring 4 based legacy service to Kubernetes, also known as K8s. Since rdbms is used, there is a limitation that the number of connection pools must be fixed at startup. ...
dlraud's user avatar
  • 11
0 votes
1 answer
2k views

Configure Apache dbcp2 connection pool in tomcat 7.x

I am working on a legacy application that uses Tomcat 7.0.64 and we want to configure apache dbcp2 connection pool as a resource in Tomcat. The application runs Spring 4.x and Hibernate 4.x. After ...
NJavalearner's user avatar
1 vote
1 answer
2k views

Spring Boot with SMTP connection pool

I'm facing problem while integrating SMTPconnection pool into my spring boot application. Please suggest me what I'm doing wrong in below configuration.I want to execute bulk email execution in ...
Selvam Selvam's user avatar
0 votes
1 answer
2k views

NiFi database connection pool not working correctly

I have noticed some odd behavior in the NiFi DBCP connection pool between our NiFi 1.7 cluster and an Oracle 19c database. When the NiFi cluster is under load, it stops reusing database connections ...
pmdba's user avatar
  • 6,995
1 vote
1 answer
417 views

Unable to resolve javax.transaction.xa partial=true

I am trying to use dbcp2 from apache-commons to setup a datasource, but I cannot install commons-dpcp2 bundle because it is complaining about a missing requirement javax.transaction.xa package version>...
niken's user avatar
  • 2,601
0 votes
1 answer
496 views

Tomcat Connection pool : tomcat-jdbc vs tomcat-dbcp, which is better?

Tomcat is using tomcat-dbcp as a default connection pool strategy, however they are also providing tomcat-jdbc as an alternative. Which connection pooling is better for concurrent load? tomcat-jdbc ...
chirag nathwani's user avatar
0 votes
0 answers
712 views

Question on maxTotal and maxIdle in Apache Commons Pool 2?

I'm using the Apache Commons Pool 2 implementation to have object pool mechanism for my application. Below is my configuration to create pool PoolableConnectionFactory poolableConnectionFactory =...
sheik's user avatar
  • 513
0 votes
2 answers
2k views

DBCP2 initialization

I'm using DBCP2 with Spring Security (XML configuration). My problem is that everytime that I made a INSERT or UPDATE creates connections (initialSize = 100), so after a time I get "Too many ...
java1007's user avatar
0 votes
1 answer
5k views

Occasionally getting JDBC begin transaction failed, then recovers automatically

We are using multiple spring datasource to connect multiple database. We are getting the following errors only Occasionally, and then after a while everything stars working again automatically o.h.e....
mahfuj asif's user avatar
  • 1,979
1 vote
2 answers
1k views

Which units do Apache DBCP defaultQueryTimeout expects?

The Apache Commons DBCP's documentation states, that defaultQueryTimeout If non-null, the value of this Integer property determines the query timeout that will be used for Statements created ...
user avatar
0 votes
1 answer
243 views

After DB server restart - No more data read from socket Error

Spring rest webservice application is able to fetch the data from DB. But getting 'no more data read from socket error' after restart the DB server.. Details are: JDK 1.8x Spring JDBC Template & ...
Jack's user avatar
  • 197
1 vote
2 answers
876 views

JMeter 5.2.1 - Connection properties is ignored

I checked using JMeter 5.2.1 the connection properties feature with oracle Bug 63926 - JDBC Connection Configuration: Add ability to set connection properties But even if I give wrong values in ...
Ori Marko's user avatar
  • 58.7k
0 votes
1 answer
4k views

Getting "connection timeout" instead of "connection refused" [duplicate]

I'm testing my application which requests some data from database. In case when the database is DOWN and installed on localhost I'm getting immediate Connection refused but when the database is ...
sys463's user avatar
  • 376
1 vote
0 answers
634 views

Large number of jdbc connections with SQL Server Always On configuration

We are facing a problem in a java based application where the number of database connections to a SQL server database is always increasing. The database is configured in a HA group and the application ...
Abhi's user avatar
  • 19
1 vote
0 answers
1k views

Hikari connectionTimeout only when pool is full

I am working on converting a application's database connection pooling from Apache's DBCP2 to Hikari. So far everything is looking great except I've run into an issue with Hikari's connectionTimeout ...
nolt2232's user avatar
  • 2,644
1 vote
1 answer
2k views

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 ...
Sachin Kumar's user avatar
0 votes
0 answers
501 views

High max connections is degrading performance with dbcp2

Have a threadPool set up with 8 threads interacting with the database, doing selects and inserts. Set up a DataSource by extending BasicDataSource and setting the maxactive to 30 and maxIdle to same. ...
yolob 21's user avatar
  • 396
4 votes
1 answer
1k views

Implementing a connection recreation mechanism on periodic DB password change

We are using a PostgreSQL database with AWS RDS IAM authorization feature – which means that our application needs to refresh the authorization token every 10 minutes or so (since the token is valid ...
szmktk's user avatar
  • 103
0 votes
0 answers
509 views

Access denied to MySQL, cannot create connection to database server

While configuring an open source project ran into a problem trying to connect the application to the MySQL database running locally. After figuring out some incompatibilities due to some changes ...
Joao Pereira's user avatar
1 vote
1 answer
954 views

Connection getting closed while executing long run query through JPA TransactionTemplate

I am using Custom DataSource for DB connection pool (apache DBCP2 and MySQL database version 8) for connection pooling and trying to delete DB objects (100k+ and takes more than 30 minutes) using ...
user2816525's user avatar
10 votes
1 answer
9k views

HikariCP/Apache DBCP2 and PgBouncer

After switching to PgBouncer in a Spring application that uses HikariCP(or Apache DBCP2) do I need to make additional configuration for HikriCP(or Apache DBCP2) side?
Radu Dumbrăveanu's user avatar
1 vote
1 answer
1k views

Apache dbcp connection pooling not working properly

I am trying to connect to mysql database using apache dbcp2 connection pooling following its tutorial from here: https://git-wip-us.apache.org/repos/asf?p=commons-dbcp.git;a=blob;f=doc/...
Ujjwal Jung Thapa's user avatar
1 vote
1 answer
3k views

Hibernate and Spring Boot MalformedParameterizedTypeException: null while initializing bean (org.apache.commons.dbcp2.BasicDataSource)

I have Spring 1.5.21.RELEASE spring boot project and I am not able to initialize the Spring Boot Datasoruce org.apache.commons.dbcp2.BasicDataSource. When application start-up I get the following ...
Bmis13's user avatar
  • 670
1 vote
1 answer
505 views

Connection Pool for OSGI bundle

I'm trying to implement some kind of microservice archetecture using OSGI. I have UserDAO bundle, which get Connection from Connection Pool in another bundle (Connector). They're binded with OSGI ...
Nikita Kalugin's user avatar
9 votes
1 answer
632 views

Tomcat 7 - Ignoring db conections pool parameters (DBCP)

We are facing a problem that the number of connections made to the database explodes during restarts of Tomcat 7. Our configurations are below, set on Tomcat's context.xml: <Resource auth="...
Marcelo Dias's user avatar
2 votes
0 answers
632 views

T4CPreparedStatement instance not releasing memory related to bind parameters,causing memory leak over time

Using DBCP2 connection pool in a spring webapp with Oracle 12c r1 as the backend database with OJDBC8.jar, turned on the poolpreparedstatement feature of dbcp2 to reduce parsing on the database side. ...
yolob 21's user avatar
  • 396
0 votes
2 answers
2k views

how to set driver connection properties using c3p0 libraries?

I am Migrating from dbcp2 to c3p0, We create a datasource by extending the BasicDataSource from dbcp2 and setting the properties. Some properties are set at driver level via setConnectionProperties ...
yolob 21's user avatar
  • 396
0 votes
1 answer
1k views

Why subsequent Temporary table creation throws error while using Statement with DBCP2?

I am trying to create a Temporary table - #EMPLOYEE_TABLE on MSSQL database using Spring and DBCP2 connection pooling. I am using java.sql.Statement to perform execute on the DB. I close the ...
Niranjan's user avatar
0 votes
3 answers
366 views

Is it ok to use same BasicDataSource, Connection, Statement and ResultSet Object in multiple class methods.?

I have below code which uses static objects of BasicDataSource, Sql Connection, Statement and ResultSet. The code below is working fine, but i just want to know about the safety of using these kinds ...
Onkar Musale's user avatar
0 votes
0 answers
1k views

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

We have a connection pool for an embedded derby database. We are setting max wait time to 5 secs max connection in pool 100 We are getting org.apache.commons.dbcp.SQLNestedException: Cannot get a ...
ba6971's user avatar
  • 85
0 votes
0 answers
320 views

Java code to get lost active DB Connection back to the connection pool

I am facing connection leakage problem with DBCP2. I went though all the code base and have closed/released the connections wherever required. I have also run Sonar, but no connection leakages were ...
CodeRider's user avatar
  • 584
9 votes
1 answer
22k views

Hikari and test on borrow option

I use spring boot 2 with Hikari connection pool, jpa and postgres. Is there any reason to continue to use theses options spring.datasource.testOnBorrow=true spring.datasource.validationQuery=SELECT ...
robert trudel's user avatar
0 votes
0 answers
289 views

Connection Pooling with Apache DBCP (Java 1.6)

Need some advice on a good solution for Connection Pooling for a stand alone Java application. The back-end database may vary, therefore I need a generic solution (versus database specific Connection ...
Jason Schade's user avatar

1
2 3 4 5
8