Foren

When Service Builder's tables are created in database?

thumbnail
Kravchenko Dmitry, geändert vor 12 Jahren.

When Service Builder's tables are created in database?

Regular Member Beiträge: 139 Beitrittsdatum: 04.10.10 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Junior Member Beiträge: 32 Beitrittsdatum: 27.07.11 Neueste Beiträge
Hi,

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

Regards
Jhansi P.
thumbnail
Amos Fong, geändert vor 12 Jahren.

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

Liferay Legend Beiträge: 2047 Beitrittsdatum: 07.10.08 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Liferay Master Beiträge: 678 Beitrittsdatum: 07.07.09 Neueste Beiträge
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, geändert vor 9 Jahren.

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

New Member Beiträge: 5 Beitrittsdatum: 25.03.15 Neueste Beiträge
hey thanks! this really helped me.
Nicolas Rudelle, geändert vor 7 Jahren.

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

New Member Beitrag: 1 Beitrittsdatum: 15.02.17 Neueste Beiträge
Thanks a lot !
thumbnail
Aritz Galdos, geändert vor 12 Jahren.

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

Expert Beiträge: 416 Beitrittsdatum: 15.05.07 Neueste Beiträge
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, geändert vor 12 Jahren.

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

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
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, geändert vor 11 Jahren.

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

New Member Beiträge: 2 Beitrittsdatum: 31.01.13 Neueste Beiträge
Thanks Tejas Kanani

your message will be helpfull to me.
thumbnail
Kravchenko Dmitry, geändert vor 12 Jahren.

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

Regular Member Beiträge: 139 Beitrittsdatum: 04.10.10 Neueste Beiträge
Thanks for telling about service component table!!! This is what I was looking for!
thumbnail
Goran Marinkovic, geändert vor 5 Jahren.

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

New Member Beiträge: 12 Beitrittsdatum: 27.03.18 Neueste Beiträge
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