留言板

Error when publishing content from stage to live

Yves Prince,修改在9 年前。

Error when publishing content from stage to live

New Member 帖子: 14 加入日期: 14-1-21 最近的帖子
Hi,
When my client try to publish to live he get the error :

com.liferay.portal.kernel.dao.orm.ormexception org.hibernate.exception.genericjdbcexception could not execute jdbc batch update

How to solve this?

thank you
thumbnail
Sushil Patidar,修改在9 年前。

RE: Error when publishing content from stage to live

Expert 帖子: 467 加入日期: 11-10-31 最近的帖子
Hi,
Can you post the full stacktrace of the exception?

Regards
thumbnail
Madhusudan Aggarwal,修改在8 年前。

RE: Error when publishing content from stage to live

New Member 帖子: 8 加入日期: 14-11-24 最近的帖子
Yves Prince:
Hi,
When my client try to publish to live he get the error :

com.liferay.portal.kernel.dao.orm.ormexception org.hibernate.exception.genericjdbcexception could not execute jdbc batch update

How to solve this?

thank you



Were you able to solve this error.
I am having the same problem.
I would appreciate your reply.

Thanks
thumbnail
Jorge Díaz,修改在8 年前。

RE: Error when publishing content from stage to live

Liferay Master 帖子: 753 加入日期: 14-1-9 最近的帖子
Hi,

If you have an issue with Staging or LAR export/import, always activate DEBUG level traces:
  • Open Control Panel => Configuration => Server administration => Log level => Update categories
  • Activate at DEBUG level the following categories:
    com.liferay.portal.kernel.lar
    com.liferay.portal.lar
    com.liferay.portlet.documentlibrary.lar
    com.liferay.portlet.journal.lar


Try to publish again to Live and analyze all Debug traces.

If you have any question about error, please post the full stacktrace here.

Regards
Traolly Xiong,修改在8 年前。

RE: Error when publishing content from stage to live

Regular Member 帖子: 195 加入日期: 11-12-30 最近的帖子
Thanks for the tip.

I did notice when inspecting the db table with this SQL query that the web content has a different article ID on the staging vs. live group IDs.
Is that expected?

SELECT articleId, groupId, urlTitle
FROM [lportal62eeDev].[dbo].[JournalArticle]
WHERE urlTitle = 'documentation-widget-block'

article ID | groupId | article title
20845 11403 documentation-widget-block
20845 11403 documentation-widget-block
20845 11403 documentation-widget-block
17687 11408 documentation-widget-block
17687 11408 documentation-widget-block
17687 11408 documentation-widget-block

Thoughts?

Thanks.
Traolly Xiong,修改在8 年前。

RE: Error when publishing content from stage to live

Regular Member 帖子: 195 加入日期: 11-12-30 最近的帖子
So after reading more into it, I believe that is expected.

Thanks for your help.
thumbnail
Jorge Díaz,修改在8 年前。

RE: Error when publishing content from stage to live

Liferay Master 帖子: 753 加入日期: 14-1-9 最近的帖子
That behaviour is correct. Most of the id's are recalculated when publishing from staging to live.

There are some special columns used to link both staging and Live groups during publish operation.
Traolly Xiong,修改在8 年前。

RE: Error when publishing content from stage to live

Regular Member 帖子: 195 加入日期: 11-12-30 最近的帖子
Is there an API that can retrieve the live web content articleId passing the staging web content articleId as a parameter?

I only see the "getArticleId()" method, but is there other means in getting the live articleId?

Any ideas?

Thanks.
thumbnail
Jorge Díaz,修改在8 年前。

RE: Error when publishing content from stage to live

Liferay Master 帖子: 753 加入日期: 14-1-9 最近的帖子
In order to get the Live webcontent articleId from Staging one, you must do the following:
  • Get JournalArticleResource UUID, calling: .getArticleResourceUuid()
  • Call JournalArticleResourceLocalServiceUtil.fetchJournalArticleResourceByUuidAndGroupId(UUID, liveGroupId) with UUID obtained at step 1 and groupId = liveGroupId
  • You will get the journalArticleResource, you can get the last JournalArticle of live using: JournalArticleLocalServiceUtil.fetchLatestArticle(journalArticleResource.getResourcePrimKey(), WorkflowConstants.STATUS_ANY, false);
Traolly Xiong,修改在7 年前。

RE: Error when publishing content from stage to live

Regular Member 帖子: 195 加入日期: 11-12-30 最近的帖子
Much thanks. I'll have to test this out.