Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
1 vote
0 answers
73 views

JavaFX + Spring: Encountering org.springframework.beans.factory.NoSuchBeanDefinitionException when trying to run SQL query [duplicate]

I am trying to develop a desktop application using JavaFX and Spring Framework in Intellij. I have model class, repository class, controller class, and a view class. But when I try to run the program, ...
ganjaam's user avatar
  • 1,308
0 votes
0 answers
55 views

How to write a select for specific partition using spring? [duplicate]

I'm trying to write select like this SELECT * FROM :partitionName limit :limit By using spring named jdbc template public List<MyDto> findInPartition( String partitionName, int ...
denstran's user avatar
  • 366
0 votes
1 answer
108 views

Check if a JdbcClient transaction ran successfully in Java Spring

I need to insert one row of data in two different tables. Since the tables are related, i grouped the insert in a TRANSACTION in order to make them behave as an atomic operation. My code follows: ...
Lucca Bibar's user avatar
1 vote
2 answers
110 views

Int range in Spring Boot Batch

I have a Spring Batch application, where I transfer data from one database to another (the target DB is PostgreSQL, with enough space). I'm executing the following query: SELECT s.name, s.brand FROM ...
RafalQA's user avatar
  • 141
0 votes
2 answers
493 views

Unable to connect Supabase Database to Spring Boot Application due to Timeout Error

I'm working with spring boot and postgresql project. I able to connect my spring boot application to local postgresql without any problem. Then I tried to connect my spring boot project with supabase ...
ruwan liyanage's user avatar
0 votes
1 answer
46 views

Spring Integration multiple integration flows, each with its own JDBC Inbound Channel Adapter

I want to read from 4 database tables using JDBC Inbound Adapters with polling. Each JDBC Inbound Adapter serves as the starting point of one of my 4 integration flows. Each flow is independent of the ...
gingersa's user avatar
0 votes
0 answers
109 views

How to create a JDBC repository configuration using AbstractJdbcConfiguration?

I have used a JDBC repository with a single database using auto configuration, and it worked very well. Now, I have two different databases. I created two separate configurations with @...
dkarczmarski's user avatar
2 votes
2 answers
89 views

How to bulk delete rows in Postgresql with a where clause that might contain null values using Spring JDBC

In Postgres, using Spring JDBC's NamedParameterJdbcTemplate, if I want to delete a row using a where clause that may include a null value, I have to do something like this... val sql = if (...
KevinS's user avatar
  • 7,932
0 votes
2 answers
229 views

Spring JDBCClient with IN clause query for PostgreSQL type field

I am using the new Spring boot JDBCClient, where I am trying to use a List into query IN clauses. I found a solution that does not seem to be a very elegant/handy way of using any() operator, so I am ...
Tsvetoslav Tsvetkov's user avatar
0 votes
2 answers
145 views

Not having a clear password in a plain text configuration file [closed]

I have a general question about not displaying passwords in a configuration file. From my application, I make a JDBC connection to the database. The typical Spring configuration is: A properties file ...
yaki_nuka's user avatar
  • 812
2 votes
1 answer
79 views

Wondering why spring leader election with JDBCLockRepository is constantly trying to insert into DB

Some year ago, we switched from some self built leader election mechanism to spring integration leader election, both on MariaDB clusters, relying on duplicate key violation. We switched to spring ...
mangiari's user avatar
2 votes
1 answer
85 views

Using dynamic table names, correctly quoted, in JdbcTemplate

I know about prepared statements and binding parameters and why you can't have the table name be a placeholder (needed for query planning), SQL query building by concatenating strings (don't do it), ...
Fabrice Gabolde's user avatar
2 votes
0 answers
63 views

How can I use SNAPSHOT isolation level with Spring

Is it possible with Spring to use 'vendor' isolation level ? I want to use SQL Server SNAPSHOT isolation level which is 0x1000 (found it in the driver code ISQLServerConnection). I want to select in a ...
jpprade's user avatar
  • 3,704
0 votes
0 answers
68 views

How do I insert Array of PostgreSQL Composite Type using SpringBoot's JdbcClient

I'm trying to store an Array of a composite type that has no relations, Just data that I want to store and reuse during runtime hence why I'm not using multiple rows to store this data. shop_item ...
SkyWolfXP's user avatar
2 votes
0 answers
87 views

DataSourceBuilder and Spring Testcontainers

I created an example project to try vibur DBCP support in the Spring 3.5.0-M1, it adds Web, JDBC API, TestContainers, Postgres as dependencies, and use Java 21 and Maven to build the project. The ...
Hantsy's user avatar
  • 9,601
0 votes
0 answers
36 views

How to use JdbcClient in multiple threads?

