Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Using VLT to import a SysView XML document

Avatar

Former Community Member

Using the VLT import command:
    import -v|-s|--sysview <uri> <local-path> <jcr-path>
e.g.:
    vlt --log-level ERROR import -v --sysview <uri> sysview.xml /content/import-test/sysview
I can import a SysView doc and mount the nodes it contains at the correct point.

But if I re-run the import I just get the error:

[ERROR] import: javax.jcr.ItemExistsException: /content/import-test/sysview/<subnode_name>

which surprises me.

- Will the SysView import only import into empty structures?
- Is there any way of overwriting with the SysView?


And, whilst on the subject of SysView
- Why doesn't VLT have a SysView export function?

Thanks for your help.

 

EDIT: everyone's gone very quiet: is there no solution?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Sorry to say this, but this is NOT a solution to the problem.

The task is not just to stick some arbitrary file into CQ, but to import and integrate a node structure using sysview serialized XML via VLT (the method proposed in the Adobe docs.).

I created a workaround for the initial problem by posting a cURL delete command of the root node before I installed the structure. Inelegant, but it works, which is the main thing. It is not a solution though.

Perhaps we can just accept a 'that's how it is' answer: VLT import will not delete the root node of an existing structure.

 

On the further point of sysview export, I used cURL to post to a customized service that downloads the serialization. Again, not elegant, but it works.

Thanks for your efforts

View solution in original post

4 Replies

Avatar

Former Community Member

Quick supplementary question on the same subject:

Can the .content.xml files in the vault also be in system view format?

This doesn't work for me.

Avatar

Employee

Hi,

Sorry I missed this thread the first go-around. The import command in vlt uses the Workspace.import() method defined in the JCR specification. As you can see here: http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Workspace.html#importXML(java.lang.String, java.io.InputStream, int) the behavior when the path already exists is to throw an exception.

I don't know why SysView export isn't available; probably because no one has ever asked for it smiley. Would suggest you create a JIRA issue here: https://issues.apache.org/jira/browse/JCRVLT

Regards,

Justin

Avatar

Level 10

Old thread - however to import files into AEM (it does not matter the type JS,CSS, XML), you can write a custom app/service. See this community article: 
http://helpx.adobe.com/experience-manager/using/post_files.html

Avatar

Correct answer by
Former Community Member

Sorry to say this, but this is NOT a solution to the problem.

The task is not just to stick some arbitrary file into CQ, but to import and integrate a node structure using sysview serialized XML via VLT (the method proposed in the Adobe docs.).

I created a workaround for the initial problem by posting a cURL delete command of the root node before I installed the structure. Inelegant, but it works, which is the main thing. It is not a solution though.

Perhaps we can just accept a 'that's how it is' answer: VLT import will not delete the root node of an existing structure.

 

On the further point of sysview export, I used cURL to post to a customized service that downloads the serialization. Again, not elegant, but it works.

Thanks for your efforts

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----