Async support in WebLogic 12.2.1.2.0

536 views
Skip to first unread message

eduard...@datilmedia.com

unread,
Nov 7, 2016, 8:19:17 PM11/7/16
to pedestal-users
Hi,

I'm trying to run this interceptor in WebLogic 12c:

(def test-queue
(interceptor/before
(fn [context]
(let [channel (chan)]
(go
(let [msg (m/publish q/resp-queue "hello")
rec-msg (m/receive q/resp-queue)
response (assoc context :response (resp/ok rec-msg))]
(>! channel response)))
channel))))

I'm getting the following error, has anyone stumbled with the same issue?

INFO io.pedestal.http - {:line 78, :msg "GET /datil-pay-gtw/test"}
ERROR i.p.http.impl.servlet-interceptor - {:line 404, :msg "Servlet code threw an exception", :throwable #error {
:cause "The async-support is disabled on this request: weblogic.servlet.internal.ServletRequestImpl@373451cf[\nGET /datil-pay-gtw/test HTTP/1.1\nConnection: keep-alive\nCache-Control: max-age=0\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\nAccept-Encoding: gzip, deflate, sdch, br\nAccept-Language: en-US,en;q=0.8,es;q=0.6\n\n]"
:via
[{:type java.lang.IllegalStateException
:message "The async-support is disabled on this request: weblogic.servlet.internal.ServletRequestImpl@373451cf[\nGET /datil-pay-gtw/test HTTP/1.1\nConnection: keep-alive\nCache-Control: max-age=0\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\nAccept-Encoding: gzip, deflate, sdch, br\nAccept-Language: en-US,en;q=0.8,es;q=0.6\n\n]"
:at [weblogic.servlet.internal.ServletRequestImpl startAsync "ServletRequestImpl.java" 2029]}]
:trace
[[weblogic.servlet.internal.ServletRequestImpl startAsync "ServletRequestImpl.java" 2029]
[weblogic.servlet.internal.ServletRequestImpl startAsync "ServletRequestImpl.java" 2005]
[io.pedestal.http.impl.servlet_interceptor$start_servlet_async_STAR_ invokeStatic "servlet_interceptor.clj" 241]
[io.pedestal.http.impl.servlet_interceptor$start_servlet_async_STAR_ invoke "servlet_interceptor.clj" 232]
[io.pedestal.http.impl.servlet_interceptor$start_servlet_async invokeStatic "servlet_interceptor.clj" 250]
[io.pedestal.http.impl.servlet_interceptor$start_servlet_async invoke "servlet_interceptor.clj" 247]
[io.pedestal.impl.interceptor$prepare_for_async invokeStatic "interceptor.clj" 104]
[io.pedestal.impl.interceptor$prepare_for_async invoke "interceptor.clj" 98]
[io.pedestal.impl.interceptor$go_async invokeStatic "interceptor.clj" 115]
[io.pedestal.impl.interceptor$go_async invoke "interceptor.clj" 106]
[io.pedestal.impl.interceptor$enter_all_with_binding invokeStatic "interceptor.clj" 143]
[io.pedestal.impl.interceptor$enter_all_with_binding invoke "interceptor.clj" 121]
[io.pedestal.impl.interceptor$enter_all$fn__7473 invoke "interceptor.clj" 156]
[clojure.lang.AFn applyToHelper "AFn.java" 152]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.core$apply invokeStatic "core.clj" 646]
[clojure.core$with_bindings_STAR_ invokeStatic "core.clj" 1881]
[clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1881]
[clojure.lang.RestFn invoke "RestFn.java" 425]
[io.pedestal.impl.interceptor$enter_all invokeStatic "interceptor.clj" 154]
[io.pedestal.impl.interceptor$enter_all invoke "interceptor.clj" 148]
[io.pedestal.impl.interceptor$execute invokeStatic "interceptor.clj" 270]
[io.pedestal.impl.interceptor$execute invoke "interceptor.clj" 243]
[io.pedestal.http.impl.servlet_interceptor$interceptor_service_fn$fn__10469 invoke "servlet_interceptor.clj" 399]
[io.pedestal.http.servlet.FnServlet service "servlet.clj" 28]
[io.pedestal.http$servlet_service invokeStatic "http.clj" 323]
[io.pedestal.http$servlet_service invoke "http.clj" 322]
[iso_gtw.rest_service.server$servlet_service invokeStatic "server.clj" 47]
[iso_gtw.rest_service.server$servlet_service invoke "server.clj" 45]
[clojure.lang.Var invoke "Var.java" 388]
[io.pedestal.servlet.ClojureVarServlet service "ClojureVarServlet.java" 82]
[weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run "StubSecurityHelper.java" 286]
[weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run "StubSecurityHelper.java" 260]
[weblogic.servlet.internal.StubSecurityHelper invokeServlet "StubSecurityHelper.java" 137]
[weblogic.servlet.internal.ServletStubImpl execute "ServletStubImpl.java" 350]
[weblogic.servlet.internal.ServletStubImpl execute "ServletStubImpl.java" 247]
[weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction wrapRun "WebAppServletContext.java" 3679]
[weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction run "WebAppServletContext.java" 3649]
[weblogic.security.acl.internal.AuthenticatedSubject doAs "AuthenticatedSubject.java" 326]
[weblogic.security.service.SecurityManager runAsForUserCode "SecurityManager.java" 197]
[weblogic.servlet.provider.WlsSecurityProvider runAsForUserCode "WlsSecurityProvider.java" 203]
[weblogic.servlet.provider.WlsSubjectHandle run "WlsSubjectHandle.java" 71]
[weblogic.servlet.internal.WebAppServletContext doSecuredExecute "WebAppServletContext.java" 2433]
[weblogic.servlet.internal.WebAppServletContext securedExecute "WebAppServletContext.java" 2281]
[weblogic.servlet.internal.WebAppServletContext execute "WebAppServletContext.java" 2259]
[weblogic.servlet.internal.ServletRequestImpl runInternal "ServletRequestImpl.java" 1691]
[weblogic.servlet.internal.ServletRequestImpl run "ServletRequestImpl.java" 1651]
[weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor run "ContainerSupportProviderImpl.java" 270]
[weblogic.invocation.ComponentInvocationContextManager _runAs "ComponentInvocationContextManager.java" 348]
[weblogic.invocation.ComponentInvocationContextManager runAs "ComponentInvocationContextManager.java" 333]
[weblogic.work.LivePartitionUtility doRunWorkUnderContext "LivePartitionUtility.java" 54]
[weblogic.work.PartitionUtility runWorkUnderContext "PartitionUtility.java" 41]
[weblogic.work.SelfTuningWorkManagerImpl runWorkUnderContext "SelfTuningWorkManagerImpl.java" 640]
[weblogic.work.ExecuteThread execute "ExecuteThread.java" 406]
[weblogic.work.ExecuteThread run "ExecuteThread.java" 346]]}, :cause-trace "java.lang.IllegalStateException: The async-support is disabled on this request: weblogic.servlet.internal.ServletRequestImpl@373451cf[\nGET /datil-pay-gtw/test HTTP/1.1\nConnection: keep-alive\nCache-Control: max-age=0\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\nAccept-Encoding: gzip, deflate, sdch, br\nAccept-Language: en-US,en;q=0.8,es;q=0.6\n\n]\n at weblogic.servlet.internal.ServletRequestImpl.startAsync (ServletRequestImpl.java:2029)\n weblogic.servlet.internal.ServletRequestImpl.startAsync (ServletRequestImpl.java:2005)\n io.pedestal.http.impl.servlet_interceptor$start_servlet_async_STAR_.invokeStatic (servlet_interceptor.clj:241)\n io.pedestal.http.impl.servlet_interceptor$start_servlet_async_STAR_.invoke (servlet_interceptor.clj:232)\n io.pedestal.http.impl.servlet_interceptor$start_servlet_async.invokeStatic (servlet_interceptor.clj:250)\n io.pedestal.http.impl.servlet_interceptor$start_servlet_async.invoke (servlet_interceptor.clj:247)\n io.pedestal.impl.interceptor$prepare_for_async.invokeStatic (interceptor.clj:104)\n io.pedestal.impl.interceptor$prepare_for_async.invoke (interceptor.clj:98)\n io.pedestal.impl.interceptor$go_async.invokeStatic (interceptor.clj:115)\n io.pedestal.impl.interceptor$go_async.invoke (interceptor.clj:106)\n io.pedestal.impl.interceptor$enter_all_with_binding.invokeStatic (interceptor.clj:143)\n io.pedestal.impl.interceptor$enter_all_with_binding.invoke (interceptor.clj:121)\n io.pedestal.impl.interceptor$enter_all$fn__7473.invoke (interceptor.clj:156)\n clojure.lang.AFn.applyToHelper (AFn.java:152)\n clojure.lang.AFn.applyTo (AFn.java:144)\n clojure.core$apply.invokeStatic (core.clj:646)\n clojure.core$with_bindings_STAR_.invokeStatic (core.clj:1881)\n clojure.core$with_bindings_STAR_.doInvoke (core.clj:1881)\n clojure.lang.RestFn.invoke (RestFn.java:425)\n io.pedestal.impl.interceptor$enter_all.invokeStatic (interceptor.clj:154)\n io.pedestal.impl.interceptor$enter_all.invoke (interceptor.clj:148)\n io.pedestal.impl.interceptor$execute.invokeStatic (interceptor.clj:270)\n io.pedestal.impl.interceptor$execute.invoke (interceptor.clj:243)\n io.pedestal.http.impl.servlet_interceptor$interceptor_service_fn$fn__10469.invoke (servlet_interceptor.clj:399)\n io.pedestal.http.servlet.FnServlet.service (servlet.clj:28)\n io.pedestal.http$servlet_service.invokeStatic (http.clj:323)\n io.pedestal.http$servlet_service.invoke (http.clj:322)\n iso_gtw.rest_service.server$servlet_service.invokeStatic (server.clj:47)\n iso_gtw.rest_service.server$servlet_service.invoke (server.clj:45)\n clojure.lang.Var.invoke (Var.java:388)\n io.pedestal.servlet.ClojureVarServlet.service (ClojureVarServlet.java:82)\n weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run (StubSecurityHelper.java:286)\n weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run (StubSecurityHelper.java:260)\n weblogic.servlet.internal.StubSecurityHelper.invokeServlet (StubSecurityHelper.java:137)\n weblogic.servlet.internal.ServletStubImpl.execute (ServletStubImpl.java:350)\n weblogic.servlet.internal.ServletStubImpl.execute (ServletStubImpl.java:247)\n weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun (WebAppServletContext.java:3679)\n weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run (WebAppServletContext.java:3649)\n weblogic.security.acl.internal.AuthenticatedSubject.doAs (AuthenticatedSubject.java:326)\n weblogic.security.service.SecurityManager.runAsForUserCode (SecurityManager.java:197)\n weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode (WlsSecurityProvider.java:203)\n weblogic.servlet.provider.WlsSubjectHandle.run (WlsSubjectHandle.java:71)\n weblogic.servlet.internal.WebAppServletContext.doSecuredExecute (WebAppServletContext.java:2433)\n weblogic.servlet.internal.WebAppServletContext.securedExecute (WebAppServletContext.java:2281)\n weblogic.servlet.internal.WebAppServletContext.execute (WebAppServletContext.java:2259)\n weblogic.servlet.internal.ServletRequestImpl.runInternal (ServletRequestImpl.java:1691)\n weblogic.servlet.internal.ServletRequestImpl.run (ServletRequestImpl.java:1651)\n weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run (ContainerSupportProviderImpl.java:270)\n weblogic.invocation.ComponentInvocationContextManager._runAs (ComponentInvocationContextManager.java:348)\n weblogic.invocation.ComponentInvocationContextManager.runAs (ComponentInvocationContextManager.java:333)\n weblogic.work.LivePartitionUtility.doRunWorkUnderContext (LivePartitionUtility.java:54)\n weblogic.work.PartitionUtility.runWorkUnderContext (PartitionUtility.java:41)\n weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext (SelfTuningWorkManagerImpl.java:640)\n weblogic.work.ExecuteThread.execute (ExecuteThread.java:406)\n weblogic.work.ExecuteThread.run (ExecuteThread.java:346)\n"}

