Since Confluence 7.1 we’re having a few customers of an app report of a NoClassDefFoundError for SingleConnectionDataSource (part of Spring JDBC).
In my pom.xml, I’m on Confluence 7.2 and AMPS 8.0.2. We are doing this in our code:
DataSource dataSource = new SingleConnectionDataSource(connection, false);
This is where we sometimes receive a NoClassDefFoundError. I could reproduce this once on my test system. But it seems that it’s flaky because now it works again. What is interesting is that it seems like this does not work in case the NoClassDef is thrown:
However, this does work:
Somehow this must be a classloader conflict topic. I have also created a Maven dependency tree and it reveals a conflict within the Confluence 7.2 dependency with Spring JDBC 2.x and 5.x:
Can anybody help?