-
Notifications
You must be signed in to change notification settings - Fork 566
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
JPA: drop-and-create schema generation action failed #2630
Comments
@hantsy Does this work if you add The root cause is that your first operation on the To be clear: this is definitely a bug in some way, because this shouldn't be happening. The DDL operation should ideally happen in such a way that it does not impact the current user transaction, if any. However, I'm curious if it can be worked around. One way to accomplish this is to instruct Eclipselink to deploy on startup, which the Regarding type conversion, Helidon does no type conversion of its own, but I'll see if I can figure out if perhaps something about the dialect or driver you're using is responsible. |
I see from your sample project that you do have that property set. It seems like perhaps it is not being seen or read, because I think deployment should be happening considerably earlier than this if it were. I'll look more at this, though this is under the control of Eclipselink, not Helidon. |
@ljnelson You have to know this sample is upgraded from an earlier working version. I hope the persistence.xml config can be optional, make all JPA properties can be configured in the application.yaml file. |
Returning to the issue at hand, there was a lot of work in the transactions/JTA area that solved other problems. I'm guessing that in fixing those problems, lazy initialization of the If you have a feature request, do kindly file an issue about it; we're happy to help. |
I've confirmed that eagerly "inflating" the
That seems to be a different problem entirely. I will submit a pull request soon to fix the |
Good news; with hantsy/helidon-sandbox#1 and a resolution for #3009 your I'll submit a PR for #3009 soon. I will also submit a PR against your sample code to work around this problem in the meantime (it should be an easy fix). |
I've also posted hantsy/helidon-sandbox#2. If you apply hantsy/helidon-sandbox#2 and hantsy/helidon-sandbox#1, your project works (tested with (Helidon-supported) JDK 11). |
Thanks @ljnelson , finally got it working on Java 16. |
I tried to update my sample application to the latest Helidon 2.2 from 1.3. But failed. The application failed to start.
Sample codes
Environment Details
Description
When setting the javax.persistence.schema-generation.database.action to drop-and-create, it did not work as expected.
The table generation failed and the application failed to start.
I attached a copy of the log from the console.
app.log
And in the Postgres database Docker console, there are some errors.
There is a
CREATE TABLE comments (ID VARCHAR(255) NOT NULL, CONTENT VARCHAR(255), created_at VARCHAR(255), post_id VARCHAR(255), PRIMARY KEY (ID))
in the log,The
LocalDateTime
is converted tovarchar
, which is also not my expectation.The text was updated successfully, but these errors were encountered: