Skip to content
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

StartupFlywayMigrator is not a valid EJB #5893

Closed
smillidge opened this issue May 30, 2019 · 6 comments
Closed

StartupFlywayMigrator is not a valid EJB #5893

smillidge opened this issue May 30, 2019 · 6 comments
Milestone

Comments

@smillidge
Copy link
Contributor

A valid EJB must have a public no-args constructor as StartupFlywayMigrator is not a public class it does not have a public constructor and war deployment fails on Payara 5.

@pdurbin
Copy link
Member

pdurbin commented May 30, 2019

@smillidge thanks for making pull request #5894! I just approved it and moved it to QA.

Thanks also for your recent comments at #2628 (comment) !

@pdurbin
Copy link
Member

pdurbin commented May 31, 2019

@smillidge I keep thinking about how at #2628 (comment) you said you had to patch a Flyway script for your deployment to work. I'm going to guess this may have been related to 60cd169. We only recently started using Flyway and we're still getting used to it.

As I mentioned at #4172 (comment) I was able to deploy a war file built from your branch (pull request #5894) to Payara 5 without touching any Flyway scripts. I'm wondering if I should be concerned that you had to patch a Flyway script.

I don't think I really have a question. I think I just wanted to put this brain dump out there.

kcondon added a commit that referenced this issue May 31, 2019
Fixes #5893 make StartupFlywayMigrator a valid EJB
@smillidge
Copy link
Contributor Author

The flyway script was trying to create an index that already exists (if I remember correctly) it could just have been due to the current state of my database. I sort of hack installed Dataverse rather than using your install scripts so it could be related to that.

@pdurbin
Copy link
Member

pdurbin commented Jun 1, 2019

@smillidge ok, thanks. It's possible to get in a weird state if you apply our "reference data" SQL script before deploying the war file but this doesn't happen normally. Thanks again for this pull request! Stay tuned over in #4172 I guess. 😄

@smillidge
Copy link
Contributor Author

I think Eclipselink is building the correct database schema then Flyway is trying to "upgrade" it by adding an index that already exists. It was a simple matter of patching the flyway script to add IF NOT EXISTS to the create statement.

@poikilotherm
Copy link
Contributor

This is also discussed in #5871. EclipseLink should not create the tables anymore...

@djbrooke djbrooke added this to the 4.15 milestone Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants