hikaricp

NoClassDefFoundError: HikariCP with Maven

北战南征 提交于 2019-12-25 04:26:30
问题 I'm creating a Maven plugin (to hook into Spigot/Bukkit/BungeeCord) and am attempting to connect to a database. On startup, I get this error: Exception encountered when loading plugin: WarCore java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariDataSource I've tried using the Maven dependency plugin, Maven assembly plugin, but I cannot find a solution. Here's my current pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

Hibernate 4.3.5 ignores v$session.program configuration property

懵懂的女人 提交于 2019-12-25 02:46:51
问题 I previously used hibernate 3.2 and boneCP but I just upgraded to hibernate 4.3.5 and the Hikari connection pool to connect my java application to my oracle database. I set v$session.program to the program name I want and add it to the hibernate configuration. I've created my own hibernate configuration class that extends the Configuration class provided by hibernate. public class MyConfiguration extends Configuration { private static final long serialVersionUID = 1L; public MyConfiguration()

Spring Boot 2.1 App without HikariCP Connection pooler

柔情痞子 提交于 2019-12-24 21:16:05
问题 I want to use my Spring Boot 2.1 App without any connection pooler (HikariCP in this case) since the default pooler is HikariCP ! How should I go ahead and implement this ? The use case is I want to use a common db pooler (pgBouncer) for all my application instances and other applications ! I cannot achieve this when each Spring Boot app runs with its own implicit connection pooler(HikariCP). How should I implement this use case ? Is this a better solution for common database connection

How to implement Spring's @Transactional Annotation using Hibernate, HikariCP and persistence.xml

我的梦境 提交于 2019-12-24 07:58:59
问题 I need to implement Spring's @Transactional annotation but I'm not being able to do so. I had tried a lot of methods in the past 3 weeks but none of them worked. I'm also need to use EntityManager. To test if Spring's was working, I tried to inject the EntityManager using @PersistenceContext (I also tried using @PersistenceUnit and/with EntityManagerFactory) but always I got nullPointerException. @PersistenceContext(unitName = "sistema") protected EntityManager entityManager; Basically I need

HikariCP debug output, is this normal?

一曲冷凌霜 提交于 2019-12-24 04:38:08
问题 I've just started using HikariCP in a swing application with hibernate. I'm maintaining and old project, so there are a lot of crazy stuff going on in there. The connection leak detection feature helped me understand the sessions would close only on certain events, for example when a user is clicking on the "Save" button. In other cases, there is a leak. I'm thinking the previous developers were trying to implement the "long conversations" unit of work, but they missed some (most) cases. So

'Auto Reconnect' JDBC connection property for Microsoft JDBC Driver

谁说我不能喝 提交于 2019-12-24 03:08:48
问题 Is there a jdbc connection property to auto reconnect to SQL Server 2012 using Microsoft JDBC Driver for SQL Server. I don't find it and I am using hikari cp for connection pooling . Plz let me know if there is a better way to reconnect to DB if connection lost . I am using spring-hibernate with hikari cp to connect to SQL Server 2012 using Microsoft JDBC Driver . 回答1: Take a look at the connectionTestQuery setup at this config file. Also quoting the Documentation as a word of caution about

'Auto Reconnect' JDBC connection property for Microsoft JDBC Driver

半城伤御伤魂 提交于 2019-12-24 03:08:06
问题 Is there a jdbc connection property to auto reconnect to SQL Server 2012 using Microsoft JDBC Driver for SQL Server. I don't find it and I am using hikari cp for connection pooling . Plz let me know if there is a better way to reconnect to DB if connection lost . I am using spring-hibernate with hikari cp to connect to SQL Server 2012 using Microsoft JDBC Driver . 回答1: Take a look at the connectionTestQuery setup at this config file. Also quoting the Documentation as a word of caution about

Spring Boot 2 Upgrade with JPA Failed to instantiate [com.zaxxer.hikari.HikariDataSource]

这一生的挚爱 提交于 2019-12-24 01:19:02
问题 I'm upgrading to Spring Boot 2.0.1.RELEASE, using Spring data JPA with Eclipselink as my provider and Liquibase. I'm encountering the following error trying to start the server: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/zoomdata/scheduler/service/dao/JPASpringConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error

HikariPool-1 - Unusual system clock change detected, soft-evicting connections from pool

痴心易碎 提交于 2019-12-23 23:44:35
问题 My application use Spring boot and hikaricp. It occurs this errors: HikariPool-1 - Unusual system clock change detected, soft-evicting connections from pool Please help me fix it! 回答1: Two recommendations. One, make sure you are using the latest version of HikariCP. Two, configure the computer to sync time from a NTP server. Newer versions of HikariCP will only evict connections when backward time motion is detected. But will still log a warning for large forward leaps. Large forward leaps

PrepareStatement/Commit sequence not working in mysql/HikariCP webapp

南笙酒味 提交于 2019-12-23 18:13:42
问题 I have a web application that uses MySQL and HikariCP for the connection pooling. I connect to my pool using a singleton connection pool object defined like so: package com.webapp.db; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import org.apache.log4j.Logger; public class HikariConnectionPool { private static final Logger log = Logger