Bad Request Error when invoking third party Restful web services via .json

Avatar

Avatar

samery56615784

Avatar

samery56615784

samery56615784

29-08-2016

Hi 

We are trying to call the third party REST service in AEM 6.1 and following the example as per below URL.

https://helpx.adobe.com/experience-manager/using/restful-services.html

This example is working when we are creating the template and render the component that uses template. But when we are trying to create the separate component and using that component in some other template the it is not working and throwing the error like "Unable to retrieve data Bad request 400 (Bad Request)" (see the attached screenshot). Any idea what we are missing? or it will work only in case of render component that uses the template only not with separate component?

Thanks

~S

View Entire Topic

Avatar

Avatar

samery56615784

Avatar

samery56615784

samery56615784

30-08-2016

Yes sure Scott. we can connect on Friday. It would be great help to us.

Here is the error trace: as well.

Invalid recursion selector value 'query'

Cannot serve request to /content/aemexample/en/testt/_jcr_content.query.json in org.apache.sling.servlets.get.DefaultGetServlet

Request Progress:

0 TIMER_START{Request Processing} 0 COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message> 0 LOG Method=GET, PathInfo=/content/irlsoft/en/testt/_jcr_content.query.json 0 TIMER_START{ResourceResolution} 1 TIMER_END{1,ResourceResolution} URI=/content/irlsoft/en/testt/_jcr_content.query.json resolves to Resource=JcrNodeResource, type=irlsoft/components/structure/page, superType=null, path=/content/irlsoft/en/testt/jcr:content 1 LOG Resource Path Info: SlingRequestPathInfo: path='/content/irlsoft/en/testt/jcr:content', selectorString='query', extension='json', suffix='null' 1 TIMER_START{ServletResolution} 1 TIMER_START{resolveServlet(/content/irlsoft/en/testt/jcr:content)} 1 TIMER_END{0,resolveServlet(/content/irlsoft/en/testt/jcr:content)} Using servlet org.apache.sling.servlets.get.DefaultGetServlet 1 TIMER_END{0,ServletResolution} URI=/content/irlsoft/en/testt/_jcr_content.query.json handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet 1 LOG Applying Requestfilters 1 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl 1 LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter 1 LOG Calling filter: com.adobe.granite.rest.impl.servlet.ApiResourceFilter 1 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter 1 LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter 1 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 1 LOG Calling filter: com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker 1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter 1 LOG Calling filter: com.adobe.cq.history.impl.HistoryRequestFilter 1 LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter 1 LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet 1 LOG Calling filter: com.adobe.cq.social.commons.cors.CORSAuthenticationFilter 1 LOG Calling filter: com.day.cq.analytics.provisioning.impl.UserAuthenticationRequestFilter 1 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter 1 LOG Calling filter: com.adobe.aem.irlsoft.core.filters.LoggingFilter 1 LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter 1 LOG RedirectFilter did not redirect (not redirecting in author mode) 1 LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter 1 LOG Calling filter: com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl 1 LOG Calling filter: org.apache.sling.security.impl.ContentDispositionFilter 1 LOG Calling filter: com.adobe.granite.csrf.impl.CSRFFilter 1 LOG Calling filter: com.adobe.granite.requests.logging.impl.RequestLoggerImpl 1 LOG Calling filter: com.day.cq.dam.core.impl.servlet.ActivityRecordHandler 1 LOG Calling filter: com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler 1 LOG Calling filter: com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet 1 LOG Applying Componentfilters 1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter 1 LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter 1 LOG Calling filter: com.day.cq.personalization.impl.TargetComponentFilter 1 TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0} 1 LOG Using org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet to render for extension=json 1 LOG Applying Error filters 1 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter 1 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 1 TIMER_START{handleError:status=400} 2 TIMER_END{1,handleError:status=400} Using handler /libs/sling/servlet/errorhandler/default.jsp 5 LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html], order=-1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=mobile, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobile: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=mobiledebug, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobiledebug: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=contentsync, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-contentsync: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), serializer=Config(type=htmlwriter, config={}))} 6 TIMER_END{6,Request Processing} Dumping SlingRequestProgressTracker Entries

ApacheSling/2.4 (jetty/9.2.14.v20151106, Java HotSpot(TM) Client VM 1.7.0_80, Windows 7 6.1 x8