Skip to content

Commit 63a70f9

Browse files
Added driver expansion to upgrade initializer
1 parent 9456709 commit 63a70f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/dependencytrack/upgrade/UpgradeInitializer.java

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818
package org.dependencytrack.upgrade;
1919

20+
import alpine.Config;
2021
import alpine.logging.Logger;
2122
import alpine.model.InstalledUpgrades;
2223
import alpine.model.SchemaVersion;
@@ -45,6 +46,11 @@ public class UpgradeInitializer implements ServletContextListener {
4546
*/
4647
public void contextInitialized(ServletContextEvent event) {
4748
LOGGER.info("Initializing upgrade framework");
49+
50+
final String driverPath = Config.getInstance().getProperty(Config.AlpineKey.DATABASE_DRIVER_PATH);
51+
if (driverPath != null) {
52+
Config.getInstance().expandClasspath(driverPath);
53+
}
4854
final JDOPersistenceManagerFactory pmf = (JDOPersistenceManagerFactory) JDOHelper.getPersistenceManagerFactory(JdoProperties.get(), "Alpine");
4955

5056
// Ensure that the UpgradeMetaProcessor and SchemaVersion tables are created NOW, not dynamically at runtime.

0 commit comments

Comments
 (0)