Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 423 by
marcin.j...@gmail.com: Classpath issue with EAR and
Websphere
http://code.google.com/p/flyway/issues/detail?id=423
Hi, I'm trying to use flyway in a multi-module project:
my-project
\-ejb
\-war
\-ear
I've added migration code in ejb module in @Startup and @Singleton bean in
@PostConstruct method. Ive put migrations to
/src/main/resources/db/migrations in ejb module, but they cannot be found.
I think its classpath issue - ClassPathScanner.getClassLoader returns EAR's
classloader but I need ejb's module classloader.
Is there other solution than modifying code and passing right classLoader
to ClassPathScanner ? Like that :
Flyway f = new Flyway();
f.setClassLoader(this.getClassLoader());
f.migrate();
I use Websphere 8.5.0.1 with JEE6.
Thanks!