1,809 questions
1 vote
1 answer
89 views
apache-commons-csv adding extra double quote characters
I'm working on a Kotlin project where I need to take some incoming data and output a csv formatted string. I decided to try using the apache-commons csv library to handle building the csv output. ...
0 votes
0 answers
66 views
SevenZOutputFile object instantiation takes 2 min for subsequent executions after 1st execution
Below is the code used to generate 7z file from a list of files available. where 1st time 7zipping happens in few milli seconds for the same files from 2nd time onwards taking 2 min to 7zip. try (...
2 votes
2 answers
135 views
How to get the real size of a directory used on the disk in Java?
I need to get the real size used by a directory in Java. I am running Linux. Today I have FileUtils.sizeOf (path) But this does only summarize the bytes of all files into the directory. As far I see ...
0 votes
1 answer
472 views
How to fix lint 'constructor ZipFile(File!)' is deprecated. Deprecated in Javakotlin(DEPRECATION)
In a kotlin codebase, I'm getting the following lint: 'constructor ZipFile(File!)' is deprecated. Deprecated in Javakotlin(DEPRECATION) for the following minimal code (I've removed everything but ...
1 vote
1 answer
256 views
org.apache.commons is seen but FTPClient cannot be resolved to a type
I have a maven project in eclipse. I added the apache.commons.net jar file and made all needed references and dependencies. The intelisense sees no issue, no red lines. Yet when code is run from IDE ...
9 votes
5 answers
8k views
bootJar task fails with Gradle 8.5 and Spring Boot 3.3.0, caused by Spring Boot Gradle plugin's usage of Apache commons compress library
I have the following setup: Gradle: 8.5 Spring Boot 3.3.0 Kotlin: 1.9.23 Before I used Spring Boot 3.2.6, and after update to the latest version I encounter the following error when running bootJar ...
-1 votes
1 answer
217 views
Java - org.apache.commons.io.FileUtils.copyFileToDirectory(sourceFile, destination) is failing to copy file
private void copyFile() { try { String data = "C:\\Test_data\\My_Folder\\data"; String destination = "D:\\test\\CC"; File destDir = new File(destination)...
0 votes
2 answers
145 views
Parse list of object from external yaml file
I have an external YAML file that contains only a list of objects. I need to read this file every time the loadVerificatedEmailsConfiguration method is called. I'm trying to solve this problem using ...
0 votes
2 answers
963 views
Problem when reading a CSV file using Java
I am facing a problem reading my CSV file with Java. The java code I am using to read the CSV file is: package collectData; import java.io.FileReader; import java.io.IOException; import java.io....
0 votes
1 answer
103 views
How to Use try with resource for Prepared Statement getting Exception
Wrote the code to insert batch details in DB but getting the below error org.apache.commons.dbcp2.DelegatingPreparedStatement with address: "NULL" is closed.; nested exception is java.sql....
1 vote
1 answer
688 views
Different base64 encoding validation in java.util and apach-commons
Let's consider the following codebase: val str = "contextId" println(org.apache.commons.codec.binary.Base64.isBase64(str)) String(java.util.Base64.getDecoder().decode(str)) It prints: true ...
1 vote
1 answer
132 views
I am unable to delete the directory due to file is being used by object
I am using Java 11 and Spring Boot v2.3.4 Requirements: Download the files from S3 bucket into local storage (temp directory) Compress to Zip file Upload the Zip files to OTC cloud Delete the ...
1 vote
0 answers
272 views
"Mapping not found error" causes parsing CSV file to fail due to special formatting
When attempting to read a CSV file from another application I get this error. when reading the first line itself. java.lang.IllegalArgumentException: Mapping for season not found, expected one of [...
0 votes
1 answer
277 views
How to add commons-math3-3.1.1.jar to intellij classpath
because I got no answer on thread How to add jar to classpath in IntelliJ? and I'm not the only one facing the problem I repeat this question in a new thread. I tried the file/Project Structure/...
0 votes
1 answer
59 views
How can I use a different separator for interpolation lookups?
I use Apache Commons Configuration to load config files. In the past, the configs getProperty() method was overwritten so that a ${encoded 21$%Ds} within a property value was returned as a decoded ...