Foros de discusión

When Service Builder's tables are created in database?

thumbnail
Kravchenko Dmitry, modificado hace 12 años.

When Service Builder's tables are created in database?

Regular Member Mensajes: 139 Fecha de incorporación: 4/10/10 Mensajes recientes
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 hace 12 años.

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

Junior Member Mensajes: 32 Fecha de incorporación: 27/07/11 Mensajes recientes
Hi,

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

Regards
Jhansi P.
thumbnail
Amos Fong, modificado hace 12 años.

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

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
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 hace 12 años.

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

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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 hace 12 años.

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

Liferay Master Mensajes: 678 Fecha de incorporación: 7/07/09 Mensajes recientes
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 hace 9 años.

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

New Member Mensajes: 5 Fecha de incorporación: 25/03/15 Mensajes recientes
hey thanks! this really helped me.
Nicolas Rudelle, modificado hace 7 años.

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

New Member Mensaje: 1 Fecha de incorporación: 15/02/17 Mensajes recientes
Thanks a lot !
thumbnail
Aritz Galdos, modificado hace 12 años.

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

Expert Mensajes: 416 Fecha de incorporación: 15/05/07 Mensajes recientes
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 hace 12 años.

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

Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
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 hace 11 años.

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

New Member Mensajes: 2 Fecha de incorporación: 31/01/13 Mensajes recientes
Thanks Tejas Kanani

your message will be helpfull to me.
thumbnail
Kravchenko Dmitry, modificado hace 12 años.

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

Regular Member Mensajes: 139 Fecha de incorporación: 4/10/10 Mensajes recientes
Thanks for telling about service component table!!! This is what I was looking for!
thumbnail
Goran Marinkovic, modificado hace 5 años.

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

New Member Mensajes: 12 Fecha de incorporación: 27/03/18 Mensajes recientes
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