5

I am building a DXA 1.5 Java web application. I followed Creating web application (Java). link to create a DXA Java web application. SDL Web 8 is already installed and working fine with DXA 1.5 .NEt web application.

I build the DXA Java web application and when I run this application in Tomcat I get the following error at server startup.

com.sdl.odata.client.api.exception.ODataClientHttpError: Unable to get response from OData service: Path 'http://192.168.20.164:8089/client/v4/content.svc/RequestStartActionImport' is not allowed

at com.sdl.odata.client.util.ODataClientUtils.buildException(ODataClientUtils.java:93)
at com.sdl.odata.client.caller.BasicEndpointCaller.getResponse(BasicEndpointCaller.java:199)
at com.sdl.odata.client.caller.BasicEndpointCaller.sendRequest(BasicEndpointCaller.java:141)
at com.sdl.odata.client.caller.BasicEndpointCaller.doPostEntity(BasicEndpointCaller.java:101)
at com.sdl.odata.client.DefaultODataClient.performAction(DefaultODataClient.java:84)
at com.sdl.web.content.client.ContentClient.lambda$performAction$5(ContentClient.java:312)
at com.sdl.web.content.client.ContentClient$$Lambda$57/1724938382.apply(Unknown Source)
at com.sdl.web.content.client.ContentClient$RetryBlock.execute(ContentClient.java:418)
at com.sdl.web.content.client.ContentClient.performAction(ContentClient.java:314)
at com.sdl.web.content.client.ContentClient.performAction(ContentClient.java:280)
at com.sdl.web.ambient.client.AmbientClientFilter.performADFAction(AmbientClientFilter.java:63)
at com.sdl.web.ambient.client.AmbientClientFilter.processStartEvents(AmbientClientFilter.java:97)
at com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:280)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)

When I debug this application, I found that Discovery serice and Token service has been authenticated properly. But this content.svc is giving error. What would be the reason?

3
  • Which user are you authenticating as? What role are they in (within cd_storage_conf.xml on the Discovery Service)? Sep 5, 2016 at 10:57
  • Hi @peter cd_storage_conf.xml I have below entry :- <ConfigRepository ServiceUri="192.168.20.164:8082/discovery.svc" ConnectionTimeout="40000" CacheEnabled="true" CacheExpirationDuration="600" ServiceMonitorPollDuration="10" ClientId="registration" ClientSecret="encrypted:HzfQh9wYwAKShDxCm4DnnBnysAz9PtbDMFXMbPszSVY="> <Roles> <Role Name="ContentServiceCapability" Url="192.168.20.164:8081/content.svc"> </Roles> </ConfigRepository>
    – om.pandey
    Sep 5, 2016 at 12:24
  • Hi @Peter In my cd_client_conf.xml I have below entry:- <ServiceConfig ConnectionTimeout="10000" CacheEnabled="true" CacheExpirationDuration="5" ServiceAvailabilityCheck="false"> <!-- Specify your CIS Environment's Discovery Service URL below --> <DiscoveryService ServiceUri="192.168.20.164:8082/discovery.svc"> <!-- Remove the TokenService element if OAuth is disabled on your CIS Environment --> <TokenService ClientId="registration" ClientSecret="encrypted:HzfQh9wYwAKShDxCm4DnnBnysAz9PtbDMFXMbPszSVY="/> </ServiceConfig>
    – om.pandey
    Sep 5, 2016 at 12:29

1 Answer 1

4

You are not authenticating with the correct user. The various users have different roles, which in turn authorizes them to access different endpoints (URLs).

As you are authenticating as the 'registration' user, you get an error when attempting to access the specific URL mentioned in the error. If you change to authenticate with a user with the 'cd' role instead (i.e. 'cduser'), the error should go away.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.