Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

RepositoryException in importingXML using JCR Workspace API

Avatar

Level 2

Hi,


I have to import an XML Response from an external WebService into CRX as a node structure under a known parent path.
To achieve this I am using the javax.jcr.Workspace API's importXML call - passing requisite inputs to import the XML as requisite nodes.


However I am receiving the exception as mentioned below intermittently i.e. the same XML when provided as input sometime brings about the expected result i.e. the Node Structure does get generated, whilst sometimes the exception below is received:


javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed.
  at org.apache.jackrabbit.core.session.SessionState.checkAlive(SessionState.java:150)
  at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
  at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
  at org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:376)

Please suggest if I may be doing something incorrect.

Thanks !

0 Replies