Please help in below issue. | Community
Skip to main content
Level 6
September 30, 2022
Solved

Please help in below issue.

  • September 30, 2022
  • 1 reply
  • 855 views

1.Created file @^test.docx in assets.

2. After hitting querybuilder api for 

3. Why it showing different path for above asset?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

@akshaybhujbale If you will look into stack trace you will see that it fails during java.net.URI object creation. Looking into documentation of URI, you can see following information:

URISyntaxException - If the given string violates RFC 2396, as augmented by the above deviations


Going into RFC 2396https://www.rfc-editor.org/rfc/rfc2396, section 2.4.3 is what you probably looking for, as it clearly list disallowed characters with proper reasoning. So this is potentially list of character that could be problematic from Query Builder Debugger tool perspective.

In case this is not enough, you can always create simple piece of code that will create URI object and at the same time examine if creation of URI object will fail or not.

1 reply

lukasz-m
Community Advisor
Community Advisor
September 30, 2022

Hi @akshaybhujbale,

The root cause of behavior you have described, is a fact that in name of one of the asset - @^test.docx - you are using invalid character from URI perspective. Most likely you can see below error in the log:

org.apache.sling.xss.impl.XSSAPIImpl Invalid URI.
java.net.URISyntaxException: Illegal character in path at index 25: /content/dam/aem_folder/@^test.docx

In other words Query Builder Debugger tool is not able to generate proper link to @^test.docx resource.

In general character that cause the issue is ^ - please have a look into RFC 2396 - https://www.rfc-editor.org/rfc/rfc2396 - which describe URI specification including allowed and restricted characters.

Level 6
September 30, 2022

Hi @lukasz-m  Thank you so much 

Please let me know what are the invalid characters for which Query Builder Debugger tool is not able to generate proper link.

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
September 30, 2022

@akshaybhujbale If you will look into stack trace you will see that it fails during java.net.URI object creation. Looking into documentation of URI, you can see following information:

URISyntaxException - If the given string violates RFC 2396, as augmented by the above deviations


Going into RFC 2396https://www.rfc-editor.org/rfc/rfc2396, section 2.4.3 is what you probably looking for, as it clearly list disallowed characters with proper reasoning. So this is potentially list of character that could be problematic from Query Builder Debugger tool perspective.

In case this is not enough, you can always create simple piece of code that will create URI object and at the same time examine if creation of URI object will fail or not.