Here is a simple test that works fine: @Autowired private JdbcClient jdbcClient; @Test void syncTest() { jdbcClient.sql("CREATE TEMP TABLE mytemp(id INT)").update(); jdbcClient.sql(&...
Denis's user avatar
  • 1,325
2 votes
1 answer
77 views

Force commit JDBC query

I have a test that creates an entity, updates it and checks that last modification date time is increased after update. I use JdbcClient to execute the following queries on PostgreSQL: INSERT INTO ...
Denis's user avatar
  • 1,325
0 votes
0 answers
21 views

What input to NamedParameterUtils.parseSqlStatement reach the "endMatch = false;" line inside called function skipCommentsAndQuotes?

I'm writing my own lib on top of some Spring functionalities. Sadly NamedParameterUtils.parseSqlStatement and related classes do not expose anything useful (almost everything is declared private, and ...
Vento's user avatar
  • 91
1 vote
1 answer
78 views

Pass values to a prepared statement where there are 2 values to insert in 6 places

I have the following SQL string: SELECT fm.*, u.username AS friend_username FROM friend_messages fm JOIN users u ON (u.id = fm.sender_id AND fm.sender_id = :friendId) OR (u.id = ...
Onyx's user avatar
  • 5,810
0 votes
2 answers
61 views

JdbcTemplate swallows permission errors on compound commands

We are trying to validate that SQL "where" fragments supplied by users does not have any "write" side effects or other SQL injection. We are doing this by running the commands over ...
DavesPlanet's user avatar
0 votes
2 answers
768 views

Issues connecting Spring Boot project to PostgreSQL database

I'm working on a Spring Boot project that connects to a PostgreSQL database, but I'm encountering issues with the database connection setup. The logs show the following: The database driver is ...
Shi Eng Ng's user avatar
0 votes
0 answers
49 views

How do we define database for storing OAuth2.0?

I'm building an OAuth 2.0 authorization server using Spring Security OAuth2. I've configured the following beans: @Bean public OAuth2AuthorizationService authorizationService() { return new ...
OmniCoder77's user avatar
0 votes
1 answer
23 views

try to use database using Spring JDBC but its show noclassdeffounderror

error msg i got Error :-NoClassDefFoundError 12:19:07.250 [main] DEBUG org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support....
Ruchi Gupta's user avatar
0 votes
2 answers
349 views

JdBcPagingItemReader fails with Null NamedJdbcParameter for Step Configuration

I am attempting to create a simple Step for a batch process which takes ProductDetail information and other information from the item processor to create and write the new ProductResult to a Mongodb ...
BreenDeen's user avatar
  • 744
0 votes
1 answer
136 views

How to auto-create the database with Spring Boot in production mode

I'm trying to automatically create my production database on application startup since I'm using the spring.jpa.hibernate.ddl-auto=validate application.properties property in production. I tried a lot ...
BullyWiiPlaza's user avatar
0 votes
0 answers
44 views

Do I need to close resources with dynamic datasource (Spring)

I need to dynamically create a datasource, jdbcTemplate and TransactionTemplate. Should I somehow close datasource, jdbcTeplate and TransactionTemplate on my own, since I create them myself? I am ...
Violetta's user avatar
  • 599
0 votes
0 answers
26 views

Unable to perform DB operation using HikariPool connection from a child thread

I am performing db operation (get a row value) using Entity and Repository. When the db operation is performed from the main thread, it works fine. When the db operation is performed form the child ...
pavan kumar's user avatar
0 votes
1 answer
220 views

Spring JDBC JdbcTemplate inserts ain't committed

I have a problem - I cannot insert data in the table with Spring JDBC. Don't know is it important, just in case - I have an app that uses Spring/SpringBoot with Spring JPA and other things. The ...
BUKTOP's user avatar
  • 989
0 votes
0 answers
33 views

Multiplexing read-only/read-write datasource

I've implemented CustomRoutingDataSource. It should multiplex between two DataSources depending on whether current transation is ReadOnly or not. public class CustomRoutingDataSource extends ...
ibre5041's user avatar
  • 5,326
0 votes
0 answers
24 views

How does the PersistanceService#streamOf method in CAP for Java loads objects in memory?

I am new to CAP (Cloud Application Programming) with Java. I recently learned that using a ResultSet with Java's JDBC you can load results in memory in batches by streaming them. When using the ...
Aleks's user avatar
  • 1
0 votes
1 answer
155 views

Bean instantiation via factory method failed; Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer

SpringBootDerbyApplication package guru.springframework; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @...
JamesB's user avatar
  • 529
0 votes
1 answer
56 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
-3 votes
1 answer
201 views

Batch Size and Fetch Size in Spring Boot JDBC client

I am exploring JDBC client of spring boot, and looking options to set batch size and fetch size. But can not find any document/article explaining the same. Is there a way preferbly in properties file ...
Yash's user avatar
  • 27
0 votes
1 answer
48 views

Springs's KeyHolder, oracle jdbс and insert-query with line breaks lead to ORA-00931: missing identifier

I store sql-queries in resource files with pretty human-readable formatting(with line breaks and indents). Suddenly I faced with issue: simple query, like below, works fine without fetching generated ...
Grigory Frolov's user avatar
0 votes
0 answers
291 views

Connection oracle.jdbc.driver.T4CConnection@73e0fb8c marked as broken because of SQLSTATE(08003), ErrorCode(17008)

@Service public class StudentService { @Autowired private StudentRepository studentRepository; public void enrollStudents(List<Student> students) { //Calling 1st ...
Karthik's user avatar
  • 1,392
-1 votes
2 answers
388 views

Best way to have second read-only db connection with Spring JDBC

I'm developing on an spring boot app using Hibernate and an Postgresql db for persistence. Nothing special so far and working as intended. Now i want to have (read-only) access to second database ...
CodeWizard1985's user avatar
0 votes
0 answers
80 views

Why JdbcTemplate.batchUpdate() from spring-core 5.3.31 is comparitevely very slower than spring-core 4.2.9.RELEASE

I am using NamedParameterJdbcTemplate class in Spring Boot application. and my app has a bulk upload feature. I am updating specific columns but currently observing -> with spring-core 4.2.9....
Akash Gusain's user avatar
1 vote
0 answers
51 views

GeneratedKeyHolder not returning generated id for Column created using UUID() in MySQL table

My table def in MySQL looks like this : create table if not exists CUSTOMER ( CUSTOMER_ID CHAR(36) DEFAULT (UUID()) primary key, ...
Mohammad Umair's user avatar
2 votes
1 answer
66 views

Bulk insert data in to a oracle DB using spring JDBC

As part of test data setup, we need to insert around 200K records across few tables in a oracle database. we have a spring based application which we are using to insert the records in database. I ...
Golden Heart's user avatar
0 votes
0 answers
42 views

How to check data existence before inserting new data in highload service?

I'm working on a highload service in which I'm recieving batch messages from kafka (about 500 at once). Those messages represent entities in db. To simplify, lets imagine entity A like this: create ...
denstran's user avatar
  • 366
0 votes
1 answer
51 views

Implements tri angluar table structure in JDBC

I have a problem with a triangular table structure. See ER diagram. enter image description here I have implemented this in Java with the help of JDBC. The station class: @Table("station") ...
Funnypinky's user avatar
1 vote
1 answer
97 views

The most efficient way to check data existence in db with spring jdbc template

I'm working on a highload service in which I'm recieving batch messages from kafka (about 500 at once). Those messages represent entities in db. To simplify, lets imagine entity A like this: create ...
denstran's user avatar
  • 366
1 vote
2 answers
285 views

Insert/Update with NULL values in Oracle's JDBC causes performance issue

We have a Spring application connecting to Oracle via SpringJDBC (jdbcTemplate), <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc11</...
gene b.'s user avatar
  • 12.6k
-1 votes
1 answer
59 views

spring jdbctemplate not returning stored procedure with implicit cursor

i have a SP like the following create or replace mystoredprocedure(userid VARCHAR, batchno VARCHAR) as begin open cursor c1 for select * from table A; dbms_sql.return_result(c1); open cursor ...
Kannan Sundararaj's user avatar
1 vote
1 answer
68 views

Spring Boot Java App demonstrating jdbc caching behavior with default config

We have a Spring Boot 3.2.5 app that calls a SQL DB via jdbc to retrieve a map, then uses that map in an operation. We are in the process of migrating this app off Karaf (on Java 8) onto Spring Boot (...
Cbraden's user avatar
  • 11
0 votes
0 answers
170 views

The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

I'm a student, developing with the Spring Tool Suite 4, in a class project (Maven project) and I have got an error called "HikariPool-1 - Exception during pool initialization". In the school ...
NooB's user avatar
  • 1
-1 votes
1 answer
76 views

Storing grandchildren (indirect, transitive) in postgres using Spring data jdbc

I'm having trouble retrieving (but not storing) grandchildren objects using Spring data jdbc. In other words, the root aggregate has a child object, which in turn has a list of child objects. Saving ...
user364902's user avatar
  • 3,394
0 votes
0 answers
191 views

How can I convert a JSONB column from postgres db to a MultiValueMap<String, String> in Java using the @JdbcTypeCode annotation?

I need to read a couple of JSONB columns from Postgres DB in Java and I am trying to use the @JdbcTypeCode(SqlTypes.JSON) annotation to do so following this reference on stack overflow The entity ...
user27316257's user avatar
0 votes
0 answers
227 views

Spring Boot Application Failing to Connect to MySQL Database in Jenkins Pipeline

I’m working on a basic Spring Boot web application using MySQL. When I try to run it in Jenkins, I encounter an issue where it fails to connect to the database. The application works perfectly on ...
anmol kumar's user avatar
0 votes
0 answers
67 views

Getting java.sql.SQLException from DB but it is not execution catch block created for it However it is executing the catch created for Exception

I am trying to insert a record in DB and in one scenario it is throwing java.sql.SQLException(### Error updating database. Cause: java.sql.SQLException: ORA-12899: value too large for column "...
Vishal Gandotra's user avatar

1
2 3 4 5
50