Discussion

Server returned HTTP response code: 401 for any https URL like https://sp.contact....using GetEFormFromURL activity

Currently in our application we are trying to fetch the PDF document content from a HTTPS url using GetEFormFromURL activity by passing the url but we are getting the below error.

Server returned HTTP response code: 401 for URL: https://sp.contact.....

Caught exception: java.io.IOException: Server returned HTTP response code: 401 for URL: https://sp.contact......
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1459)
com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:79)
java.net.URL.openStream(URL.java:1010)
com.pegarules.generated.activity.ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.step1_circum0(ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.java:195)
com.pegarules.generated.activity.ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.perform(ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.java:72)
com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020)
com.pegarules.generated.activity.sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.step4_circum0(sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.java:484)
com.pegarules.generated.activity.sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.perform(sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.java:140)
com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020)
com.pegarules.generated.activity.ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.step3_circum0(ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.java:496)
com.pegarules.generated.activity.ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.perform(ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.java:117)
com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020)
com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617)
com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:581)
com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:2366)
com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:394)
sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1066)
com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:792)
com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:328)
com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:703)
com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:312)
com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:221)
sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:277)
com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:222)
com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:373)
com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:266)
sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:99)
com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89)
javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1694)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:970)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:508)
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:878)
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:516)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:307)
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985)
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074)
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
Which caused: com.pega.pegarules.pub.PRRuntimeException: Unable to read eForm from URL 'https://sp.contact.aig.net/pc/lcr/AIGPC%20LCR%20Intranet/Compliance/Sanctions%20Due%20Diligence%20for%20Commercial%20Insureds.pdf'.
com.pegarules.generated.activity.ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.step1_circum0(ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.java:213)
com.pegarules.generated.activity.ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.perform(ra_action_geteformfromurl_074048cea26d56bc6f9de1b7f2ab7c8e.java:72)
com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020)
com.pegarules.generated.activity.sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.step4_circum0(sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.java:484)
com.pegarules.generated.activity.sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.perform(sh_action_generatesanctionchecklist_pdf_concat_5b91bebd0ab19a01c9c25206aa437db9.java:140)
com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020)
com.pegarules.generated.activity.ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.step3_circum0(ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.java:496)
com.pegarules.generated.activity.ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.perform(ra_action_executemaystartactivity_59febb8db9b0c9993574e6c9ecc4de30.java:117)
com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3020)
com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:617)
com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:581)
com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:2366)
com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:394)
sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1066)
com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:792)
com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:328)
com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:703)
com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:312)
com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:221)
sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:277)
com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:222)
com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:373)
com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:266)
sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:99)
com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89)
javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1694)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:970)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:508)
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:878)
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:516)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:307)
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985)
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074)
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
Which caused: com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:683)
com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:581)
com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:2366)
com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:394)
sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1066)
com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:792)
com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:328)
com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:703)
com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:312)
com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:221)
sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:277)
com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:222)
com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:373)
com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:266)
sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:99)
com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89)
javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1694)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:970)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:508)
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:878)
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:516)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:307)
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:84)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608)
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985)
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074)
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)

any kind of help will be greatly appreciated.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
July 31, 2015 - 10:53am

Hello. Please provide more information -- for example, a Fiddler trace showing the requests leading up to and including the one that generates the 401.

 

September 28, 2017 - 12:24am

Hi, 

We are facing a similar issue. Was there a resolution for this? Please kindly share.

Regards

Ilham

September 28, 2017 - 2:24am
Response to ilhamUwais

Hi,

Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.

You may also refer this discussion link as a reference in the new thread.

Vidyaranjan | Community Moderator | Pegasystems Inc.