javax.jcr.RepositoryException: invalid identifier

harryjat 18-09-2018

Hi, I am trying to export a individual asset using AssetExportService API .  I am able to export all the unpublished assets, but when i try to export each asset individually ,.... I am facing the issue. Below is my JSP code : -------------------------------------------------------------------------- <%-- Export data from PDF file. --%><% %><%@include file="/libs/foundation/global.jsp"%><%@page import="java.util.*" %><%@page import="java.util.List"%> <%@page session="false" %><% %><% System.out.println("I am in exportdata POST.jsp"); com.adobe.icc.services.api.AssetExportService assetExport = sling.getService(com.adobe.icc.services.api.AssetExportService.class); //System.out.println("Exporting list of assets for CMSL0069"); List listOfLetter = new ArrayList(); // CMSL0069 is name of letter in our repository listOfLetter.add("CMSL0069.cmp"); //Calling the API method ... this method is returning null value assetsOfLetter = assetExport.getExportInfo(listOfLetter); // If i run below method, it downloads all the unpublished assets .... but is want to run above method //assetsOfLetter = assetExport.getExportAllInfo(); System.out.println("list of assets which will be exported with CMSL0069 " +assetsOfLetter); com.adobe.icc.dbforms.obj.Downloadable exportedAssets = assetExport.exportAsset(listOfLetter,"CMSL0069_CICD.cmp");   byte[] mybytes = exportedAssets.getObjBytes(); java.io.FileOutputStream fos = new java.io.FileOutputStream("/tmp/allassets_CMSL0069.cmp");             fos.write(mybytes);               fos.close(); %> ---------------------------------------------------------------------------------------------------------------- I am getting below error :- 18.09.2018 10:42:57.839 *ERROR* [192.168.175.56 [1537267377837] POST /lc/content/AemFormsSamples/exportPackage.html HTTP/1.1] com.adobe.livecycle.content.repository.utils.ExceptionUtil LCC-REP-FCT-050 Unknown JCR exception 18.09.2018 10:42:57.839 *ERROR* [192.168.175.56 [1537267377837] POST /lc/content/AemFormsSamples/exportPackage.html HTTP/1.1] com.adobe.livecycle.content.repository.impl.ObjectRelationshipServiceImpl getRelatedObjects - Repository returned error - {0} javax.jcr.RepositoryException: invalid identifier: CMSL0069.cmp         at org.apache.jackrabbit.core.SessionImpl.getNodeByIdentifier(SessionImpl.java:1098)         at sun.reflect.GeneratedMethodAccessor2937.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)         at java.lang.reflect.Method.invoke(Method.java:611)         at org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:109) Regards, Harendra

Accepted Solutions (0)

Answers (0)