grabbit icon indicating copy to clipboard operation
grabbit copied to clipboard

Consistent stack track on copy, "Invalid last path element for adding node event[2] relative to node"

Open fortman opened this issue 10 years ago • 4 comments

We get the following error on copy every single time. The error was located in the batch-client.log file. The job stops and does not continue.

16.06.2015 19:04:34.723 [clientJobLauncherTaskExecutor-9] com.twc.grabbit.client.batch.steps.jcrnodes.JcrNodesWriter ERROR Exception writing JCR Nodes to current JCR Session : session-admin-6306766. javax.jcr.RepositoryException: Invalid last path element for adding node event[2] relative to node /content/(OBFUSCATED_PATH)/jcr:content at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:72) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:37) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1814) at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1774) at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:1136) at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:1016) at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:909) at com.twc.grabbit.client.batch.steps.jcrnodes.JcrNodesWriter.writeToJcr(JcrNodesWriter.groovy:95) at com.twc.grabbit.client.batch.steps.jcrnodes.JcrNodesWriter.write(JcrNodesWriter.groovy:57) at org.springframework.batch.core.step.item.SimpleChunkProcessor.writeItems(SimpleChunkProcessor.java:175) at org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:151) at org.springframework.batch.core.step.item.SimpleChunkProcessor.write(SimpleChunkProcessor.java:274) at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:199) at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:75) at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:395) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:267) at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:77) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:368) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:253) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:141) at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64) at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:151) at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:130) at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:301) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:134) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

fortman avatar Jun 18 '15 15:06 fortman

This may or may not be of help, but I thought I would chime in ... I have noticed when building my localhosts the there are 2 failures every time. Yesterday I was able to pinpoint one of the FAILUREs to this path: /content/dam/residential/specials-ola/jcr:content

http://webcms-content.lab.webapps.rr.com:4502/crx/de/index.jsp#/content/dam/residential/specials-ola/jcr%3Acontent

By breaking out the path "/content/dam/residential/specials-ola" into 3 paths: /content/dam/residential/specials-ola/images /content/dam/residential/specials-ola/css /content/dam/residential/specials-ola/js

... we were able to get around this "broken node" and complete the other content. Then we could package in the jcr:node, though for the localhost, we've decided to leave it out until we have a reason to bring it in.

cc @jdigger @masroormohammed

scott4hire avatar Jun 18 '15 15:06 scott4hire

Thanks @fortman @scott4hire. Looking at the error, not a 100% sure but I am wondering if its related to #33 . It may be worthwhile to build that branch and test this case on that branch.

It could also have to do with #34 . Does the jcr:content node have a folderThumbnail or any other file under it?

sagarsane avatar Jun 18 '15 17:06 sagarsane

I've built the branch bug-client-jcrnodeswriter and deployed to both sides of the copy. I restarted the grabbit sync, and it still failed with the same error. The lines in the stack trace for JcrNodesWriter have changed, showing code has updated.

19.06.2015 13:06:15.557 [clientJobLauncherTaskExecutor-3] com.twcable.grabbit.client.batch.steps.jcrnodes.JcrNodesWriter ERROR Exception writing JCR Nodes to current JCR Session : session-admin-2641. javax.jcr.RepositoryException: Invalid last path element for adding node event[2] relative to node /content/(OBFUSCATED_PATH)/jcr:content at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:72) at org.apache.jackrabbit.core.session.AddNodeOperation.perform(AddNodeOperation.java:37) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) at org.apache.jackrabbit.core.NodeImpl.addNodeWithUuid(NodeImpl.java:1814) at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1774) at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:1136) at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:1016) at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:909) at com.twcable.grabbit.client.batch.steps.jcrnodes.JcrNodesWriter.writeToJcr(JcrNodesWriter.groovy:120) at com.twcable.grabbit.client.batch.steps.jcrnodes.JcrNodesWriter.write(JcrNodesWriter.groovy:80)

fortman avatar Jun 19 '15 17:06 fortman

I think this might have been related to the issues we were having before enforcing node structure rules. @fortman have you seen this since then? Can we close this out?

jbornemann avatar Jan 14 '16 18:01 jbornemann