{"action":"created","issue":{"url":"https://api.github.com/repos/flyway/flyway/issues/1007","labels_url":"https://api.github.com/repos/flyway/flyway/issues/1007/labels{/name}","comments_url":"https://api.github.com/repos/flyway/flyway/issues/1007/comments","events_url":"https://api.github.com/repos/flyway/flyway/issues/1007/events","html_url":"https://github.com/flyway/flyway/issues/1007","id":72684143,"number":1007,"title":"problem scanning classpath resources Apache Karaf 3.0.3 (OSGI)","user":{"login":"utaladriz","id":515605,"avatar_url":"https://avatars.githubusercontent.com/u/515605?v=3","gravatar_id":"","url":"https://api.github.com/users/utaladriz","html_url":"https://github.com/utaladriz","followers_url":"https://api.github.com/users/utaladriz/followers","following_url":"https://api.github.com/users/utaladriz/following{/other_user}","gists_url":"https://api.github.com/users/utaladriz/gists{/gist_id}","starred_url":"https://api.github.com/users/utaladriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utaladriz/subscriptions","organizations_url":"https://api.github.com/users/utaladriz/orgs","repos_url":"https://api.github.com/users/utaladriz/repos","events_url":"https://api.github.com/users/utaladriz/events{/privacy}","received_events_url":"https://api.github.com/users/utaladriz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flyway/flyway/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/flyway/flyway/labels/Core","name":"Core","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-02T19:11:34Z","updated_at":"2015-05-02T23:30:19Z","closed_at":null,"body":"I installed flyway as a bundle on Apache Karaf 3.0.3 using:\r\nbundle:install -s mvn:org.flywaydb/flyway-core/3.2.1\r\nI write my own bundle.\r\nOn Bundle activate i'm trying to invoke migrate using:\r\n\r\n Flyway flyway = new Flyway();\r\n ClassLoader thisClassLoader = this.getClass().getClassLoader();\r\nflyway.setClassLoader(thisClassLoader);\r\nflyway.setDataSource(dataSource);\r\nflyway.migrate();\r\n\r\nI have the sql resource V1__Create_node_table.sql on the db.migration classpath\r\nand the class V1_2__Create_other. The OsgiClassPathLocationScanner.java doesn't found resources (sql niether classes).\r\n\r\nThis is the log\r\n2015-05-02 15:01:55,224 | DEBUG | pool-13-thread-4 | Flyway                           | 226 - org.flywaydb.core - 3.2.1 | DDL Transactions Supported: true\r\n2015-05-02 15:01:55,228 | DEBUG | pool-13-thread-4 | Flyway                           | 226 - org.flywaydb.core - 3.2.1 | Schema: public\r\n2015-05-02 15:01:55,230 | DEBUG | pool-13-thread-4 | ClassPathScanner                 | 226 - org.flywaydb.core - 3.2.1 | Scanning for classpath resources at 'db/migration' (Prefix: '', Suffix: '.sql')\r\n2015-05-02 15:01:55,231 | DEBUG | pool-13-thread-4 | ClassPathScanner                 | 226 - org.flywaydb.core - 3.2.1 | Scanning URL: bundle://231.0:1/db/migration\r\n2015-05-02 15:01:55,233 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | JBoss VFS v2 available: false\r\n2015-05-02 15:01:55,234 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | JBoss VFS v3 available: false\r\n2015-05-02 15:01:55,234 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | OSGi framework available: true\r\n2015-05-02 15:01:55,237 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | Spring Jdbc available: false\r\n2015-05-02 15:01:55,246 | DEBUG | pool-13-thread-4 | DbValidate                       | 226 - org.flywaydb.core - 3.2.1 | Validating migrations ...\r\n2015-05-02 15:01:55,247 | DEBUG | pool-13-thread-4 | ClassPathScanner                 | 226 - org.flywaydb.core - 3.2.1 | Scanning for classpath resources at 'db/migration' (Prefix: 'V', Suffix: '.sql')\r\n2015-05-02 15:01:55,249 | DEBUG | pool-13-thread-4 | ClassPathScanner                 | 226 - org.flywaydb.core - 3.2.1 | Scanning URL: bundle://231.0:1/db/migration\r\n2015-05-02 15:01:55,250 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | JBoss VFS v2 available: false\r\n2015-05-02 15:01:55,252 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | JBoss VFS v3 available: false\r\n2015-05-02 15:01:55,254 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | OSGi framework available: true\r\n2015-05-02 15:01:55,260 | DEBUG | pool-13-thread-4 | ClassPathScanner                 | 226 - org.flywaydb.core - 3.2.1 | Scanning for classes at 'db/migration' (Implementing: 'org.flywaydb.core.api.migration.jdbc.JdbcMigration')\r\n2015-05-02 15:01:55,269 | DEBUG | pool-13-thread-4 | ClassPathScanner                 | 226 - org.flywaydb.core - 3.2.1 | Scanning URL: bundle://231.0:1/db/migration\r\n2015-05-02 15:01:55,270 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | JBoss VFS v2 available: false\r\n2015-05-02 15:01:55,272 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | JBoss VFS v3 available: false\r\n2015-05-02 15:01:55,273 | DEBUG | pool-13-thread-4 | FeatureDetector                  | 226 - org.flywaydb.core - 3.2.1 | OSGi framework available: true\r\n2015-05-02 15:01:55,297 | INFO  | pool-13-thread-4 | DbValidate                       | 226 - org.flywaydb.core - 3.2.1 | Validated 0 migrations (execution time 00:00.050s)\r\n2015-05-02 15:01:55,301 | DEBUG | pool-13-thread-4 | DbSchemas                        | 226 - org.flywaydb.core - 3.2.1 | Schema \"public\" already exists. Skipping schema creation.\r\n"},"comment":{"url":"https://api.github.com/repos/flyway/flyway/issues/comments/98417804","html_url":"https://github.com/flyway/flyway/issues/1007#issuecomment-98417804","issue_url":"https://api.github.com/repos/flyway/flyway/issues/1007","id":98417804,"user":{"login":"utaladriz","id":515605,"avatar_url":"https://avatars.githubusercontent.com/u/515605?v=3","gravatar_id":"","url":"https://api.github.com/users/utaladriz","html_url":"https://github.com/utaladriz","followers_url":"https://api.github.com/users/utaladriz/followers","following_url":"https://api.github.com/users/utaladriz/following{/other_user}","gists_url":"https://api.github.com/users/utaladriz/gists{/gist_id}","starred_url":"https://api.github.com/users/utaladriz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utaladriz/subscriptions","organizations_url":"https://api.github.com/users/utaladriz/orgs","repos_url":"https://api.github.com/users/utaladriz/repos","events_url":"https://api.github.com/users/utaladriz/events{/privacy}","received_events_url":"https://api.github.com/users/utaladriz/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T23:30:19Z","updated_at":"2015-05-02T23:30:19Z","body":"I'm a rookie colaborating with github projects (Old fashion school).\r\nPlease let me know how i can collaborate.\r\nI will clone the flyway project and try to debug to find the problem.\r\nAfter that I will do a pull request.\r\nThanks\r\n\r\n"}}