Foren

Jornal article is not found

Cesar Quinteiro, geändert vor 9 Jahren.

Jornal article is not found

Junior Member Beiträge: 34 Beitrittsdatum: 18.10.11 Neueste Beiträge
I have a Journal article with he following data:
{"articleId":"173293”,
"classNameId”:0
,"classPK":0,
"companyId":10154,
"content":"<?xml version=\"1.0\"?>\n\n<root available-locales=\"es_ES\" default-locale=\"es_ES\">\n\t<static-content language-id=\"es_ES\"><![CDATA[para probar el update-entry con un jornal article creado a mano]]></static-content>\n</root>”,
"createDate":1411937751000,
"description":”",
"descriptionCurrentValue":”",
"displayDate":1411925160000,
"expirationDate":null,
"folderId":0,
"groupId":10194,”
id":173345
,"indexable":true,
"layoutUuid":”",
"modifiedDate":1411937751000,”
resourcePrimKey":173295,
"reviewDate":null,
"smallImage":false,
"smallImageId":0,
"smallImageURL":”",
"status":0,
"statusByUserId":10434,
"statusByUserName":"Cesar Quinteiro Rendo”,
"statusDate":1411937751000,
"structureId":”",
"templateId":”",
"title":"xxxxZZZ666”,
"titleCurrentValue":"xxxxZZZ666”,
"treePath":"/0/“,
"type":"general”,
"urlTitle":"prueba-asset-entry-3333”,
"userId":10434,
"userName":"Cesar Quinteiro Rendo”
,"uuid":"7e50c982-89b0-4576-96de-4fb9d7283752”,
"version":1.2}

I try to run update_entry If I fill :
String className = "com.liferay.portlet.journal.model.JournalArticle";
long classPK = 173295; (resourcePrimKey)

then I get the error :
com.liferay.portlet.journal.NoSuchArticleException: No JournalArticle exists with the primary key 173295
	at com.liferay.portlet.journal.service.persistence.JournalArticlePersistenceImpl.findByPrimaryKey(JournalArticlePersistenceImpl.java:29768)

If I Fill:
....
long classPK = 173345; (id)

then I get The error:
Caused by: com.liferay.portlet.journal.NoSuchArticleException: No JournalArticle exists with the key {resourcePrimKey=173345}
	at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.getLatestArticle(JournalArticleLocalServiceImpl.java:2754)


Then what I have to put in classPK? to find and update a Asset Entry using :
		AssetEntryServiceUtil.updateEntry(groupId, createDate, modifiedDate, className, classPK, classUuid, 
							classTypeId, categoryIds, tagNames, visible, startDate, endDate, expirationDate, mimeType, title, description, 
							summary, url, layoutUuid, height, width, priority,sync) ;
Tameez Lal, geändert vor 9 Jahren.

RE: Jornal article is not found

New Member Beiträge: 20 Beitrittsdatum: 25.10.13 Neueste Beiträge
Hi Cesar,
Pass the article id instead of id in your case articleId=173293
Cesar Quinteiro, geändert vor 7 Jahren.

RE: Jornal article is not found

Junior Member Beiträge: 34 Beitrittsdatum: 18.10.11 Neueste Beiträge
If I use the articleId I get same error and when is a text I get error expecting a number,