adobe / aem-eclipse-developer-tools

The Eclipse plugin that brings you the full connection to the Adobe Experience Manager, with auto-sync and project creation wizard.
Apache License 2.0
35 stars 23 forks source link

Error when publishing changes in the apps / content project from workspc to the local AEM instance #1

Closed navp4l closed 10 years ago

navp4l commented 10 years ago

I repeatedly get the below error when trying to publish the apps or the content projects to the AEM server

[23 August, 2014 10:11:04 PM IST] AddOrUpdateNodeCommand -> /apps/example/tests : JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}dependencies](39 ms) org.apache.sling.ide.transport.RepositoryException: javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}dependencies at org.apache.sling.ide.impl.vlt.JcrResult.failure(JcrResult.java:33) at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:65) at org.apache.sling.ide.transport.TracingCommand.execute(TracingCommand.java:43) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.execute(SlingLaunchpadBehaviour.java:455) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishContentModule(SlingLaunchpadBehaviour.java:428) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:231) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:137) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:54) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}dependencies at org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl.getQPropertyDefinition(ItemDefinitionProviderImpl.java:233) at org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl.getQPropertyDefinition(ItemDefinitionProviderImpl.java:126) at org.apache.jackrabbit.jcr2spi.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:1831) at org.apache.jackrabbit.jcr2spi.NodeImpl.createProperty(NodeImpl.java:1518) at org.apache.jackrabbit.jcr2spi.NodeImpl.setProperty(NodeImpl.java:252) at org.apache.jackrabbit.jcr2spi.NodeImpl.setProperty(NodeImpl.java:232) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.updateNode(AddOrUpdateNodeCommand.java:299) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:99) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.execute0(AddOrUpdateNodeCommand.java:80) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.execute0(AddOrUpdateNodeCommand.java:1) at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:57) ... 12 more [23 August, 2014 10:11:04 PM IST] AddOrUpdateNodeCommand -> /content/example : JcrResult[ success:true](159 ms) [23 August, 2014 10:11:04 PM IST] AddOrUpdateNodeCommand -> /content/dam/example : JcrResult[ success:true](143 ms) [23 August, 2014 10:11:04 PM IST] AddOrUpdateNodeCommand -> /content/example : JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.RepositoryException: Unable to retrieve definition for item with id '/content/example/jcr:content'.](70 ms) org.apache.sling.ide.transport.RepositoryException: javax.jcr.RepositoryException: Unable to retrieve definition for item with id '/content/example/jcr:content'. at org.apache.sling.ide.impl.vlt.JcrResult.failure(JcrResult.java:33) at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:65) at org.apache.sling.ide.transport.TracingCommand.execute(TracingCommand.java:43) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.execute(SlingLaunchpadBehaviour.java:455) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishContentModule(SlingLaunchpadBehaviour.java:428) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:231) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:137) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:54) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: javax.jcr.RepositoryException: Unable to retrieve definition for item with id '/content/example/jcr:content'. at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.getItemDefinition(RepositoryServiceImpl.java:954) at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.getNodeDefinition(RepositoryServiceImpl.java:893) at org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl.getNodeDefinition(ItemDefinitionProviderImpl.java:350) at org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl.getQNodeDefinition(ItemDefinitionProviderImpl.java:81) at org.apache.jackrabbit.jcr2spi.state.NodeState.retrieveDefinition(NodeState.java:467) at org.apache.jackrabbit.jcr2spi.state.NodeState.getDefinition(NodeState.java:316) at org.apache.jackrabbit.jcr2spi.state.ItemStateValidator.checkProtection(ItemStateValidator.java:504) at org.apache.jackrabbit.jcr2spi.state.ItemStateValidator.checkIsWritable(ItemStateValidator.java:214) at org.apache.jackrabbit.jcr2spi.state.ItemStateValidator.checkWriteProperty(ItemStateValidator.java:313) at org.apache.jackrabbit.jcr2spi.state.ItemStateValidator.checkSetProperty(ItemStateValidator.java:253) at org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.setPropertyStateValue(SessionItemStateManager.java:516) at org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.visit(SessionItemStateManager.java:381) at org.apache.jackrabbit.jcr2spi.operation.SetPropertyValue.accept(SetPropertyValue.java:82) at org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.execute(SessionItemStateManager.java:215) at org.apache.jackrabbit.jcr2spi.PropertyImpl.setInternalValues(PropertyImpl.java:609) at org.apache.jackrabbit.jcr2spi.PropertyImpl.setValue(PropertyImpl.java:590) at org.apache.jackrabbit.jcr2spi.PropertyImpl.setValue(PropertyImpl.java:110) at org.apache.jackrabbit.jcr2spi.NodeImpl.setProperty(NodeImpl.java:246) at org.apache.jackrabbit.jcr2spi.NodeImpl.setProperty(NodeImpl.java:232) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.updateNode(AddOrUpdateNodeCommand.java:299) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:99) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.update(AddOrUpdateNodeCommand.java:103) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.execute0(AddOrUpdateNodeCommand.java:80) at org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand.execute0(AddOrUpdateNodeCommand.java:1) at org.apache.sling.ide.impl.vlt.JcrCommand.execute(JcrCommand.java:57) ... 12 more

