added jaxb jars to any jdbc classloader

This commit is contained in:
Ralf Wisser
2020-10-12 14:37:14 +02:00
parent c441765c4f
commit 8cc415db07
2 changed files with 15 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
set version=10.1.1
set version=10.1.1.x
set PATH=C:\Program Files\Java\jdk-15\bin;%PATH%
@@ -6,7 +6,7 @@ del /S /Q c:\tmp\_
del /S /Q c:\tmp\jlrjre%version%
mkdir c:\tmp\_
cd ..
cc
xcopy /S /E bookmark c:\tmp\_\bookmark\
xcopy build.xml c:\tmp\_\
xcopy /S /E config c:\tmp\_\config\

View File

@@ -439,7 +439,19 @@ public class BasicDataSource implements DataSource {
return classloaders.get(mapKey);
}
_log.info("added '" + mapKey + "' to classpath");
URLClassLoader urlLoader = new URLClassLoader(jdbcDriverURL);
List<URL> withJAXB = new ArrayList<URL>();
for (URL url: jdbcDriverURL) {
withJAXB.add(url);
}
try {
withJAXB.add(new File("lib", "activation-1.0.2.jar").toURI().toURL());
withJAXB.add(new File("lib", "jaxb-api-2.3.0-b170201.1204.jar").toURI().toURL());
withJAXB.add(new File("lib", "jaxb-core-2.3.0-b170127.1453.jar").toURI().toURL());
withJAXB.add(new File("lib", "jaxb-impl-2.3.0-b170127.1453.jar").toURI().toURL());
} catch (Exception e) {
e.printStackTrace();
}
URLClassLoader urlLoader = new URLClassLoader(withJAXB.toArray(new URL[0]));
classloaders.put(mapKey, urlLoader);
return urlLoader;
}