diff -r a9d4a8d5c57f -r d8442b266ca8 scripts/sql-dk.sh --- a/scripts/sql-dk.sh Sat Jul 25 17:25:19 2020 +0200 +++ b/scripts/sql-dk.sh Sun Sep 13 12:01:35 2020 +0200 @@ -18,6 +18,24 @@ "/usr/share/java/mysql.jar" ); +# Standard libraries +[ -n "$STANDARD_LIB" ] || STANDARD_LIB=( + "/usr/share/java/jaxb-api.jar" + "/usr/share/java/jaxb-runtime.jar" +); +# JAXB library is needed since Java 9 (up to Java 8 it was part of the JRE). +# By default, we use JARs from the distribution. +# Some distributions might contain older versions of the JAXB library (2.3.0) +# that work but generate following waringns: +# WARNING: An illegal reflective access operation has occurred +# WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/usr/share/java/jaxb-runtime.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) +# WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector +# WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations +# WARNING: All illegal access operations will be denied in a future release +# In order to get rid of them, the user can use newer JARs from Maven that are copied into the java/sql-dk/target/lib/ directory during build. +# This is done by adding them in the STANDARD_LIB variable in his environment.sh file. + + # Additional JDBC drivers might be specified in CUSTOM_JDBC array # Plugins (formatters etc.) might be specified in PLUGINS array @@ -26,7 +44,7 @@ CLASS_PATH="$JAR"; -for e in "${STANDARD_JDBC[@]}" "${CUSTOM_JDBC[@]}" "${PLUGINS[@]}"; do +for e in "${CUSTOM_JDBC[@]}" "${PLUGINS[@]}" "${STANDARD_JDBC[@]}" "${STANDARD_LIB[@]}"; do CLASS_PATH="$CLASS_PATH:$e"; done