Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

error when authoring a component with "%" character

rajeshs28932860
Level 3
Level 3

Hi

we have a issue where when we author the text in AEM (directly on author - no dispatcher ) in any of the component like text, rich text, carousel with characters followed by % example "testnew%" in any of the field we get error popup while saving like, (this doesnt appear when "testnew %" is typed means with space)

Invalid parameter value, paramName=./slides/1/titleText

RequestURI=/content/test/test1/jcr:content/homepage/featurecarousel

Servlet= /libs/sling/servlet/errorhandler/default.jsp

When I see the logs,

POST /content/test/test1/jcr:content/homepage/featurecarousel HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Calling the error handler resulted in an error

java.lang.Error: Unresolved compilation problems:

        Only a type can be imported. com.day.cq.wcm.api.WCMMode resolves to a package

        WCMMode cannot be resolved

        WCMMode.DISABLED cannot be resolved to a type

        at org.apache.jsp.libs.sling.servlet.errorhandler.default_jsp.<init>(default_jsp.java:6)

        at sun.reflect.GeneratedConstructorAccessor1875.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at java.lang.Class.newInstance(Class.java:442)

        at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.loadServlet(JspServletWrapper.java:165)

      

        at java.lang.Thread.run(Thread.java:745)

*ERROR* [10.0.10.106 [1533043136639] POST/content/test/test1/jcr:content/homepage/featurecarousel  HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Original error null

*ERROR* [10.0.10.106 [1533043136639] POST /content/test/test1/jcr:content/homepage/featurecarousel  HTTP/1.1] org.apache.sling.engine.impl.DefaultErrorHandler Error handler failed:java.io.IOException

java.io.IOException: Error handler failed: java.lang.Error

        at org.apache.sling.servlets.resolver.internal.SlingServletResolver.handleError(SlingServletResolver.java:774)

        at org.apache.sling.servlets.resolver.internal.SlingServletResolver.handleError(SlingServletResolver.java:447)

        at org.apache.sling.engine.impl.DefaultErrorHandler.handleError(DefaultErrorHandler.java:96)

        at org.apache.sling.engine.impl.SlingRequestProcessorImpl$1.render(SlingRequestProcessorImpl.java:345)

        at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)

        at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)

      

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.Error: Unresolved compilation problems:

        Only a type can be imported. com.day.cq.wcm.api.WCMMode resolves to a package

        WCMMode cannot be resolved

        WCMMode.DISABLED cannot be resolved to a type

        at org.apache.jsp.libs.sling.servlet.errorhandler.default_jsp.<init>(default_jsp.java:6)

        at sun.reflect.GeneratedConstructorAccessor1875.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at java.lang.Class.newInstance(Class.java:442)

        ... 108 common frames omitted

7 Replies
Jitendra_S_Toma
Level 9
Level 9

I don't think this issue could happen with out of box component. Is it your custom component? And have your written JSP on that?

Just confirming.

rajeshs28932860
Level 3
Level 3

Hi Jitendra,

yes its not an issue with AEM OOTB, its issue with custom component and yes JSP is written for it.

However, this does seem to appear in one of our environment, same code and components do work fine in other envirronment.

any thoughts on what this error's imply ?

smacdonald2008
Level 10
Level 10

If you test this on a fresh instance - what happens

edubey
Level 10
Level 10

Share the JSP code snippet also complete log trace

Jitendra_S_Toma
Level 9
Level 9

Rajesh,

Do one thing. Just deploy fresh code via the package manager. DO NOT COPY PASTE THE CODE FROM SOURCE CODE TO CRXDE LITE.

Also, restart AEM instance. Sometimes JSP does not get compiled as well. Another thing is that clear JSP compiles from OSGi Console.

rajeshs28932860
Level 3
Level 3

Hi

This is unfortunately on our PROD instance and we are not able to replicate the same in our lower environments.

Fresh install/redeploy of code might not be possible in PROD now,

Does Recompile of JSP's in OSGI affects anything if I do in PROD now ?

Thank you,

rajeshs28932860
Level 3
Level 3

smacdonald2008

This doesnt appear in any of the environment expect in our PROD. So this should nt appear in any fresh install.