add java version check to DdlCreator
authorAndreas Müller <a.mueller@bgbm.org>
Tue, 19 Jul 2022 13:41:54 +0000 (15:41 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Tue, 19 Jul 2022 13:41:54 +0000 (15:41 +0200)
cdmlib-test/src/main/java/eu/etaxonomy/cdm/test/unitils/DdlCreator.java

index b96c4347448b38ac96ca9218cb2982c7159d37a8..6138f8c1bc5044b33f83ebd50bd457c6fc3c5e28 100644 (file)
@@ -12,6 +12,8 @@ import java.io.File;
 import java.io.IOException;
 import java.util.EnumSet;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.boot.Metadata;
 import org.hibernate.boot.MetadataSources;
 import org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl;
@@ -46,8 +48,11 @@ import eu.etaxonomy.cdm.persistence.hibernate.UpperCasePhysicalNamingStrategySta
  */
 public class DdlCreator {
 
+    protected static final Logger logger = LogManager.getLogger();
+
        public static void main(String[] args) {
                try {
+                   logger.error("Java version: " + System.getProperty("java.version"));
                    System.setSecurityManager(null); //avoids security exception when started by ant (problem is the jmx server registration by log4j2, similar issue is described at https://stackoverflow.com/questions/12195868/java-security-accesscontrolexception-when-using-ant-but-runs-ok-when-invoking-j )
                        new DdlCreator().execute(H2CorrectedDialectTest.class, "h2");
                } catch (Exception e) {