I did raise a query on the help forums but didn't really get a resolution,

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.1.html/forum__2svm-did_anyone_haveany.html

eglistefan commented 10 years ago

Hi,

This sounds like the node '/apps/example/tests' is created with the wrong jcr:primaryType. It should be created with jcr:primaryType==cq:ClientLibraryFolder - but probably ends up as a plain nt:folder ?

Can you pls confirm that?

A quick workaround is to change the node type manually using CRXDE|Lite for example.

But for sure, we need to get to the root of this problem.

Cheers, Stefan

navp4l commented 10 years ago

Hi Stefan,

The /apps/example/tests folder is created with the correct jcr:primaryType - 'cq:ClientLibraryFolder'.

Thanks, Naveen

rombert commented 10 years ago

@palanisn

navp4l commented 10 years ago

I tried to setup the multi module project using the maven archetype (following the instructions of setting up a project using the AEM project setup wizard) but only the core module and the tests were properly published (without error) on the server instance.

I had no choice but to then upload the apps and the content package by using the 'mvn -PautoInstallPackage install' command which was a success.

At this point I have the core, test, apps and content bundles added on the local AEM server instance in eclipse.

When I try to update a jsp file in the apps bundle, I get the above mentioned error.

OS version - Windows 7 Eclipse - Luna Release (4.4.0)

gbouallet commented 10 years ago

Hi,

I have this same error when I try to publish le bundles created for the official tutorial (http://docs.adobe.com/content/docs/en/dev-tools/aem-eclipse.html) In addition to the displayed RepositoryException, I checked the plugin Error Log console of eclipse and I found out another error message which might be related:

Failed installing bundle : Unable to install/update bundle from dir D:\example2\core\target\classes : Unresolved constraint in bundle org.myorg2.example2.core [335]: Unable to resolve 335.0: missing requirement [335.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api)(version>=2.3.0)(!(version>=3.0.0)))

Here is the accompanying exeption stack trace:

org.apache.sling.ide.osgi.OsgiClientException: Unable to install/update bundle from dir D:\example2\core\target\classes : Unresolved constraint in bundle org.myorg2.example2.core [335]: Unable to resolve 335.0: missing requirement [335.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api)(version>=2.3.0)(!(version>=3.0.0))) at org.apache.sling.ide.osgi.impl.HttpOsgiClient$LocalBundleInstaller.installBundle(HttpOsgiClient.java:205) at org.apache.sling.ide.osgi.impl.HttpOsgiClient.installLocalBundle(HttpOsgiClient.java:161) at org.apache.sling.ide.osgi.impl.TracingOsgiClient.logInstallLocalBundle(TracingOsgiClient.java:75) at org.apache.sling.ide.osgi.impl.TracingOsgiClient.installLocalBundle(TracingOsgiClient.java:57) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishBundleModule(SlingLaunchpadBehaviour.java:345) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:219) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:137) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:54) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The details of my environment are:

AEM IDE Tools: UI-Extensions 1.0.0 eclipse: reproduced it on luna and kepler CQ: 5.6.1 java.version=1.7.0_51 OS: Windows 7

Thank you in advance for your help.

rombert commented 10 years ago

@gbouallet - the other error you mentioned indicates that you don't have the org.apache.sling.api bundle installed at a correct version.

meetshishir commented 10 years ago

Does any one found an answer to the problem ?

rombert commented 10 years ago

I don't think anyone found an answer, it's a problem we need to narrow down and fix

meetshishir commented 10 years ago

thanks for info . I mostly use vaultclipse for STS for import/Export nodes . http://sourceforge.net/projects/vaultclipse/

gbouallet commented 10 years ago

@rombert - Thanks for your reply. In fact the error message indicates a version issue but I was using the default CQ 5.6.1 binaries when I made the test. Is there any update to perform in order to be compatible with the plugin?

gbouallet commented 10 years ago

