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

Vorto Repository startup fails #2180

Closed
kolotu opened this issue Dec 13, 2019 · 7 comments
Closed

Vorto Repository startup fails #2180

kolotu opened this issue Dec 13, 2019 · 7 comments

Comments

@kolotu
Copy link
Contributor

kolotu commented Dec 13, 2019

After I have pulled to the latest commit, the repository startup is failing with an exception. The same problem exists on the vorto-dev system.

This is the exception:
2019-12-13 15:40:10.547 ERROR 16983 --- [main] o.s.boot.SpringApplication : Application startup failed

org.springframework.orm.jpa.JpaSystemException: Null value was assigned to a property [class org.eclipse.vorto.repository.domain.User.isTechnicalUser] of primitive type setter of org.eclipse.vorto.repository.domain.User.isTechnicalUser; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property [class org.eclipse.vorto.repository.domain.User.isTechnicalUser] of primitive type setter of org.eclipse.vorto.repository.domain.User.isTechnicalUser
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:333) ~[spring-orm-4.3.17.RELEASE.jar!/:4.3.17.RELEASE]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244) ~[spring-orm-4.3.17.RELEASE.jar!/:4.3.17.RELEASE]
...

@kolotu
Copy link
Contributor Author

kolotu commented Dec 16, 2019

After the technical user field has been created, existing data in the DB has to be migrated. For that we will need a script that adds the field.

@ghost
Copy link

ghost commented Dec 16, 2019

Looks like this is not only about the field itself but it also seems to need a value. Working on something - see also #2159

@ghost
Copy link

ghost commented Dec 16, 2019

I have a branch here, containing a quick SQL script that should take care of fixing local user tables.
It can be invoked, e.g. from the IDE itself, once the datasource has been set within the IDE.
Not sure if I should pull request this one just yet, as there might be better ways to migrate (need to revisit tomorrow during daily), but @kolotu you can checkout the branch and use the script on your local in order to have a working environment with the latest changes.

@ghost
Copy link

ghost commented Dec 17, 2019

I have updated the migration script after a chat with Alex, but due to the lack of clarity on certain DB fields (e.g. why do we have both an AUTHENTICATION_PROVIDER and an AUTHENTICATION_PROVIDER_ID fields?), I would rather test the script first on the development environment.
No joy in connecting to the AWS RDS from my IDE since I am missing some information on how to tunnel properly.
Hopefully @somesh-kumar has experience with that and might lend a hand.

@ghost
Copy link

ghost commented Dec 18, 2019

Need to fix the script again after looking at dev environment: for instance bosch ids do not seem to have fixed length as I first thought.

@ghost
Copy link

ghost commented Dec 18, 2019

New update to the script as a procedure this time, as theif exists syntax and the case sensitivity were giving me trouble with the MariaDB dialect.
I now have one script for H2 (local) and one for MariaDB (dev/prod).
I have tested the procedure on the dev environment, and it seems to be working swell.

@aedelmann PR here.

@ghost
Copy link

ghost commented Dec 20, 2019

Forgot to mention yesterday: the branch has been PRed and merged to dev.
@kolotu I think you can close this.

@kolotu kolotu closed this as completed Dec 20, 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

1 participant