Closed jpmc216 closed 4 years ago
Thanks for the report. Can you upload a minimal content package which reproduces the 'not direct child' problem?
Rombert,
Our project folder structure is little different. So even though I am able to add this as content project, I am not able to see changes getting reflected.
I also created Linked Folder (jcr_root) to point to webapp folder. That didnt work as well.
How is your project structure different? Can you describe your project layout?
Project layout looks this.
Because I was not able to add "app" part of the project as content project, I created a dummy folder with name "content' and added couple of "Linked Folder(s)" one for "jcr_root" and other for "META-INF".
After creating the linked folders, when i try to add "app" as content project this is how it looks. If I point to any other folders, it will complain for missing filter.xml.
Trying to add the resource to the server.
This is what I see after I click on "Finish",
Finally, you can see that app project is not synchronized.
The java (core) bundle part of working perfectly fine, but not the "app" (content) part.
I have set up a folder structure similar to the one you described, and with a simple project sync works as expected ( see screenshot below )
Not sure what exactly is going on in your case, but I'd need a simplified project to make progress on discovering the root cause.
Rombert,
I have uploaded test image component which is causing issues. Can you try adding to the same project and test your changes.
Additional Information
@jpmc216 this looks like /apps is not part of the filter.xml - check the filter.xml file under src/main/content/META-INF
filter.xml looks like this.
We do not have "jcr_root" folder, used "webapp" folder for that.
perhaps that's the problem - does it work when you call it jcr_root?
I have created a linked folder "jcr_root" pointing to webapp. That should work as well right?
Perhaps try without linking (but moving the content under jcr_root) - if that works and linking not, then we'd have narrowed down the problem
Created folders rather than linked folders and this is the error I get.
java.lang.IllegalArgumentException: Resource at path /apps/test/components/image/analytics is not a direct child of /apps/test/components/image/tab_properties at org.apache.sling.ide.transport.ResourceProxy.addChild(ResourceProxy.java:62) at org.apache.sling.ide.eclipse.core.internal.ResourceChangeCommandFactory.normaliseResourceChildren(ResourceChangeCommandFactory.java:492) at org.apache.sling.ide.eclipse.core.internal.ResourceChangeCommandFactory.buildResourceAndInfo(ResourceChangeCommandFactory.java:154) at org.apache.sling.ide.eclipse.core.internal.ResourceChangeCommandFactory.addFileCommand(ResourceChangeCommandFactory.java:90) at org.apache.sling.ide.eclipse.core.internal.ResourceChangeCommandFactory.newCommandForAddedOrUpdated(ResourceChangeCommandFactory.java:81) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.addFileCommand(SlingLaunchpadBehaviour.java:554) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishContentModule(SlingLaunchpadBehaviour.java:420) at org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publishModule(SlingLaunchpadBehaviour.java:228) 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:3172) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I have tested the image component that you attached and it works fine for me ... I am using the latest trunk version, but there have been no changes which are relevant to this scenario.
It's a shot in the dark, but can you gather the Eclipse trace logs as decribed at https://sling.apache.org/documentation/development/ide-tooling.html#gathering-debug-information ? Please enable all 'Sling IDE Tooling' tracers, save them to a log file and attach them to this ticket ( feel free to mail me directly if the log contains sensitive information ).
Thanks!
I have run into this in the past, and yesterday ran into it again (I forgot how exactly I fixed it last time). After debugging the Sling eclipse plugin itself, I stumbled upon how I solved the issue before.
When using the Sling IDE Tools (which AEM Eclipse Developer Tools uses and depends upon), it seems that one cannot have an arbitrarily named xml file that contains arbitrary nodes. This works when built into a package, but not with the plugin.
Our problem was originally with the cq:dialog
nodes. Having _cq_dialog.xml files in the components' folders caused this error. To fix it, we did the following:
_cq_dialog
which is the mangled name for cq:dialog
._cq_dialog/_cq_dialog.xml
.content.xml
.I have not tried this for your example, but I imagine this method is extensible to your situation.
Hope this helps.
Cheers!
i am trying to change jcr:primaryType of a new node under ui.content and when i try to publish my changes i get this error
can anyone help me fix this issue.
Thank you.
I think the problem is that you're automatically publishing the changes and that node existed previously with a different jcr:primaryType. Try manually removing the original node with CRXDE and republishing.
@eglistefan i tried that as well did not help, even tried deleting ui.content folder and re-publishing and also i installed the new content package as well, still getting the same error.
have you tried with a different node, eg /foo/bar?
@eglistefan deleting the main folder rather than a node and republishing fixed it. Thank you.
I consistently have this problem using AEM archetype 15 in Eclipse in Windows. AEM 6.4 Works fine until I reboot my VM and fails to deploy afterwards. It cost me a lot of hours to figure this out, so "you are welcome" if my post helps you!
The following set of steps resolve the issue for me (until next reboot):
Disconnect from AEM instance in server pane
Disable automatic build
Select all projects - select Clean -> let Eclipse finish
Select All projects -> Maven -> Update Maven project. Ensure "Refresh Workspace Resources from local filesystem" is DISABLED / not checked. Click "OK" Let Eclipse finish
Project -> Build All
Connect to AEM instance in debug mode in Servers Page
Select "Clean and Publish" in Servers Pane
Live a happy live
Thanks @not-entirely-random! I was getting this with the WKND tutorial. Following your steps fixed it.
When I try to add a AEM 6.1 content project to server (Eclipse Mars), this is the error I get.
_Could not publish to the server. Resource at path /apps/test/components/image/analytics is not a direct child of /apps/test/components/image/tab_properties. _
If i ignore this error and go ahead and make any changes under "/apps", this is the error i get.
Failed publishing path=/apps, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: Item is protected]
I am using the latest Sling IDE tooling (1.0.10) from the below link. https://sling.apache.org/downloads.cgi#ide-tooling