Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Fixes for PR #665 #668

Merged
merged 2 commits into from
Aug 24, 2018
Merged

Fixes for PR #665 #668

merged 2 commits into from
Aug 24, 2018

Conversation

hohwille
Copy link
Member

After my review of #665 I hereby provide some improvement/fixes.

@hohwille
Copy link
Member Author

FYI: Travis again is not usable due to technical issues. Local mvn clean install was successful.

@hohwille
Copy link
Member Author

@vapadwal any review feedback?

@vapadwal
Copy link
Contributor

vapadwal commented Aug 16, 2018

I had run few tests for mysql,postgres and oracle, below are the findings:

For MySql,

After the upgrade of Spring boot 2, Hibernate version has been upgraded to 5.3.x . In this version of hibernate there is change in the usage of strategy - AUTO- @GeneratedValue(strategy = GenerationType.AUTO
Hibernate picks the TABLE generator instead of IDENTITY when the underlying database does not support sequences, please see - https://hibernate.atlassian.net/browse/HHH-11014

And we are getting below exception when we use the above
Schema-validation: missing table [hibernate_sequence]

Solution to this would be to use as below in class ApplicationPersistenceEntity.java and AdvancedRevisionEntity.java
@GeneratedValue(strategy = GenerationType.AUTO, generator = "native")
@GenericGenerator(name = "native", strategy = "native")
please see below link-
https://vladmihalcea.com/why-should-not-use-the-auto-jpa-generationtype-with-mysql-and-hibernate/

For Postgres,
Postgres works as it is but when the above solution is applied it gets exception below

Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.

To this we should add the following property in application.properties
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true

please see the reference - spring-projects/spring-boot#12007 (comment)
already a issue added in hibernate for postgres
https://hibernate.atlassian.net/browse/HHH-12368

For oracle

getting below error when using oracle 11g xe

Flyway Enterprise or Oracle upgrade required: Oracle 11 is past regular support by Oracle and no longer supported by Flyway Open Source or Pro, but still supported by Flyway Enterprise.

As flyway community edition(open source) and Pro is not supported by oracle 11g xe

Will install oracle 12 c and see if it is working or not

@vapadwal
Copy link
Contributor

After installing oracle 12 C, the above error is resolved, It now works with the above said solution.

@hohwille
Copy link
Member Author

@vapadwal Thank you so much for your testing. This is extremely valuable feedback and information.
Could you file a separate issue for that so we can start working on a fix. The problem you are describing is in no way related to the changes made in this PR. It is must probably related to PR #665 that has already been merged by me - so we can consider that as a mistake. However, this PR is only fixing things left out and therefore improves quality. Therefore I would love to see this approved and merged.
If we have a separate bug issue that we can work on as another PR and hopefully fix and merge if possible for 3.0.0 all should be fine.

@vapadwal
Copy link
Contributor

I have raised an issue #674 as the above issue has nothing to do with it.

@AbhayChandel AbhayChandel merged commit 1738f09 into oasp:develop Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants