Are you trying to use a custom Java API. If so - you need to wrap that
JAR that exposes the Java package into an OSSi bundle and deploy to AEM.
Remember that when building an OSGi bundle that contains a Java API -
you need to ensure 2 things:1 - you reference the API in the POM (which
you did)2 - you need to make sure there is a deployed OSGi bundle in the
AEM Service container that exposes the given Java package - sounds like
this is not the case).
Wrap the Driver file into an OSGi bundle and deploy. This is shown in
many articles:Adobe Experience Manager Help | Querying MySQL data using
an Adobe Experience Manager 6.4 DataSourcePoolAs Joerg has pointed out -
referencing the dependency in the POM file only ensures the build is
created successfully - it does not place the driver file into an OSGi
bundle and deploy to AEM.