Expand my Community achievements bar.

previewApplicationArchive method does not work with LCES2 lca format?

Avatar

Former Community Member

Hi all,

I have a custom component with following works:

1- read some lca file

2- then check if the application exist in server and remove it if it exists

3- import the lca file.

Previously, It works well with LCES server.

Now I'm doing some testing in LCES2 server and realize the method ApplicationManager.previewApplicationArchive (which I'm using in step 2) does not work with LCES2 lca format.

I findout that the LCES lca contains the file application.xml, LCES2 lca contains the file app.info instead. And the method previewApplicationArchive  try to read the file application.xml

The exception stack is:

java.io.FileNotFoundException: C:\temp\adobejb_server1\ArchiveStore\529\application.xml (The system

cannot find the file specified)

        at com.adobe.idp.applicationmanager.service.ApplicationManagerService.previewApplicationArch

ive(ApplicationManagerService.java:483)

        at com.adobe.idp.applicationmanager.service.ApplicationManagerService.previewApplicationArch

ive(ApplicationManagerService.java:446)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I have verified all my library jar files are from LCES2. If I skip previewApplicationArchive, I am able to import the LCES2 lca file. (The lca file is exported from workbench ES2)

Is it a bug in LCES2 API? And is there any way I can read the application id from the LCES2 lca file without the method ApplicationManager.previewApplicationArchive?

Thank you and regards,

Anh

1 Reply

Avatar

Former Community Member

Hi all,

Currently I'm using ApplicationManager.importApplicationArchive(Document, ImportApplicationInfo) to overwrite the application in server if it exists.

If you have other solution/approach/suggestion, please share it in the forum.

Thanks and regards,

Anh