I’m using: spring boot 2.0.4.RELEASE spring-data-jpa 2.0.9.RELEASE hibernate-core 5.2.17.Final hibernate-jpa-2.1-api 1.0.0.Final postgres jdbc driver 42.2.9 I have the following entity: and the following property set in application.yaml: Regardless of what the JVM timezone/default timezone is, I want to save and return timestamps in UTC. For testing purposes, I have set the timezone of my application code to US/Hawaii: When I
Tag: jdbc
UnsupportedOperationException with DriverManager.getConnection() on Android
I am unable to connect JDBC to my database, getting following error Answer According to the stacktrace, the MySQL Connector/J version you are using is using a java.util.regex.Matcher feature not supported on Android (probably named groups). The workaround is to use a 5.1.x version of MySQL Connector/J instead of a 8.0.x version. However, you shouldn’t use JDBC from Android applications.
Connection Pool and thread pool setting in Java
Spring application using Hikari pool. Now for a single request from the client I have to query 10 tables(business required), and then composite the result together. And querying for each table may cost 50ms to 200ms. To speed up the response time, I create a FixedThreadPool in my service to query each table in different thread(pseudocode): Now for a single
Can’t connect to Oracle 19.3 with 19.3 JDBC driver
We have a project running with an Oracle 19.3 database, and a Java application using the Oracle 19.3 JDBC driver (which is available on Maven Central). On Windows with JRE 1.8, everything is fine, but when I run either on our build server or in WSL Ubuntu with OpenJDK 11.0.3 it refuses to connect to the database. Specifically: If I
Transfer Views – ‘value()’ requires a singleton (or empty sequence), found operand of type ‘xdt:untypedAtomic *’
I am trying to transfer views from the AdventureWorks2014 database from one SQL Server to another using Java and JDBC. In order to obtain the structure of the view, I use the stored procedure “sp_helptext” like this: ResultSet rs = statement.executeQuery(“EXEC sp_helptext ‘” + view + “‘;”); where view is the schema and view name (e.g., “dbo.myview”) that I am
SQL Server JDBC Error: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption
Background: Application Server: Java Based Application is running on Windows Server 2008 R2 Enterprise. Java Version on this Server is Version 6 Update 32. JDBC Driver Version: 4.0 Database Server: The database server has been recently upgraded(Side by side upgrade with the same servername as the one before that the application use to connect to) from Windows 2016 to Windows
Default HikariCP connection pool starting Spring Boot application
I’m using version: 2.1.6.RELEASE form Spring Boot in my pom.xml-dependencies. To connect to my database I put following in application.properties: When checking the amount of connections in postgresql with: I see each time I start the application exactly 10 connections are made. They almost all have the same query: Is there a way to prevent the application of making that
Cannot use setArray JDBC (integer) with H2 Database
I want to put an array of integers in my jdbc query with H2 database. But doest not work, I am getting this exception : org.h2.jdbc.JdbcSQLException: Data conversion error converting “(1,2,3)”; SQL statement: I am using H2 database. Can you help me please? Answer Using my JDBC utilities to work with JDBC IN array parameters easily: 1. If Maven, add
Checking connection to MySQL (Java)
I’m working on creating my little-utility for MySQL, and I need some help. How I can check connection to MySQL (by login and password), like it was realised in phpMyAdmin, without pointing some database at first. Because most of solutions for work with databases need exactly that pointing. Thanks in advance) Answer Yes. You can connect to the server without
SSLException: closing inbound before receiving peer’s close_notify
I’m writing a simple JDBC code with MySQL. Everything works fine and I’m able to print the records in table through select statement. But when I’m closing the connection, using Connection.close(), I’m getting the below exception. Any help is appreciated. Answer This was a issue with the MySQL driver on Java 11 https://bugs.mysql.com/bug.php?id=93590 This has been fixed in Connector/J version