diff --git a/.classpath b/.classpath
index 1314e11..3825a8d 100644
--- a/.classpath
+++ b/.classpath
@@ -2,23 +2,26 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/Logs/log4j-1.2.17-source.zip b/lib/Logs/log4j-1.2.17-source.zip
deleted file mode 100644
index 2a9a7f4..0000000
Binary files a/lib/Logs/log4j-1.2.17-source.zip and /dev/null differ
diff --git a/lib/Logs/log4j-1.2.17.jar b/lib/Logs/log4j-1.2.17.jar
deleted file mode 100644
index 068867e..0000000
Binary files a/lib/Logs/log4j-1.2.17.jar and /dev/null differ
diff --git a/lib/Logs/log4j-api-2.23.1-sources.jar b/lib/Logs/log4j-api-2.23.1-sources.jar
new file mode 100644
index 0000000..99009e5
Binary files /dev/null and b/lib/Logs/log4j-api-2.23.1-sources.jar differ
diff --git a/lib/Logs/log4j-api-2.23.1.jar b/lib/Logs/log4j-api-2.23.1.jar
new file mode 100644
index 0000000..0e8e3f5
Binary files /dev/null and b/lib/Logs/log4j-api-2.23.1.jar differ
diff --git a/lib/Logs/log4j-core-2.23.1-sources.jar b/lib/Logs/log4j-core-2.23.1-sources.jar
new file mode 100644
index 0000000..3cf8bc2
Binary files /dev/null and b/lib/Logs/log4j-core-2.23.1-sources.jar differ
diff --git a/lib/Logs/log4j-core-2.23.1.jar b/lib/Logs/log4j-core-2.23.1.jar
new file mode 100644
index 0000000..4a5d553
Binary files /dev/null and b/lib/Logs/log4j-core-2.23.1.jar differ
diff --git a/lib/Logs/log4j-slf4j2-impl-2.23.1.jar b/lib/Logs/log4j-slf4j2-impl-2.23.1.jar
new file mode 100644
index 0000000..f4f7c8c
Binary files /dev/null and b/lib/Logs/log4j-slf4j2-impl-2.23.1.jar differ
diff --git a/lib/Logs/log4j-slf4j2-impl-2.32.1-sources.jar b/lib/Logs/log4j-slf4j2-impl-2.32.1-sources.jar
new file mode 100644
index 0000000..6b95f94
Binary files /dev/null and b/lib/Logs/log4j-slf4j2-impl-2.32.1-sources.jar differ
diff --git a/lib/Logs/slf4j-api-1.7.25-sources.jar b/lib/Logs/slf4j-api-1.7.25-sources.jar
deleted file mode 100644
index b2a3d83..0000000
Binary files a/lib/Logs/slf4j-api-1.7.25-sources.jar and /dev/null differ
diff --git a/lib/Logs/slf4j-api-1.7.25.jar b/lib/Logs/slf4j-api-1.7.25.jar
deleted file mode 100644
index 7e62f13..0000000
Binary files a/lib/Logs/slf4j-api-1.7.25.jar and /dev/null differ
diff --git a/lib/Logs/slf4j-api-2.0.16-sources.jar b/lib/Logs/slf4j-api-2.0.16-sources.jar
new file mode 100644
index 0000000..029344a
Binary files /dev/null and b/lib/Logs/slf4j-api-2.0.16-sources.jar differ
diff --git a/lib/Logs/slf4j-api-2.0.16.jar b/lib/Logs/slf4j-api-2.0.16.jar
new file mode 100644
index 0000000..cbb5448
Binary files /dev/null and b/lib/Logs/slf4j-api-2.0.16.jar differ
diff --git a/lib/Logs/slf4j-log4j12-1.7.25-sources.jar b/lib/Logs/slf4j-log4j12-1.7.25-sources.jar
deleted file mode 100644
index 0cd5be7..0000000
Binary files a/lib/Logs/slf4j-log4j12-1.7.25-sources.jar and /dev/null differ
diff --git a/lib/Logs/slf4j-log4j12-1.7.25.jar b/lib/Logs/slf4j-log4j12-1.7.25.jar
deleted file mode 100644
index 4a44e06..0000000
Binary files a/lib/Logs/slf4j-log4j12-1.7.25.jar and /dev/null differ
diff --git a/lib/commons-codec-1.17.1-sources.jar b/lib/commons-codec-1.17.1-sources.jar
new file mode 100644
index 0000000..be95be4
Binary files /dev/null and b/lib/commons-codec-1.17.1-sources.jar differ
diff --git a/lib/commons-codec-1.17.1.jar b/lib/commons-codec-1.17.1.jar
new file mode 100644
index 0000000..5023670
Binary files /dev/null and b/lib/commons-codec-1.17.1.jar differ
diff --git a/lib/commons-codec-1.8-sources.jar b/lib/commons-codec-1.8-sources.jar
deleted file mode 100644
index 900af03..0000000
Binary files a/lib/commons-codec-1.8-sources.jar and /dev/null differ
diff --git a/lib/commons-codec-1.8.jar b/lib/commons-codec-1.8.jar
deleted file mode 100644
index 32f84c9..0000000
Binary files a/lib/commons-codec-1.8.jar and /dev/null differ
diff --git a/lib/commons-io-2.16.1-sources.jar b/lib/commons-io-2.16.1-sources.jar
new file mode 100644
index 0000000..f22565b
Binary files /dev/null and b/lib/commons-io-2.16.1-sources.jar differ
diff --git a/lib/commons-io-2.16.1.jar b/lib/commons-io-2.16.1.jar
new file mode 100644
index 0000000..eb3c2b0
Binary files /dev/null and b/lib/commons-io-2.16.1.jar differ
diff --git a/lib/commons-io-2.6-sources.jar b/lib/commons-io-2.6-sources.jar
deleted file mode 100644
index 231cbe4..0000000
Binary files a/lib/commons-io-2.6-sources.jar and /dev/null differ
diff --git a/lib/commons-io-2.6.jar b/lib/commons-io-2.6.jar
deleted file mode 100644
index 00556b1..0000000
Binary files a/lib/commons-io-2.6.jar and /dev/null differ
diff --git a/lib/commons-lang3-3.13.0-sources.jar b/lib/commons-lang3-3.13.0-sources.jar
new file mode 100644
index 0000000..f65c4e4
Binary files /dev/null and b/lib/commons-lang3-3.13.0-sources.jar differ
diff --git a/lib/commons-lang3-3.13.0.jar b/lib/commons-lang3-3.13.0.jar
new file mode 100644
index 0000000..891540f
Binary files /dev/null and b/lib/commons-lang3-3.13.0.jar differ
diff --git a/lib/commons-lang3-3.7-sources.jar b/lib/commons-lang3-3.7-sources.jar
deleted file mode 100644
index a83c661..0000000
Binary files a/lib/commons-lang3-3.7-sources.jar and /dev/null differ
diff --git a/lib/commons-lang3-3.7.jar b/lib/commons-lang3-3.7.jar
deleted file mode 100644
index f37ded6..0000000
Binary files a/lib/commons-lang3-3.7.jar and /dev/null differ
diff --git a/lib/commons-text-1.12.0-sources.jar b/lib/commons-text-1.12.0-sources.jar
new file mode 100644
index 0000000..6441b20
Binary files /dev/null and b/lib/commons-text-1.12.0-sources.jar differ
diff --git a/lib/commons-text-1.12.0.jar b/lib/commons-text-1.12.0.jar
new file mode 100644
index 0000000..a2daab1
Binary files /dev/null and b/lib/commons-text-1.12.0.jar differ
diff --git a/lib/devinsy-strings-0.17.0-sources.zip b/lib/devinsy-strings-0.17.0-sources.zip
new file mode 100644
index 0000000..4c44741
Binary files /dev/null and b/lib/devinsy-strings-0.17.0-sources.zip differ
diff --git a/lib/devinsy-strings-0.17.0.jar b/lib/devinsy-strings-0.17.0.jar
new file mode 100644
index 0000000..9c6493a
Binary files /dev/null and b/lib/devinsy-strings-0.17.0.jar differ
diff --git a/lib/devinsy-strings-0.8.2-sources.zip b/lib/devinsy-strings-0.8.2-sources.zip
deleted file mode 100644
index 815e0b8..0000000
Binary files a/lib/devinsy-strings-0.8.2-sources.zip and /dev/null differ
diff --git a/lib/devinsy-strings-0.8.2.jar b/lib/devinsy-strings-0.8.2.jar
deleted file mode 100644
index 1e95075..0000000
Binary files a/lib/devinsy-strings-0.8.2.jar and /dev/null differ
diff --git a/lib/devinsy-xml-0.8.2-sources.zip b/lib/devinsy-xml-0.17.0-sources.zip
similarity index 76%
rename from lib/devinsy-xml-0.8.2-sources.zip
rename to lib/devinsy-xml-0.17.0-sources.zip
index 0f6e693..c6084f6 100644
Binary files a/lib/devinsy-xml-0.8.2-sources.zip and b/lib/devinsy-xml-0.17.0-sources.zip differ
diff --git a/lib/devinsy-xml-0.17.0.jar b/lib/devinsy-xml-0.17.0.jar
new file mode 100644
index 0000000..3a07860
Binary files /dev/null and b/lib/devinsy-xml-0.17.0.jar differ
diff --git a/lib/devinsy-xml-0.8.2.jar b/lib/devinsy-xml-0.8.2.jar
deleted file mode 100644
index a50811b..0000000
Binary files a/lib/devinsy-xml-0.8.2.jar and /dev/null differ
diff --git a/lib/hsqldb-2.3.0.jar b/lib/hsqldb-2.3.0.jar
deleted file mode 100644
index de45eda..0000000
Binary files a/lib/hsqldb-2.3.0.jar and /dev/null differ
diff --git a/lib/hsqldb-2.7.3.jar b/lib/hsqldb-2.7.3.jar
new file mode 100644
index 0000000..93f6add
Binary files /dev/null and b/lib/hsqldb-2.7.3.jar differ
diff --git a/lib/mariadb-java-client-3.4.1.jar b/lib/mariadb-java-client-3.4.1.jar
new file mode 100644
index 0000000..40028c4
Binary files /dev/null and b/lib/mariadb-java-client-3.4.1.jar differ
diff --git a/lib/mysql-jdbc-5.0.8.jar b/lib/mysql-jdbc-5.0.8.jar
deleted file mode 100644
index 0170c3e..0000000
Binary files a/lib/mysql-jdbc-5.0.8.jar and /dev/null differ
diff --git a/src/fr/devinsy/sikevadb/SikevaDBLauncher.java b/src/fr/devinsy/sikevadb/SikevaDBLauncher.java
index 57e3735..3891613 100644
--- a/src/fr/devinsy/sikevadb/SikevaDBLauncher.java
+++ b/src/fr/devinsy/sikevadb/SikevaDBLauncher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2017 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -21,8 +21,8 @@ package fr.devinsy.sikevadb;
import java.io.File;
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.PropertyConfigurator;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,13 +55,13 @@ public final class SikevaDBLauncher
File loggerConfig = new File("log4j.properties");
if (loggerConfig.exists())
{
- PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
+ Configurator.initialize(null, loggerConfig.getAbsolutePath());
logger.info("Dedicated log configuration done.");
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
}
else
{
- BasicConfigurator.configure();
+ Configurator.initialize(new DefaultConfiguration());
logger.info("Basic log configuration done.");
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
}
diff --git a/src/fr/devinsy/sikevadb/cli/SikevaDBCLI.java b/src/fr/devinsy/sikevadb/cli/SikevaDBCLI.java
index b9979c9..dd1f608 100644
--- a/src/fr/devinsy/sikevadb/cli/SikevaDBCLI.java
+++ b/src/fr/devinsy/sikevadb/cli/SikevaDBCLI.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2018 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -22,8 +22,8 @@ package fr.devinsy.sikevadb.cli;
import java.io.File;
import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.PropertyConfigurator;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -76,13 +76,13 @@ public final class SikevaDBCLI
File loggerConfig = new File("log4j.properties");
if (loggerConfig.exists())
{
- PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
+ Configurator.initialize(null, loggerConfig.getAbsolutePath());
logger.info("Dedicated log configuration done.");
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
}
else
{
- BasicConfigurator.configure();
+ Configurator.initialize(new DefaultConfiguration());
logger.info("Basic log configuration done.");
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
}
diff --git a/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java b/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java
index 823928e..cba78ed 100644
--- a/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java
+++ b/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2018 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -342,8 +342,8 @@ public class XMLSikevaDB
}
/**
- * Write in an XML writer the elements of a database, sorting by keys and sub
- * keys.
+ * Write in an XML writer the elements of a database, sorting by keys and
+ * sub keys.
*
* @param out
* the out
diff --git a/src/fr/devinsy/sikevadb/demo/SikevaDBDemo.java b/src/fr/devinsy/sikevadb/demo/SikevaDBDemo.java
index ef3bb64..71e6cd5 100644
--- a/src/fr/devinsy/sikevadb/demo/SikevaDBDemo.java
+++ b/src/fr/devinsy/sikevadb/demo/SikevaDBDemo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2018 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -22,8 +22,8 @@ package fr.devinsy.sikevadb.demo;
import java.io.File;
import org.apache.commons.lang3.StringUtils;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.PropertyConfigurator;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -171,13 +171,13 @@ public final class SikevaDBDemo
File loggerConfig = new File("log4j.properties");
if (loggerConfig.exists())
{
- PropertyConfigurator.configure(loggerConfig.getAbsolutePath());
+ Configurator.initialize(null, loggerConfig.getAbsolutePath());
logger.info("Dedicated log configuration done.");
logger.info("Configuration file was found in [{}].", loggerConfig.getAbsoluteFile());
}
else
{
- BasicConfigurator.configure();
+ Configurator.initialize(new DefaultConfiguration());
logger.info("Basic log configuration done.");
logger.info("Configuration file was not found in [{}].", loggerConfig.getAbsoluteFile());
}
diff --git a/src/fr/devinsy/sikevadb/sql/SQLArchiver.java b/src/fr/devinsy/sikevadb/sql/SQLArchiver.java
index 4af4da6..9fd4638 100644
--- a/src/fr/devinsy/sikevadb/sql/SQLArchiver.java
+++ b/src/fr/devinsy/sikevadb/sql/SQLArchiver.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2017 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -27,10 +27,7 @@ import fr.devinsy.sikevadb.core.SikevaDBException;
/**
* The Class SQLArchiver.
- *
- * @author Christian Pierre MOMON
*/
-
public class SQLArchiver implements Archiver
{
private static final Logger logger = LoggerFactory.getLogger(SQLArchiver.class);;
diff --git a/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java b/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java
index 2b4fae0..b627908 100644
--- a/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java
+++ b/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2018 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -20,6 +20,7 @@ package fr.devinsy.sikevadb.sql;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
@@ -1808,7 +1809,7 @@ public class SQLSikevaDB implements SikevaDB
//
if (this.url != null)
{
- Class.forName(this.driverClassname).newInstance();
+ Class.forName(this.driverClassname).getDeclaredConstructor().newInstance();
this.singleConnection = DriverManager.getConnection(this.url, this.login, this.password);
logger.info("Single connection opened with [{}].", this.url);
this.status = Status.OPENED;
@@ -1828,27 +1829,8 @@ public class SQLSikevaDB implements SikevaDB
throw new IllegalArgumentException("Undefined source.");
}
}
- catch (InstantiationException exception)
- {
- logger.error("Error opening database.", exception);
- throw new SikevaDBException("Error opening database.");
- }
- catch (IllegalAccessException exception)
- {
- logger.error("Error opening database.", exception);
- throw new SikevaDBException("Error opening database.");
- }
- catch (ClassNotFoundException exception)
- {
- logger.error("Error opening database.", exception);
- throw new SikevaDBException("Error opening database.");
- }
- catch (SQLException exception)
- {
- logger.error("Error opening database.", exception);
- throw new SikevaDBException("Error opening database.");
- }
- catch (NamingException exception)
+ catch (IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException | NamingException | SQLException | InstantiationException | IllegalAccessException
+ | ClassNotFoundException exception)
{
logger.error("Error opening database.", exception);
throw new SikevaDBException("Error opening database.");
diff --git a/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java b/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java
index 4e6a300..862f184 100644
--- a/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java
+++ b/src/fr/devinsy/sikevadb/sql/SQLSikevaDBTools.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2017 Christian Pierre MOMON
+ * Copyright (C) 2013-2024 Christian Pierre MOMON
*
* This file is part of SikevaDB, simple key value database.
*
@@ -22,6 +22,7 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.net.URL;
+import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Date;
@@ -55,7 +56,7 @@ public class SQLSikevaDBTools
{
StringList result;
- String script = IOUtils.toString(source);
+ String script = IOUtils.toString(source, StandardCharsets.UTF_8);
result = splitSQLCommands(script);
diff --git a/test/fr/devinsy/sikevadb/filetree/TreeFileSikevaDBTest.java b/test/fr/devinsy/sikevadb/filetree/TreeFileSikevaDBTest.java
index cf8746e..f7bf3a0 100644
--- a/test/fr/devinsy/sikevadb/filetree/TreeFileSikevaDBTest.java
+++ b/test/fr/devinsy/sikevadb/filetree/TreeFileSikevaDBTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2018 Christian Pierre MOMON, DEVINSY
+ * Copyright (C) 2013-2024 Christian Pierre MOMON, DEVINSY
*
* This file is part of SikevaDB, simple key value database.
*
@@ -23,9 +23,9 @@ import java.time.LocalDateTime;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -717,8 +717,8 @@ public class TreeFileSikevaDBTest
@BeforeClass
public static void beforeClass() throws SikevaDBException
{
- BasicConfigurator.configure();
- Logger.getRootLogger().setLevel(Level.DEBUG);
+ Configurator.initialize(new DefaultConfiguration());
+ Configurator.setRootLevel(Level.DEBUG);
// Add ?profileSQL=true to generate huge logs.
diff --git a/test/fr/devinsy/sikevadb/sql/SQLSikevaDBTest.java b/test/fr/devinsy/sikevadb/sql/SQLSikevaDBTest.java
index ee42ecc..a6a3183 100644
--- a/test/fr/devinsy/sikevadb/sql/SQLSikevaDBTest.java
+++ b/test/fr/devinsy/sikevadb/sql/SQLSikevaDBTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2018 Christian Pierre MOMON, DEVINSY
+ * Copyright (C) 2013-2024 Christian Pierre MOMON, DEVINSY
*
* This file is part of SikevaDB, simple key value database.
*
@@ -22,9 +22,9 @@ import java.time.LocalDateTime;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.RandomStringUtils;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -692,8 +692,8 @@ public class SQLSikevaDBTest
@BeforeClass
public static void beforeClass() throws SikevaDBException
{
- BasicConfigurator.configure();
- Logger.getRootLogger().setLevel(Level.ERROR);
+ Configurator.initialize(new DefaultConfiguration());
+ Configurator.setRootLevel(Level.DEBUG);
// Add ?profileSQL=true to generate huge logs.