Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Active forums

Active Forums RSS September 03, 19:59
Style properties

August 31, 21:46
antrun not found

August 31, 14:12
WCB customprofile

August 31, 12:10
End of flow not doing its job

August 24, 12:37
Sort mediaItem by expiration date

 All Forums...


JCR Exception while updating media item from WCB

The "WCB: Java development" forum contains threads on issues that are related to Java while programming a WCB (WebManager Component Bundle). If you have questions that have impact on Java code, post them in this forum. Some example topics: authorization, the different component types, setting up component dependencies, data access, and so forth.

Answered
Not marked as answered yet

Forums  >  WCB: Java development  >  JCR Exception while updating media item from WCB


Author JCR Exception while updating media item from WCB
pgoultiaev



Posts: 17

Posted: 13-04-2010 13:54

Whenever I run an import which creates custom media items the WCB checks whether an item with a given ID already exists.

If so, the item is updated and otherwise a new media item is made. If a media item already exists and it has expired since the last time the import was executed, the WCB deletes it. This way, the users do not have to monitor the import function at all.

However, when I delete a media item from webmanager by hand and run the import WCB again there seems to be an inconsistency in the JCR. It looks like the manual delete still leaves traces of an item behind.

Is there any specific reason for this behaviour, and how can this be prevented?

These are the exceptions that I encounter:

Apr 12, 2010 5:40:04 PM org.apache.jackrabbit.core.state.SessionItemStateM anager getDescendantTransientItemStates
WARNING: inconsistent hierarchy state
javax.jcr.InvalidItemStateException: a637bb3b-a17c-4110-8dfc-53977a3170f0/ http://www.wcmexchange.com/customImportWCB jobdescription: the item seems to have been removed externally.

at org.apache.jackrabbit.core.state.SessionItemStateM anager.getDescendantTransientItemStates(SessionItemStateManager.java:421)
at org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:234)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:929)
at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:858)
at nl.gx.siteworks.core.SiteWorksSession.save(SiteWorksSession.java:409)
at nl.gx.webmanager.services.sessionmanager.impl.WebManagerAPI.save(WebManagerAPI.java:161)
at nl.gx.webmanager.contentapi.impl.MediaRepositoryManagementServiceImpl.internalCreateMediaItem(MediaRepositoryManagementServiceImpl.java:1135)
at nl.gx.webmanager.contentapi.impl.MediaRepositoryManagementServiceImpl.internalCreateMediaItem(MediaRepositoryManagementServiceImpl.java:1057)
at nl.gx.webmanager.contentapi.impl.MediaRepositoryManagementServiceImpl.createMediaItem(MediaRepositoryManagementServiceImpl.java:198)



and

Apr 12, 2010 5:40:04 PM nl.dynamit.solutions.service.CustomServiceImpl create
SEVERE: exception
nl.gx.webmanager.foundation.RuntimeRepos itoryException: javax.jcr.InvalidItemStateException: Item cannot be saved because it has beenmodified externally: node /
at nl.gx.webmanager.services.sessionmanager.impl.WebManagerAPI.save(WebManagerAPI.java:163)
at nl.gx.webmanager.contentapi.impl.MediaRepositoryManagementServiceImpl.internalCreateMediaItem(MediaRepositoryManagementServiceImpl.java:1135)
at nl.gx.webmanager.contentapi.impl.MediaRepositoryManagementServiceImpl.internalCreateMediaItem(MediaRepositoryManagementServiceImpl.java:1057)
at nl.gx.webmanager.contentapi.impl.MediaRepositoryManagementServiceImpl.createMediaItem(MediaRepositoryManagementServiceImpl.java:198)

Back to top

New message: "JCR Exception while updating media item from WCB"
Message:
bold boitalicd underline url quote code smile cool eek grin mad razz sad wink
 
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.