All,
Its a very confusing problem which i am facing. I have following path in cq dam:/content/dam/example/test/language. Inside this path i have json and zip files. In my code i am using resourceresolver.resolve and passing above path along with json file name. When i print the output of above method i get "NonExistingResource", but when i copy the same path on browser i am getting correct json file. Also using DAM i can navigate to that path without any issues. Also, i have few json files in parent folder i.e. in "test" folder which i am able to retreive successfully using resourceResolver.resolve method.
Does anyone faced this issue before? What can be probable cause for this? How do i resolve it?
Adobe CQ version 5.4
Regards,
Mayank
Solved! Go to Solution.
Views
Replies
Total Likes
Why are you trying to adopt json into asset? It should be something like [1]
[1] resourceResolver.resolve("/content/dam/geometrixx/documents/GeoCube_Datasheet.pdf").adaptTo(Asset.class)
Views
Replies
Total Likes
Can you please post your code so we can see exactly what you are trying to do.
Views
Replies
Total Likes
Sure,
Below is the code:
resourceResolver.resolve("/content/dam/example/test/language/en.json").adaptTo(Asset.class).
Another interesting thing which i noticed when i do
resourceResolver.resolve("/content/dam/example/test/language").adaptTo(Asset.class), i still get NonExistingResource
Regards,
Mayank
Views
Replies
Total Likes
Why are you trying to adopt json into asset? It should be something like [1]
[1] resourceResolver.resolve("/content/dam/geometrixx/documents/GeoCube_Datasheet.pdf").adaptTo(Asset.class)
Views
Replies
Total Likes
Sham,
I need to update json with modified content hence i am adapting to Asset. Anyways i found out root cause, it was due to session getting close in one scenario which was causing this issue. Thanks Sham and macdonald for looking into my problem.
Regards,
Mayank
Views
Replies
Total Likes