01/24/2020, 11:44 AM
How to debug and fix issues with Database class initialization like this? I have included exposed-jdbc dependency but the exception is still here. Quick googling yielded only one issue on github without a proper solution. I suspect it has something to do with different classloaders but I am not sure where to start
Copy code
java.lang.NoClassDefFoundError: Could not initialize class
	at gloomyfolken.bundle.common.mysql.MysqlContext.<init>(MysqlContext.kt:33)
	at gloomyfolken.bundle.common.mysql.MysqlWorkerThread.openConnection(MysqlWorkerThread.kt:98)
Caused by: java.lang.IllegalStateException: Can't load implementation for DatabaseConnectionAutoRegistration
	... 3 more
If anyone is curious or struggling with the same issue, make sure you copy folder META-INT/services/ from exposed-jdbc jar into your application jar