393 questions
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" ...
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 ...
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(...
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 ...
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>
&...
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
...
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.
...
-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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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>...
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 ...
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 =...
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 ...
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....
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
...
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 & ...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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?
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/...
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 ...
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 ...
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="...
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.
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...