I am having a servicemix bundle
which tries to load jdbc driver
and fails with message
Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
Here is my pom.xml
file
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.32</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.4.2</version>
</dependency>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Import-Package>
com.mysql.jdbc,
*
</Import-Package>
<DynamicImport-Package>
*
</DynamicImport-Package>
</instructions>
</configuraiton>
</plugin>
I have below lines mentioned in my features.xml file which is added to karaf using features:addurl
command.
<bundle>wrap:mvn:mysql/mysql-connector-java/5.1.32</bundle>
<bundle>wrap:mvn:commons-dbcp/commons-dbcp/1.4</bundle>
<bundle>wrap:mvn:commons-pool/commons-pool/1.6</bundle>