As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [jdbc]

JDBC (Java DataBase Connectivity) is the base API which enables interacting with SQL database servers by executing SQL statements using the Java programming language.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Connect to Oracle DB using jdbc driver gets stuck while execution

I have been trying to connect the Oracle database using jdbc driver and using Timeout function with select Query. After hitting the timeout the connection is not getting closed and coming out. Please ...
Manish's user avatar
  • 49
0 votes
0 answers
8 views

While connecting my hibernate maven project to Mysql. I am getting these errors ( The word 'jdbc' is not correctly spelled)

I am trying to connect my maven project to MySql. I am using hibernate.cfg.xml file This is my hibernate.cfg.xml file. Here for jdbc and localhost I am getting error like "The word 'jdbc' is not ...
Prajwal Prabhu's user avatar
-2 votes
1 answer
22 views

Java JDBC Connection Integrity Constraint Violation

I created a switch case and created different classes to create Employee. when I create an employee an entry is added in the table but i get this error: Exception in thread "main" java.lang....
Siddhi Sattur's user avatar
0 votes
0 answers
8 views

Getting error after upgrading to spring boot 3 using DefaultLockRepository

I am currently upgrading legacy code from spring-boot v2.7.1 to spring-boot v3.1.0. Unfortunately, I never had direct contact with JDBC. I mostly use JPA. The error I get is the following: org....
Wumba's user avatar
  • 91
0 votes
1 answer
29 views

PreparedStatement parameterization triggers deadlocks (JDBC, SQL Server 2019)

Background I am working on a piece of enterprise software for which we've recently decided to move from building SQL queries via string concatenation to doing so by using templates, so that this first ...
Nikolai Petrov's user avatar
-1 votes
0 answers
15 views

questions regarding the behavior of `targetServerType` in spring boot app

I have 2 questions regarding the behavior of targetServerType in spring boot app If I specify targetServerType=preferSecondary or targetServerType=secondary. What happens to the read-write operations?...
user3908406's user avatar
  • 1,284
0 votes
0 answers
9 views

using postgesql DB with spring Boot application. app using r2dbc config to connect with DB. want to create jdbc config with r2dbc to connect same DB

r2dbc: url: r2dbc:postgresql://${DB.URL:}/${DB.NAME:}?currentSchema=${DB.SCHEMA.NAME:} username: ${DB.USERNAME:} password: ${DB.PASSWORD:} pool: enabled: true initial-size: 5 max-size: 100 jdbc-...
Sharafat Ali's user avatar
0 votes
1 answer
48 views

Nullpointer exception in servlet but not in normal class [duplicate]

I am trying to run a code which creates a row in mysql database everything works well with normal classes but when I use servlets it throws a nullpointerexception I am unable to understand the reason ...
Ronit Pandey's user avatar
1 vote
0 answers
31 views

How to connect JDBC - snowflake that has private key authentication using Spring boot configuration xml via HikariCP connection pool?

I tried using HikariCP connection pool to connect snowflake using JDBC. I use Spring Boot configuration XML file to create a bean. I have the private key for my authentication. So I tried the ...
Saravanan's user avatar
-1 votes
0 answers
26 views

Using JDBC to connect to a remote SQL server in Android Studio, getting Communications link failure error. How can I resolve this?

Here's my code first of all: package com.example.chemicalapptest; import android.os.StrictMode; import android.util.Log; import java.sql.Connection; import java.sql.DriverManager; public class ...
Farenhyte's user avatar
0 votes
0 answers
39 views

How to get Java to recognize the Postgres driver?

I'm trying to get some Java code to connect to Postgres. Just an attempt to get it to connect to a database at all, in the first instance: import java.sql.DriverManager; import java.sql.SQLException; ...
rwallace's user avatar
  • 31k
-2 votes
0 answers
13 views

Error in dynamic web project while creating servlets [closed]

Can anyone help me out with this error I am trying to run code through the tomcat server for web app. actually this wont affect my process but still i see that error symbol how to get rid of that. ...
All Time top's user avatar
0 votes
0 answers
19 views

