New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when used with Virgo/OSGi #914

javacreed opened this Issue Dec 30, 2014 · 3 comments


None yet
2 participants

javacreed commented Dec 30, 2014


Thank you for this library.

I had some issues when using this library with Virgo/OSGi ( and MySQL database. The issue seems to be related to the exported packages. In the POM file, the library is exporting only two packages.


I am not sure about the effect of the .* ( org.flywaydb.core.api.*;version=${project.version}) has the expected effect. When using this with a MySQL database, I got the following error

[ERROR] Caused by: java.lang.RuntimeException: com.googlecode.flyway.core.api.FlywayException: Unable to obtain inputstream for resource: com/googlecode/flyway/core/dbsupport/mysql/createMetaDataTable.sql
[ERROR] at com.googlecode.flyway.core.util.ClassPathResource.loadAsString(
[ERROR] at com.googlecode.flyway.core.metadatatable.MetaDataTableImpl.createIfNotExists(
[ERROR] at com.googlecode.flyway.core.metadatatable.MetaDataTableImpl.lock(
[ERROR] at com.googlecode.flyway.core.command.DbMigrate$1.doInTransaction(
[ERROR] at com.googlecode.flyway.core.command.DbMigrate$1.doInTransaction(
[ERROR] at com.googlecode.flyway.core.util.jdbc.TransactionTemplate.execute(
[ERROR] at com.googlecode.flyway.core.command.DbMigrate.migrate(
[ERROR] at com.googlecode.flyway.core.Flyway$1.execute(
[ERROR] at com.googlecode.flyway.core.Flyway$1.execute(
[ERROR] at com.googlecode.flyway.core.Flyway.execute(
[ERROR] at com.googlecode.flyway.core.Flyway.migrate(
[ERROR] at com.javacreed.examples.flyway.virgo.internal.ExampleActivator.start(
[ERROR] at org.eclipse.osgi.framework.internal.core.BundleContextImpl$
[ERROR] at Method)
[ERROR] at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(

It looks like Virgo cannot load the file createMetaDataTable.sql within the package: com.googlecode.flyway.core.dbsupport.mysql. Modified the flyway library manifest and included the MySQL package: com.googlecode.flyway.core.dbsupport.mysql to the manifest file and all worked.

Can you kindly add all packages to the POM file within the Export-Package? This should solve the issue.


This comment has been minimized.


axelfontaine commented Dec 31, 2014

Please upgrade to 3.1 and try again


This comment has been minimized.

javacreed commented Dec 31, 2014

Thank you for your reply.

The latest version listed at: is:


Can you kindly update the Maven repository by adding a note to help the users to go to the new location (similar to: I believe that the latest versions can be found at:

Thank you again and wish you all the best for the coming year.

@javacreed javacreed closed this Dec 31, 2014

@javacreed javacreed reopened this Dec 31, 2014


This comment has been minimized.

javacreed commented Dec 31, 2014


Downloaded the new version as recommended using the new group and artifact ids as shown next.


This version seems to have an issue related with SLF4J. It did not work until I modified the manifest of the library and imported the org.slf4j package as shown next.

Import-Package: javax.sql,org.apache.commons.logging;version="[1.1,2)"

This library makes use of SLF4J but does not import it. Please do let me know if I am missing something or doing something wrong.

For clarity I am using Eclipse Virgo 3.6.3.RELEASE.

Thanks again for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment