Fórum

When Service Builder's tables are created in database?

thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

When Service Builder's tables are created in database?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
I have deleted a table of my service from (MySQL) database. And now have portlet error messages that table is not exist. How to initiate recreation? I had never created service tables manually. They were created automatically but now stopped.
Jhansi Rani, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Junior Member Postagens: 32 Data de Entrada: 27/07/11 Postagens Recentes
Hi,

just follow ant commands build-db,clean,compile,deploy .
May be it works.

Regards
Jhansi P.
thumbnail
Amos Fong, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
I would suggest to create it manually (you can find the non-DB specific SQL from tables.sql) because it's the least intrusive way.

But if you want Liferay to do it automatically, what you can do is run this SQL:

delete from ServiceComponent where buildnamespace = '[your portlet table's namespace]';

Then on redeploy it will act as if your portlet has never been deployed before and try to create the tables. If done this way, I would backup your DB first.
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
I think it's better to delete a row from the ServiceComponent table because generated SQL command doesn't work without modification such as datatype and data length.
thumbnail
Nagendra Kumar Busam, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Liferay Master Postagens: 678 Data de Entrada: 07/07/09 Postagens Recentes
Even i prefer doing it by delete a row from the ServiceComponent table

I have question regarding service builder (deleting a column from table/entity @ later stages not reflecting in DB )

Here is my use case

- suppose i have a created a table through service builder with suppose three columns like col1,col2,col3
- Later due to dependency on some external system table structure has been changed like deleted col3

I have not see this change will be reflecting in DB automatically. BTW i am using 5.2 EE SP3 right now (I have not checked this with latest version though)

Regards,
- Nagendra Kumar
thumbnail
Charles Riley, modificado 9 Anos atrás.

RE: When Service Builder's tables are created in database?

New Member Postagens: 5 Data de Entrada: 25/03/15 Postagens Recentes
hey thanks! this really helped me.
Nicolas Rudelle, modificado 7 Anos atrás.

RE: When Service Builder's tables are created in database?

New Member Mensagem: 1 Data de Entrada: 15/02/17 Postagens Recentes
Thanks a lot !
thumbnail
Aritz Galdos, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Expert Postagens: 416 Data de Entrada: 15/05/07 Postagens Recentes
Hi Kravchenko

In case Jhansi's method doesn´t work you can do as follows:

Liferay will not (re)create tables of your portlet as far as Liferay thinks they are already created. And why does Liferay think they are created? Just have a look to "servicecomponent" table. There will be some rows that refer in the buildNamespace to yours. This is why Liferay still thinks you component is already created.

Just delete rows refering to your component. The restart portal. And redeploy.

good luck!
thumbnail
Tejas Kanani, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Liferay Master Postagens: 654 Data de Entrada: 06/01/09 Postagens Recentes
Try by deleting an entry from servicecomponent table. And redeploy your portlet.

delete FROM servicecomponent where buildNamespace="<your table namespace>"


Regards,
Tejas Kanani
Uday Manvar, modificado 11 Anos atrás.

RE: When Service Builder's tables are created in database?

New Member Postagens: 2 Data de Entrada: 31/01/13 Postagens Recentes
Thanks Tejas Kanani

your message will be helpfull to me.
thumbnail
Kravchenko Dmitry, modificado 12 Anos atrás.

RE: When Service Builder's tables are created in database?

Regular Member Postagens: 139 Data de Entrada: 04/10/10 Postagens Recentes
Thanks for telling about service component table!!! This is what I was looking for!
thumbnail
Goran Marinkovic, modificado 5 Anos atrás.

RE: When Service Builder's tables are created in database?

New Member Postagens: 12 Data de Entrada: 27/03/18 Postagens Recentes
You must delete references in both table : servicecomponent & release_

for those who do not know, go to the DB to query the table above servicecomponent and than chose right click, and than Scripts and than Select ... or
SELECT <names of columns> FROM <name of table>;
example:
SELECT name, subject, mark FROM students;
and than "thunder"

you can see that their are some reference with your name of project (buildnamespace, example college) but not a name of table

You delete this :

DELETE FROM public.servicecomponent WHERE <condition>;
example:
DELETE FROM public.servicecomponent WHERE buildnamespace='college';
and you will see that if you Select... again , there are not any ref with your name

And this is a half of work,

second is that you do the same but on the other table release_


after that you can start server on clipse and you will see that now in DB is one table more but empty, you can fill it on page with input details or ...

best regards from Serbia