留言板

When Service Builder's tables are created in database?

thumbnail
Kravchenko Dmitry,修改在12 年前。

When Service Builder's tables are created in database?

Regular Member 帖子: 139 加入日期: 10-10-4 最近的帖子
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,修改在12 年前。

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

Junior Member 帖子: 32 加入日期: 11-7-27 最近的帖子
Hi,

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

Regards
Jhansi P.
thumbnail
Amos Fong,修改在12 年前。

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

Liferay Legend 帖子: 2047 加入日期: 08-10-7 最近的帖子
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,修改在12 年前。

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

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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,修改在12 年前。

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

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
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,修改在8 年前。

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

New Member 帖子: 5 加入日期: 15-3-25 最近的帖子
hey thanks! this really helped me.
Nicolas Rudelle,修改在7 年前。

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

New Member 发布: 1 加入日期: 17-2-15 最近的帖子
Thanks a lot !
thumbnail
Aritz Galdos,修改在12 年前。

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

Expert 帖子: 416 加入日期: 07-5-15 最近的帖子
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,修改在12 年前。

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

Liferay Master 帖子: 654 加入日期: 09-1-6 最近的帖子
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,修改在10 年前。

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

New Member 帖子: 2 加入日期: 13-1-31 最近的帖子
Thanks Tejas Kanani

your message will be helpfull to me.
thumbnail
Kravchenko Dmitry,修改在12 年前。

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

Regular Member 帖子: 139 加入日期: 10-10-4 最近的帖子
Thanks for telling about service component table!!! This is what I was looking for!
thumbnail
Goran Marinkovic,修改在5 年前。

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

New Member 帖子: 12 加入日期: 18-3-27 最近的帖子
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