We are trying to use EntityManager from Active Objects as per Creating an EntityManager.
Bitbucket SDK does not seem to include Oracle JDBC driver, so we copy from a Bitbucket Server instance the Oracle JDBC driver at $BITBUCKET_SERVER\app\WEB-INF\lib\ojdbc8-12.2.0.1-atlassian-hosted.jar into our plug-in workspace at target\bitbucket\app\WEB-INF\lib\ojdbc8-12.2.0.1-atlassian-hosted.jar as per https://community.atlassian.com/t5/Jira-questions/Re-JDBC-Driver-Loading-in-Jira-8-0-0/qaq-p/2020555/comment-id/533703#M533703.
We got the exception:
Caused by: net.java.ao.builder.UnloadableJdbcDriverException: Could not load JDBC driver <oracle.jdbc.OracleDriver>
at net.java.ao.builder.SupportedDatabase.checkDriverLoaded(SupportedDatabase.java:122)
at net.java.ao.builder.SupportedDatabase.getDataSource(SupportedDatabase.java:104)
at net.java.ao.builder.SupportedDatabase$5.getDatabaseProvider(SupportedDatabase.java:52)
at net.java.ao.builder.DatabaseProviderFactory.getDatabaseProvider(DatabaseProviderFactory.java:8)
at net.java.ao.builder.EntityManagerBuilderWithDatabaseProperties.build(EntityManagerBuilderWithDatabaseProperties.java:20)
at it.bancaifis.change.ao.ChangeEntityManager.<init>(ChangeEntityManager.java:24)
at it.bancaifis.change.ao.DeployService.<init>(DeployService.java:21)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:203)
... 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver not found by com.atlassian.activeobjects.activeobjects-plugin [23]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at net.java.ao.builder.SupportedDatabase.getDriverClass(SupportedDatabase.java:142)
at net.java.ao.builder.SupportedDatabase.checkDriverLoaded(SupportedDatabase.java:120)
... 16 common frames omitted
net.java.ao seems to be included from com.atlassian.activeobjects.activeobjects-plugin, so does is it not the original one?
Any advice?
Thanks in advance.
Cheers.