How to close database connection when cancel Pentaho Table input Preview?

I recently upgraded Pentaho from version 6.1 to version 9.1 CE. And I encountered a difference in behavior that gives me difficulties. When I use the "Preview" in the Table Input step with a ...
user1277317's user avatar
1 vote
1 answer
34 views

Exception when executing JDBC query - Illegal instant due to time zone offset transition with Logstash

I have the following JDBC input: input { jdbc { id => "mypipeline" jdbc_driver_class => "com.mysql.jdbc.Driver" jdbc_driver_library => "/usr/share/...
Hasan Can Saral's user avatar
0 votes
1 answer
26 views

Confluent MySQL connector connection not established

I am trying to connect MySQL DB (installed in my laptop) from Confluent Cloud Remote access using MySQL Source connector. I am not able to establish the connection with MySQL Connector. Error: Unable ...
Adhish's user avatar
  • 55
0 votes
1 answer
20 views

How to prevent Apache Hive from connecting directly to jdbc bypassing Zookeeper

Apache Hive protection via Apache Ranger is configured The connection goes through the zookeeper quorum, for example: jdbc:hive2://d01.test.local:2181,d 02.test.local:2181,d 03.test.local:2181/;...
Alatau's user avatar
  • 29
0 votes
0 answers
18 views

Facing problem with the statement inJDBC, while query produces correct results

I have a project where ,based on an already created postgresql database , I want to have some return statements to show some results and see if they matach the query results. The first question I need ...
DilligentSlacker's user avatar
0 votes
0 answers
25 views

ORA-00001: unique constraint violated with batchUpdate but with update all good

I have an interesting problem. Using spring boot and jdbctemplate. I have two SQLs. The first SQL creates the record and the primaryKey is retrieved. A second SQL attempt to create another table is ...
Valdy B's user avatar
  • 130
0 votes
1 answer
20 views

How to store kafka topic into db using connectors

I want to store key from topic to column MY KEY and value from topic to column MY_VALUE I tried: apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaConnector metadata: name: my connector labels: ...
hudi's user avatar
  • 15.1k
0 votes
1 answer
7 views

External Access to PieCloudDB Database

I encountered errors when trying to connect to virtual data warehouse in PieCloudDB database using JDBC or DBeaver client tools. How can I configure the permissions to enable external access?
Meliodas Dragon's user avatar
0 votes
0 answers
19 views

Error when reading ClickHouse table with complex data types using PySpark JDBC

I am trying to read data from a ClickHouse table using PySpark's JDBC connector. The table schema includes complex data types such as Tuple and Array. Table Schema: CREATE TABLE test.test ( `...
FeoJun's user avatar
  • 103
-2 votes
0 answers
41 views

Error connecting in Java to MySQL using JDBC

I'm trying to make a Java connection to MySQL using JDBC, but when I run the command in Java, I get this error. My code: package Conexao; import java.sql.Connection; import java.sql.DriverManager; ...
Micael Lucas's user avatar
-1 votes
1 answer
18 views

bitnami jasperreports: how to add clickhouse jdbc driver upon helm chart install? [closed]

I am trying to replace old jasperreports instance with bitnami jasperreports helm chart. In order to migrate all existing reports I need to configure datasources. One of the datasources is clickhouse ...
ludenus's user avatar
  • 1,159
0 votes
0 answers
22 views

How can we convert a PEM format key file to DER format for use in JDBC SSL connection to PostgreSQL DB?

We are trying to make SSL connection to PostgreSQL DB through JDBC and for that we are required to pass key file in der format only. We are facing issue with the key file in DER format which is ...
Ankit Kothiya's user avatar
-2 votes
1 answer
44 views

How to continuously update to database server with JDBC in Java without increase the amount of RAM consumption?

I write a fighting game in JavaFX, using JDBC to update information to a MySQL database. Most tasks that get basic information from the database server will work properly if not repeated continuously. ...
antoo5_11's user avatar
-1 votes
0 answers
22 views

Why is my Java-Spring project not connecting to PostgreSQL 15 even though my h2 database was working? [closed]

server.port = 8082 spring.datasource.url=jdbc:postgresql://localhost:5433/dcbapp spring.datasource.username=postgres spring.datasource.password=12345678 spring.jpa.hibernate.ddl-auto=...
Tony Stark's user avatar
0 votes
0 answers
15 views

Spring cloud config search-path alternative for JDBC

After reading the doc, I understood that search-path is only for git backend. My app is currently a modulith : each root package reflects a bounded context. We have an old table containing a lot (a ...
Archange's user avatar
  • 397
0 votes
0 answers
6 views

How to compile/package and load an extension with Xerial JDBC Sqlite library?

I am using Xerial sqlite JDBC library in my Java application and need to add memstat extension so that I can track heap usage of Sqlite. I do not have great knowledge of C++. I want to know how can I ...
Saurav Prakash's user avatar
1 vote
2 answers
42 views

How to Increase JDBC fetchSize in ORDS and Improve Response Time for Large Resultsets?

We are looking at using Oracle REST Data Services to return some large datasets, but the response time is really slow. We have the ORDS server installed in a different region compared to the Oracle ...
Göran Paues's user avatar
0 votes
0 answers
28 views

Resolve Error : #sql is an illegal character

I am trying to write a SQLJ application program to access Db2 data but I am facing some errors while creating the context for the connection as per the IBM manual. I am receiving errors for the lines ...
Jaya sakthivel's user avatar
-1 votes
1 answer
56 views

How to fix 'no suitable driver found' error when connecting to a PostgreSQL database with Java and JDBC? [duplicate]

I'm trying to connect to my postgresql database on my localhost with Java and JDBC. But getting error that is no suitable driver found for this. I successfully connected to the database in the ...
Mikhail's user avatar
0 votes
0 answers
18 views

Connecting to Aerospike host via SSL using the JDBC driver defaults to 3000 port

I am trying to connect to an aerospike host which requires SSL. Connecting via the aql command works fine. However connecting to the same using the JDBC driver fails. Running the following command is ...
midhun mathew's user avatar
0 votes
0 answers
25 views

Mapping Regular Data Types to ClickHouse JDBC Supported Data Types in Kotlin

I'm currently working on a Kotlin/Java/Gradle project where I'm interfacing with ClickHouse using their JDBC driver. I'm writing a function that generates a ClickHouse file based on a given list of ...
chumbo79's user avatar
0 votes
0 answers
44 views

PreparedStatement automatically adds the \

I'm trying to make a query using the PreparedStatemant: private static final String DEFAULT_GET_PROCS_DT_LOG = "(SELECT concat(date_format(max(dt_start),'%Y-%m-%d'),'%') FROM table)"; ...
Alex's user avatar
  • 71
0 votes
1 answer
14 views

Not able to connect to spark thrift server via jdbc driver in play framework with anorm

I am trying to connect my spark thrift server using play framework via anorm. Play framework version - 2.8.18 Connecting to jdbc as explained here Anorm - 2.7.0 Spark thrift server version - spark 3....
Bill Goldberg's user avatar
0 votes
1 answer
33 views

Issue in reading Pyspark Dataframe using JDBC jars in Spark Standalone

Am Using PySpark standalone application To read data from multiple RDBMS sources like Oracle and SQL Server. The 3rd party jdbc jars are called in runtime. The below code is working if I add only one ...
MkKnight's user avatar
0 votes
0 answers
7 views

The jdbcSyncConnector cannot track the schema to insert or update the message from kafka topic

I am using two containers one is the postgres:latest image and the other is debezium/connect:latest. There is a topic that its data needs to be inserted into a specific schema in the database. Here is ...
user21968415's user avatar
0 votes
0 answers
28 views

Spark JDBC connection to ClickHouse gives "No suitable driver" and "NoClassDefFoundError" errors

I am trying to establish a JDBC connection between Spark and ClickHouse using the ClickHouse JDBC driver. However, I am encountering the following errors: Py4JJavaError: An error occurred while ...
FeoJun's user avatar
  • 103
0 votes
0 answers
23 views

Postgres connection stuck at idle even after serving 200 requests per second through a JDBC connection

Just like the title says. I am monitoring the pg_stat_activity table in my Postgres DB and trying to capture the behavior of my Tomcat JDBC connection pooling implementation. The idle connections that ...
Iceweasel's user avatar
0 votes
0 answers
29 views

Input must be of type RowSet (GoAnywhere/SQL JDBC)

Input must be of type RowSet (GoAnywhere/JDBC/MSSQL) This is in relation to GoAnywhere MFT/JDBC (6.1)/MSSQL Anyway, we have GoAnywhere and currently on a version that isn't forced to use Java >=v11 ...
marvin83's user avatar
0 votes
0 answers
51 views

How to optimize JDBC DB2 Automatic client reroute (ACR) it Takes too long

We have a DB2 environment in a HADR cluster. The Java application connects to the database via JDBC. In the event of an error, this should connect to the backup database. This connection takes about ...
Thomas's user avatar
  • 1
-2 votes
0 answers
20 views

Why am I getting a NullPointerException when returning a ResultSet in my Java JDBC program? [duplicate]

I have a lab assignment about jdbc or Java database connection and it requires me to implement a bunch of methods like a method for connecting the database with the java program or selecting, ...
Red.brclii's user avatar
1 vote
0 answers
67 views

Error Wildfly jdbc : The server selected protocol version TLS10 is not accepted by client preferences

I use an old version of Server Express (MS SQL Server 2005 - 9.X) because of legacies issues, therefor I cannot use TLS2 nor TLS. (I know, it's not recommended). With R dbi and java alone, the JDBC ...
Floris's user avatar
  • 11
0 votes
0 answers
22 views

Py4JJavaError: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.spark

I'm trying to connect pyspark to SQLServer v.16 (reading a table). My spark and pyspark versions are same, I've also downloaded spark mssql server connector (spark-mssql-connector_2.11_2.4-1.0.2.jar) ...
Kamakshi Sharma's user avatar
0 votes
0 answers
17 views

Oracle database change notification in Quarkus 3.0.3.Final

I'm new to oracle database change notification. using this code i get exception when execution is on stmt.execute("SELECT e.EMPLOYEE_ID, e.FIRST_NAME, e.LAST_NAME FROM EMPLOYEES e WHERE e....
gilbert winiga's user avatar
0 votes
0 answers
14 views

Unable to append to an Oracle table from R Server using dbAppendTable()

I have created a table in the oracle database from a dataframe using the following code: drv_oracle <- JDBC(oracle_driver, oracle_jdbc_jar) #creating DBI driver conn_oracle <- dbConnect(...
avishkar683's user avatar
-1 votes
0 answers
52 views

How to capture exceptions from a store procedure using JDBC when the SP only one sql statement

I have the SP like the following: ALTER procedure dbo.TroubleSomeSP as BEGIN SELECT CONVERT(varchar(10), cast(nullif('nothin', '') as date), 120); END If execute getMoreResults() method before ...
Bruce's user avatar
  • 41
0 votes
1 answer
44 views

connection.close() does not close the connection at server side

I am doing some data validations on Oracle DB. There are 10 different types of validations I have to do. Each set of validation contains hundreds of test cases. To save time, I am running the ...
Miracle's user avatar
  • 81
0 votes
1 answer
63 views

How to encrypt JDBC password for apache-tomcat-9.0.74?

Decryption of JDBC Password for Tomcat not working for apache-tomcat-9.0.74 using SecureTomcatJDBC.jar. What should be the work around? I followed the steps provided in https://www.aivhub.com/wiki/...
Debraj Bhowmik's user avatar
0 votes
0 answers
13 views

Generate a new message, record or documents in elastic index

currently I am using JDBC plugin to run some statements from the database, so I would like to track the results returned from this database, sometimes this statements doesn't returned any data to ...
Moabd's user avatar
  • 1

1
2 3 4 5
660