Foren

ServiceBuilder: Missing table after namespace change in service.xml

Julian Pfeil, geändert vor 7 Jahren.

ServiceBuilder: Missing table after namespace change in service.xml

Junior Member Beiträge: 72 Beitrittsdatum: 01.03.16 Neueste Beiträge
I used servicebuilder to create a service which i can consume from my web portlet.

Then i changed the namespace in the service.xml-file, did increase the version number, did uninstall the previos service builder module and then deployed the new version.

Now when i want to access the web portlet it is not available and the error log (catalina.out) says, that the table "lportal.ProjektVerwaltung_ProjectOverview" (41 characters - mysql allows up to 64) is missing. When i look into my msql database the table does not exist.
Why doesn't deploying the new module version update/re-create the table?
And how to fix this?

Liferay 7 GA3
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: ServiceBuilder: Missing table after namespace change in service.xml (Antwort)

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
Julian Pfeil:
Why doesn't deploying the new module version update/re-create the table?


Support for this has been removed. It was always buggy anyway for SB to determine what really needed to change on deployment.

Check out my blog post on adding upgrade support and you'll see how to manage the DDL changes yourself.

https://web.liferay.com/web/user.26526/blog/-/blogs/building-in-upgrade-support
Julian Pfeil, geändert vor 7 Jahren.

RE: ServiceBuilder: Missing table after namespace change in service.xml

Junior Member Beiträge: 72 Beitrittsdatum: 01.03.16 Neueste Beiträge
David H Nebinger:
...

Support for this has been removed. It was always buggy anyway for SB to determine what really needed to change on deployment.

Check out my blog post on adding upgrade support and you'll see how to manage the DDL changes yourself.

https://web.liferay.com/web/user.26526/blog/-/blogs/building-in-upgrade-support


Thank you!

Another question regarding this:

Is it possible to remove all the module-specific entries from the database so liferay would think it's new and create the tables automatically, like it does when it is deployed for the first time? (I already tried removing the entries from the ServiceComponent-table, but this ain't sufficient)
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: ServiceBuilder: Missing table after namespace change in service.xml (Antwort)

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
I think you have to hit releases too, but note this will fail in cases where you are altering columns (adding, removing, changing type) because the table would already exist.