To analyse this issue, I tried to follow the same tutorial using a brand new CQ 6.0 installation. Unfortunately, I still have the publication issue. The result is the same but the error message is slightly different:

Publishing failed Failed publishing path=/apps/example/tests, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}dependencies] Failed publishing path=/content/example, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content] Failed installing bundle : Unable to install/update bundle from dir D:\example\it.tests\target\classes : Unresolved constraint in bundle org.myorg.example.it.tests [394]: Unable to resolve 394.0: missing requirement [394.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.junit.annotations)(version>=1.0.0)(!(version>=2.0.0))) Unable to install/update bundle from dir D:\example\it.tests\target\classes : Unresolved constraint in bundle org.myorg.example.it.tests [394]: Unable to resolve 394.0: missing requirement [394.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.junit.annotations)(version>=1.0.0)(!(version>=2.0.0)))

rohanraj14 commented 10 years ago

I also faced same but if you remove the dam folder from ui.content and update filter.xml accordingly, you will be good to go. Manage your DAM in crxde or Dam admin I suggest. Its more of author use rather developer.

Rohan

rohanraj14 commented 10 years ago

But I am still facing an issue in creating local Git repository with the multi module archetype of AEM. Can anyone suggest a good guide?

I somehow managed push to local repo, then I lose AEM perspective properties like cannot see nodes/properties in JCR Properties view etc. And if I do Team>Share Project>Git....it looses its tree/structure. Please help.

Rohan

rombert commented 10 years ago

@rohanraj14 - thanks for the hint on removing the dam, this should help with finding a proper resolution for the issue.

As for the AEM perspective disappearing, I can't reproduce that ... can you try clicking Window -> Reset Perspective and see if that helps?

rombert commented 10 years ago

The content sync issue has been fixed in the Sling IDE Tooling project ( see SLING-3956: [windows] Serialization files are not taken into account for folders ) and will be incorporated in the next AEM Developer Tools public release.

If you'd like to build a fix yourself, please follow the instructions from Sling IDE Tooling - building from source.

gbouallet commented 10 years ago

This is good news. Thanks a lot!

gbouallet commented 10 years ago

@rohanraj14 : I've just tested git integration using a local filesystem repo. It works fine. I started with a bare git repo, cloned it and then created my aem project in the cloned folder. can you precise the steps you followed. This would preferably be done in a new issue as were are changing subject.

gbouallet commented 10 years ago

@rombert I've just built the trunk version of the Sling IDE tools and installed it. I've left the AEM IDE tools as is (version 1.0.0). Unfortuanately, I still have the same issue:

Publishing failed Failed publishing path=/apps/example/tests, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}dependencies] Failed publishing path=/content/example, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content]

Do you think I've missed something?

rombert commented 10 years ago

Did those folders already exist? They're not properly upgraded unfortunately and you need to start clean, e.g. delete /apps/example/tests and /content/example .

gbouallet commented 10 years ago

After the clean up, everything works perfectly :) Thanks again.

rombert commented 10 years ago

Perfect, thanks for confirming!

priyaAEM commented 8 years ago

Hi Rombert,

I am still facing this issue after creating a fresh AEM Multi Module project.

Issue 1) Failed publishing path=/content/dam/diginova, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.ReferentialIntegrityException: OakIntegrity0001: Unable to delete referenced node] Issue 2) Exception Trace: org.apache.sling.ide.eclipse-core Error Sun Oct 25 11:37:44 IST 2015 Failed installing bundle : Method execution returned status 500

org.apache.sling.ide.osgi.OsgiClientException: Method execution returned status 500 at org.apache.sling.ide.osgi.impl.HttpOsgiClient$LocalBundleInstaller.installBundle(HttpOsgiClient.java:221) at org.apache.sling.ide.osgi.impl.HttpOsgiClient.installLocalBundle(HttpOsgiClient.java:172) at org.apache.sling.ide.osgi.impl.TracingOsgiClient.logInstallLocalBundle(TracingOsgiClient.java:75) at org.apache.sling.ide.osgi.impl.TracingOsgiClient.installLocalBundle(TracingOsgiClient.java:57) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishBundleModule(SlingLaunchpadBehaviour.java:341) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:221) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:137) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModulePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.java:54) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Any help is much appreciated.

rombert commented 8 years ago

@priyaAEM - can you please open a new bug and let me know what versions of

you have installed?

esaiventhan commented 4 years ago

Just to add a note on this, I faced a similar issue. I saw a software update notice in my Eclipse alert message, and once I updated it fully (which also asked me to restart the IDE) - I could see no error. All works fine now.