spring-jdbc Questions
3
Solved
I am trying to use Java spring custom Oracle type as a parameter and getting the following error:
org.springframework.jdbc.UncategorizedSQLException:
### Error updating database. Cause: java.sql.S...
Molliemollify asked 5/2, 2014 at 21:42
2
Solved
I am using Spring JdbcTemplate class in my project.I have the following code:
List<PersonDTO> personList = jdbcTemplate.query(query, new RowMapper<PersonDTO>() {
@Override
public Pe...
Shamanism asked 4/4, 2018 at 12:11
1
We have large system using Postgresql DB, with rather complex database structure. And we have many DB-related integration tests for that system.
Because of the complex DB structure and usage of pos...
Hendrick asked 23/3, 2018 at 8:34
1
Solved
So I've been trying for over a week to get the JdbcTokenStore to work, but I can't seem to figure out what is wrong.
I'm not using spring boot and I'll try my best to explain what I'm doing.
So let...
Entrepreneur asked 22/3, 2018 at 21:34
2
Solved
I have a SP like this
create or replace PROCEDURE myproc
myvar in out mytable.mycol%TYPE
where mycol is char(1 byte)
From java code,I try to bind a String/Character to this variable and I get ...
Nephelometer asked 26/2, 2018 at 13:18
6
Solved
I'm getting error code -4220 with null SQL State .the SP "XXXXX" contain VARGRAPHICS data type. Below is complete exception stack trace. SP is executing properly, the error is coming while reading ...
Grabble asked 4/6, 2013 at 5:59
2
Solved
String SQL = "INSERT INTO Employee (name, age, salary) VALUES (:name,:age,:salary)";
Map namedParameters = new HashMap();
namedParameters.put("name", name);
namedParameters.put("age", age);
named...
Brewton asked 1/3, 2017 at 5:29
10
Solved
From the Spring JDBC documentation, I know how to insert a blob using JdbcTemplate
final File blobIn = new File("spring2004.jpg");
final InputStream blobIs = new FileInputStream(blobIn);
jdbcTempl...
Soler asked 5/5, 2010 at 5:43
4
I have a Spring Boot webapp connected to a Postgres 9.6 database.
I use Spring's JdbcTemplate for executing SQL statements.
Each table in my database has triggers for INSERT, CREATE and DELETE stat...
Coxalgia asked 5/1, 2018 at 11:28
2
Solved
I am using the Spring JdbcUtils.extractDatabaseMetaData() method to analyze the database. The function calls a callback and hands over a DatabaseMetaData object. This object provides the getColumns...
Armillia asked 9/1, 2012 at 17:54
2
I want to pass Dto as in parameters and call stored procedure in spring jdbc.Is it possible,In doing so?
I want to call stored procedures with dto as in paratmeters instead of setting parameters?B...
Asper asked 5/5, 2017 at 4:44
3
Solved
I'm trying to Autowire a database by
@Autowired
private DataSource dataSource;
I have one datasource in my application.yml
spring:
profiles:
active: dev
---
spring:
profiles: dev
datasour...
Sukhum asked 17/4, 2017 at 16:58
2
Solved
Problem: when my spring application is running, and meanwhile the database server is stopped/restarted, then then db connection is lost and never restored.
I tested as follows:
execute query: OK...
Agranulocytosis asked 14/11, 2017 at 10:16
1
Solved
I have an integrations test class for my UserController. The contents of the following class are:
// imports...
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWit...
Volotta asked 13/10, 2017 at 12:21
3
Solved
This page on Spring JDBC says
The DataSourceUtils class … provides static methods to obtain connections from JNDI
However the API doc for DataSourceUtils does not include the said static meth...
Alyshaalysia asked 8/9, 2010 at 23:50
1
Solved
I was reading this regarding to where to place Transactional(interface vs implementation):
The Spring team's recommendation is that you only annotate concrete classes with the @Transactional ann...
Sweetener asked 2/8, 2017 at 14:33
3
Solved
Consider a situation where all client data is stored in its own database/catalog and all such databases are stored in a single RDBMS (client-data). Master data (e.g. clients, ...) is kept in anothe...
Alethaalethea asked 16/10, 2014 at 22:37
2
When calling an Oracle stored procedure with OracleTypes.ARRAY input parameter multiple times, getting the following error :-
org.springframework.jdbc.UncategorizedSQLException: CallableStatementC...
Stratify asked 11/1, 2016 at 7:48
2
I am trying to update thousands of rows in a table using batchUpdate. My requirements are:
1) Assume there are 1000 records in a batch. Record No 235 caused an error. How do I find out which recor...
Enrage asked 27/7, 2016 at 14:9
3
I am using spring Jdbc , How do i retrieve the database vendor name from the jdbc template without going via the Connection interface . Is there an API provided by Spring which could give an enum h...
Wolters asked 9/5, 2017 at 11:8
4
Solved
I have a class with some string, int and boolean fields. I have the getters and setters declared for them.
public class SomeClass {
private int id;
private String description;
private boolean...
Jany asked 14/3, 2013 at 14:19
1
I have the following method (full JdbcInvoiceRepository class below) executed in a Spring Boot project:
public int[] bulkSaveInvoices(List<Invoice> invoices){
String insertSQL = "INSERT IN...
Wrestling asked 16/3, 2017 at 13:11
0
Hi I am using Spring Boot 1.3.5.RELEASE. I have a situation where I need to fire
INSERT INTO someTable1 (col1, col2, col3)
SELECT (10346, someTable2Id, 1048) FROM someTable2.
I am using Sprin...
Amyl asked 9/11, 2016 at 6:36
2
Solved
I am studying for the Spring Core certification and I have some doubts about how Spring handle the JDBC queries:
So I know that I can obtain data from my DB tables in various ways depending on the...
Inhere asked 21/12, 2014 at 17:22
4
Solved
I'm using Spring's JdbcTemplate and running a query like this:
SELECT COLNAME FROM TABLEA GROUP BY COLNAME
There are no named parameters being passed, however, column name, COLNAME, will be passed...
Diarrhoea asked 13/11, 2012 at 0:59
© 2022 - 2024 — McMap. All rights reserved.