Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
LscsQuery getDocumentById() in TS 7.1 w LS
Binettoid
Hi all,
I was quite happily using getDocumentByPath() for a while, until I decided to integrate something else by referencinig the asset Id. I tried changing over to passing Ids instead of paths and tried to use getDocumentById. Lo and behold it does not find any assets. I've tried passing it a bona-fide asset Id.
I get a "no such resource" error. The method is obscured as it is calling Client.getDocumentById()
Anyone else ever come across this? IS there a way to use this method correctly?
com.interwoven.wcm.lscs.LSCSException: No such resource:/lscs/v1/document/id/gbbk3kkh/$ at com.interwoven.wcm.lscs.impl.JSONExtractionUtils.extractError(JSONExtractionUtils.java:173) at com.interwoven.wcm.lscs.impl.Context.fetchURIAsStream(Context.java:256) at com.interwoven.wcm.lscs.impl.JSONExtractionUtils.extractDocumentFacets(JSONExtractionUtils.java:97) at com.interwoven.wcm.lscs.impl.ClientImpl.getDocumentById(ClientImpl.java:174) at com.moneystuff.LscsQuery.doGetDocument(Unknown Source) at com.moneystuff.LscsQuery.getDocument(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.interwoven.livesite.common.util.ClassUtils.executeMethod(ClassUtils.java:105) at com.interwoven.livesite.common.pojo.PojoMethodCall.executeMethod(PojoMethodCall.java:400) at com.interwoven.livesite.common.pojo.PojoMethodCall.execute(PojoMethodCall.java:454) at com.interwoven.livesite.external.ExternalCall.execute(ExternalCall.java:135) at com.interwoven.livesite.runtime.model.component.Component.executeExternal(Component.java:379) at com.interwoven.livesite.runtime.model.page.RuntimeComponent.buildComponentTransformData(RuntimeComponent.java:200) at com.interwoven.livesite.runtime.model.page.RuntimeComponent.transform(RuntimeComponent.java:281) at com.interwoven.livesite.model.page.PreviewPage.renderHtmlComponent(PreviewPage.java:365) at com.interwoven.livesite.model.page.PreviewPage.renderPaletteComponentPage(PreviewPage.java:251) at com.interwoven.livesite.iw.servlet.preview.rendering.PagePaletteRenderingManager.render(PagePaletteRenderingManager.java:149) at com.interwoven.livesite.runtime.impl.BaseRequestContext.render(BaseRequestContext.java:235) at com.interwoven.livesite.iw.servlet.preview.PagePaletteFilter.doFilter(PagePaletteFilter.java:71) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
Find more posts tagged with
Comments
Binettoid
Ok I worked around this by adding a method that performs a query based on Id. It is very frustrating to have a method called getDocumentById(), that in fact does not do what it says on the tin.
It causes confusion and delay, as Sir Topham Hatt the fat controller would say.
Getting kinda bored of answering my own posts on here, too.