Questions tagged [apache-commons-dbutils]

Apache Commons Dbutils is a toolkit that simplifies the usage of the Java Database Connectivity (JDBC) API.

Apache Commons DbUtils is a component of the Apache Commons project. Apache Commons DbUtils is library that simplifies JDBC programming and is open source software distributed under the Apache License, Version 2.0.

86 questions
0
votes
0 answers

Cannot import commons-dbutils in sbt

I tried adding the common-dbutils dependency to my project using sbt by adding the below line to the build.sbt file. libraryDependencies += "commons-dbutils" % "commons-dbutils" % "1.6" I didn't get any error as well. Looking at the dependency tree…
0
votes
0 answers

Apache DbUtils handler for single row query result

I need to select single row and store it attributes into List, but I do not know what handler could fit. More formal: QueryRunner runner = new QueryRunner();; List row = runner.query("SELECT * FROM table_name WHERE id = ?", new…
0
votes
0 answers

DbUtils ISSUE after downloading jarfile

I have installed and extracted the rsX2ml.jar files .Still my eclipse program is displaying error for the DbUtils code line of cannot be resolved .I have removed and imported the jar files again.
0
votes
1 answer

How to use BeanMapHandler with field to column mapping with key as ID in a nested SELECT query?

I have a nested SQL query to fetch employee details using their ID. Right now I am using BeanListHandler to fetch data as a List
but want to store it as a Map where the ID I originally pass needs to be the key for easy…
BharathYes
  • 787
  • 2
  • 9
  • 25
0
votes
2 answers

Commons DBUtils Oracle 11.2.0.4 with Java 1.7 Binding parameters SQLException ORA-00942

I'm working with Oracle Database 11.2.0.4 with ojdbc6.jar, and I'm using apache commons dbutils v1.7, with JDK 7. So I'm using the QueryRunner and its method in this function private List executeQueryAndReturnBeanList(String query, Class
0
votes
1 answer

Unable to use SecretKey in Databricks

I am trying to use the created secret key on databricks using dbutils.secrets.get(scope="jdbc", key="username") command; but I get an error saying 'Secret does not exist with scope: jdbc and key: username'. I am creating the secret key using CLI -…
0
votes
2 answers

How to recursively get Excel files stored in a folder in dbfs using pyspark?

I have a path mounted in dbfs and I need to extract Excel files path from a given folder and the same folder contains Excel files or sub folder containing Excel files. Current code only gives Excel files in one folder and not in sub folders. files =…
user3222101
  • 1,270
  • 2
  • 24
  • 43
0
votes
1 answer

DBUtils QueryRunner insert on duplicate key update

I'm starting to use the DBUtils lib, but most of my querys are "INSERT ON DUPLICATE KEY UPDATE", I reseached but I haven't found information about how to implement that with the QueryRunner object. Is there a way?
Pedro Joaquín
  • 161
  • 2
  • 12
0
votes
1 answer

DbUtils type conversion issue during object serialization

I am using DbUtils to handle interchangeability between PostgreSQL and MySQL. I kind of expected this to be an issue but was hoping there would be a clean way to handle type conversion. I am using Flyway to do my migrations, so I have to write my…
user0000001
  • 2,092
  • 2
  • 20
  • 48
0
votes
1 answer

Apache JDBC Utilts vs SpringJDBC template. Which is is better?

I was debating my self whether to use jdbcTemplate vs apache DBUtils in my project. My application is a spring app, where we are using jdbcTemplate for few requests. But i was thinking about this very lightweight and easy to understand Apache…
ging
  • 117
  • 8
0
votes
0 answers

Why isn't the BeanListHandler working on my class?

The other day I've found out about DbUtils, so I jumped in a project to test it out. I've created a class called Tag that looks like this. package io.sharpsoft.hooke.rest.models; import java.io.Serializable; import…
Cosmin Stoian
  • 757
  • 10
  • 15
0
votes
1 answer

Java SQL Table names with Special characters

I have a code, which creates tables on the fly. These tables are used to store and get data for different processes. Problem: Table names are being created with special characters like "&" and others. MySQL Allows table names with special…
kris123456
  • 501
  • 1
  • 5
  • 15
0
votes
0 answers

QueryRunner returning "ORA-00972: identifier is too long" passing the value as a parameter

I can't figure out why using a bind variable in the following code fails, but hard coding it works. It also works if I just put a rownum < 2 clause instead of the id clause. None: Using bind variables works just fine in other parts of the…
ScrappyDev
  • 2,307
  • 8
  • 40
  • 60
0
votes
1 answer

Batch Insert and Apache DBUtils

We need to use a third party lib to execute SQL statements and before to start implementing we would like to be sure that the lib can do whatever we want. We are currently evaluating Apache DBUtils. We tried to execute a query like INSERT INTO…
mat_boy
  • 12,998
  • 22
  • 72
  • 116
0
votes
1 answer

Java - Use DBUtils BeanListHandler to convert all dates from a query to JodaTime's DateTime

I'm using the BeanListHandler to convert rows from my database into POJOs. It has been working fine but now I need to do some date comparisons. For this I decided to use JodaTime. I want all Timestamp/Date type rows from my query's result set to be…
user3690467
  • 3,049
  • 6
  • 27
  • 54