掲示板

ServiceBuilder: Missing table after namespace change in service.xml

7年前 に Julian Pfeil によって更新されました。

ServiceBuilder: Missing table after namespace change in service.xml

Junior Member 投稿: 72 参加年月日: 16/03/01 最新の投稿
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
7年前 に David H Nebinger によって更新されました。

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

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
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
7年前 に Julian Pfeil によって更新されました。

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

Junior Member 投稿: 72 参加年月日: 16/03/01 最新の投稿
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
7年前 に David H Nebinger によって更新されました。

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

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
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.