This is my weblogic.xml:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
<jsp-descriptor>
<keepgenerated>true</keepgenerated>
<debug>true</debug>
</jsp-descriptor>

<context-root>/datil-pay-gtw</context-root>
<servlet-descriptor>
<servlet-name>PedestalServlet</servlet-name>
</servlet-descriptor>

<container-descriptor>
<prefer-application-packages>
<package-name>org.joda.time.*</package-name>
<package-name>org.slf4j.*</package-name>
<package-name>org.apache.commons.*</package-name>
</prefer-application-packages>
<prefer-application-resources>
<resource-name>org/slf4j/impl/StaticLoggerBinder.class</resource-name>
</prefer-application-resources>
</container-descriptor>

<async-descriptor>
<timeout-secs>30</timeout-secs>
<timeout-check-interval-secs>15</timeout-check-interval-secs>
</async-descriptor>

<!--
<library-ref>
<library-name></library-name>
</library-ref>
-->

</weblogic-web-app>

And my web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
<description>Datil Pay Gateway</description>
<display-name>Datil Pay Gateway</display-name>

<servlet>
<servlet-name>PedestalServlet</servlet-name>
<servlet-class>io.pedestal.servlet.ClojureVarServlet</servlet-class>
<init-param>
<param-name>init</param-name>
<param-value>iso-gtw.rest-service.server/servlet-init</param-value>
</init-param>
<init-param>
<param-name>service</param-name>
<param-value>iso-gtw.rest-service.server/servlet-service</param-value>
</init-param>
<init-param>
<param-name>destroy</param-name>
<param-value>iso-gtw.rest-service.server/servlet-destroy</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>PedestalServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

</web-app>

Thanks!

Paul deGrandis

unread,
Nov 10, 2016, 7:53:54 AM11/10/16
to pedestal-users, eduard...@datilmedia.com
Hi,

Thanks for reaching out on the list!
After digging around a bit, I found this stackoverflow question, related to the Java exception you reported, which points the reader to another question.

That exception happens when a servlet attempts to call .startAsync in an initial context/request that isn't async-capable.

I don't have any experience with running a Pedestal service directly on WebLogic (as a WAR).  Perhaps others might be able to chime in with various config settings that worked.

Regards,
Paul

eduard...@datilmedia.com

unread,
Nov 12, 2016, 2:15:31 AM11/12/16
to pedestal-users, eduard...@datilmedia.com
Hi Paul,

Thank for your reply! You are right. I will look into Weblogic specific configurations.

Eduardo
Reply all
Reply to author
Forward
0 new messages