We are using SDL web 8.5 and DXA 2.0 Java. After saving contact we are getting below 500 error in java web application.

HTTP Status 500 – Internal Server Error
Type Exception Report

Message java.lang.RuntimeException: Unable to load the Audience Manager Service client

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: java.lang.RuntimeException: Unable to load the Audience Manager Service client
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:291)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Root Cause

java.lang.RuntimeException: Unable to load the Audience Manager Service client
    com.tridion.marketingsolution.profile.Contact.<init>(Contact.java:712)
    com.tridion.marketingsolution.profile.Contact.<init>(Contact.java:680)
    org.apache.jsp.test_002dcontact_jsp._jspService(test_002dcontact_jsp.java:122)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:291)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Root Cause

com.sdl.audiencemanager.odata_client.AudienceManagerClientException: Unable to load the Audience Manager Service client
    com.sdl.audiencemanager.odata_client.AudienceManagerServiceClient.<init>(AudienceManagerServiceClient.java:65)
    com.sdl.audiencemanager.odata_client.AudienceManagerServiceClient.getInstance(AudienceManagerServiceClient.java:81)
    com.sdl.audiencemanager.profile.Contact.fromIdentificationKeys(Contact.java:74)
    com.tridion.marketingsolution.profile.Contact.<init>(Contact.java:697)
    com.tridion.marketingsolution.profile.Contact.<init>(Contact.java:680)
    org.apache.jsp.test_002dcontact_jsp._jspService(test_002dcontact_jsp.java:122)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:291)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Root Cause

com.sdl.audiencemanager.exceptions.AudienceManagerException: Unable to find a Publication mapping for the current Publication: 10. Try adding a 

synchronization target to this Publication.
    com.sdl.audiencemanager.odata_client.AudienceManagerCapabilities.getSyncTargetIdFromPublicationMappings

(AudienceManagerCapabilities.java:48)
    com.sdl.audiencemanager.odata_client.AudienceManagerCapabilities.loadAudienceManagerCapabilities

(AudienceManagerCapabilities.java:33)
    com.sdl.audiencemanager.odata_client.AudienceManagerCapabilities.<init>(AudienceManagerCapabilities.java:29)
    com.sdl.audiencemanager.odata_client.AudienceManagerServiceClient.<init>(AudienceManagerServiceClient.java:52)
    com.sdl.audiencemanager.odata_client.AudienceManagerServiceClient.getInstance(AudienceManagerServiceClient.java:81)
    com.sdl.audiencemanager.profile.Contact.fromIdentificationKeys(Contact.java:74)
    com.tridion.marketingsolution.profile.Contact.<init>(Contact.java:697)
    com.tridion.marketingsolution.profile.Contact.<init>(Contact.java:680)
    org.apache.jsp.test_002dcontact_jsp._jspService(test_002dcontact_jsp.java:122)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:291)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Note The full stack trace of the root cause is available in the server logs.
  • 1
    The stack trace says the following: "Unable to find a Publication mapping for the current Publication: 10. Try adding a synchronization target to this Publication." Can you verify whether this is the culprit? – Atila Sos Nov 5 at 10:40
  • @AtilaSos The synchronization target is already added but still we are getting this error – Abdul Qadir Nov 5 at 11:22
  • You also have to ensure that your AM Sync Service is registered as Capability and associated with your AM Sync Target. See docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v5/… – Rick Pannekoek Nov 6 at 20:37

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.