Questions tagged [jdbi3]
49 questions
0
votes
3 answers
Nested objects jdbi 3 with bean mapper is null
I have a child class with a member variable nested as defined below. However, when I run
val child = childRepo[1]
child.parent is null. How can I automatically fetch the nested member variable?
Models.kt
import org.jdbi.v3.core.mapper.Nested
data…

Simen Russnes
- 2,002
- 2
- 26
- 56
0
votes
1 answer
Dropwizard JDBI3 DataSourceFactory not found
First of all, I'm pretty new in the area of Java Web Development.
I'm working on a small project with Dropwizard. I want to use JDBI to interact with my Database. However, I cannot import the DataSourceFactory. I'm using Maven.
From what I read I…

hupeGlk
- 1
0
votes
1 answer
Specify JDBI default plugin (SqlObjectPlugin)
Is there a way to tell JDBI I want to use a specific plugin (SqlObjectPlugin in my case) throughout my entire application, without having to re-specify upon each use? Throughout my application code I have the following:
var jdbi =…

Vahid Pazirandeh
- 1,552
- 3
- 13
- 29
0
votes
0 answers
MSSQL | JDBI 3 | NoRowsSelect For Count Query After Update
Java class creates a prepared statement and binds value
MS-SQL is the data store used
Jars Used
jdbi3-core-3.8.2
HikariCP: 3.4.1
mssql-jdbc:7.2.2.jre8
DECLARE @status VARCHAR(max)
DECLARE @destination VARCHAR(max) = 'xyz'
DECLARE @attributes_var…

vivek
- 1
0
votes
1 answer
Insert if not exist and update certain values if it does
I'm using JDBI3 (and would like to use @SQLUpdate) and an Oracle DB.
I want to insert an item with 4 columns into the table if it does not exist, if it does exist I want to instead update 3 of the 4 values of the item. If it wasn't Oracle I would've…

Zanndorin
- 360
- 3
- 15
0
votes
1 answer
Are all exceptions throw from Jdbi of type JdbiException?
It states here:
https://jdbi.org/apidocs/org/jdbi/v3/core/JdbiException.html
that JdbiException is the Base unchecked exception for exceptions thrown from jdbi.
However, if I'm calling the withHandle method with various different…

rmf
- 625
- 2
- 9
- 39
0
votes
1 answer
JDBI select on varbinary and uuid
A legacy mysql db table has an id column that is non-human readable raw varbinary (don't ask me why :P)
CREATE TABLE IF NOT EXISTS `tbl_portfolio` (
`id` varbinary(16) NOT NULL,
`name` varchar(128) NOT NULL,
...
PRIMARY KEY…

fred
- 1,812
- 3
- 37
- 57
0
votes
1 answer
Can we use multiple datasources with jdbi in spring boot project
Can we use multiple datasources with jdbi.
Will the configuration will be same as what we have with JPA : https://www.baeldung.com/spring-data-jpa-multiple-databases

Prashant Kumar
- 53
- 7
0
votes
0 answers
JDBi3 UnableToCreateStatementException: No argument factory registered for 'false' of qualified type org.jdbi.v3.core.argument.NullArgument
I'm running into a strange issue where if I try to bind("paramName", false) to a nullable boolean (SQL bit) in my database, I receive the following error:
org.jdbi.v3.core.statement.UnableToCreateStatementException: No argument factory registered…

TheFunk
- 981
- 11
- 39
0
votes
1 answer
JDBI3 Returning a Parameterized Class
I have an abstract EntryPoint class that looks like this:
public abstract class EntryPoint implements Serializable {
public EntryPoint(){}
protected ArrayList tiedTags;
public abstract ArrayList getTiedTags();
…

TheFunk
- 981
- 11
- 39
0
votes
1 answer
JDBI/Postgress Select query failed with datetime comparison
Postgress Version: 10.4
table column name/type: updated_at timestamp(6) with time zone
SQL query:
final String SELECT_PAYMENT_INFO_QUERY =
"SELECT i.code, p.*
FROM information i
INNER JOIN product p ON i.ref = p.information_ref
…

bluelabel
- 1,996
- 6
- 29
- 44
0
votes
1 answer
Log Jdbi interactions with database
I've reviewed a couple of questions/answers here around the subject, but nothing works out-of-the-box. I've also read the SqlLogger section in the official documentation, but still I can't find a way log/visualize what Jdbi (version 3.x) "is doing"…

x80486
- 6,627
- 5
- 52
- 111
0
votes
0 answers
JDBI Postgis JTS wrapper
I'm trying to use the PostGIS-JDBC-jtsparser (version 2.5.0) module to inject the JTS java object as a parameter of a @SQLQuery but I can't figure out how.
I understand that an argument factory should be injected in my JDBI config but which one?
If…

Alain B.
- 100
- 1
- 5
0
votes
1 answer
How to map SQLException from SQL-Object in JDBI3
Lets say I have table defined as:
CREATE TABLE ITEMS(
ID BIGINT PRIMARY KEY,
NAME VARCHAR2,
CONSTRAINT NAME_IS_UNIQUE UNIQUE (NAME)
);
Important part is NAME_IS_UNIQUE constraint.
With corresponding POJO Item as:
class Item{
private Long…

alebu
- 420
- 1
- 5
- 15
0
votes
1 answer
org.jdbi.v3.core.statement.UnableToCreateStatementException: Superfluous named parameters provided while the query declares none
@SqlQuery("Select id from user where type in ()")
List getUserIdsByListOfTypes(@BindList("userType") List userType);
I want to fetch the list of Ids from the List of userTypes.
Here User.UserType…

Swarnim Kumar
- 335
- 5
- 21