Re: async problem ; Illegal State Exception

2015-12-30 Thread Sergey Beryozkin

Hi Benson

Does it happen only when

org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity

deals with the wrong user credentials, i.e, does it call
HttpServletResponseWrapper.sendError ?

May be that can explain it because that would probably bypass the async 
response channel (Jetty Continuation instance) allocated to a current 
request/response, but I'm only guessing at the moment


Sergey


On 29/12/15 23:11, Benson Margulies wrote:

Removing jolokia made this disappear, so I don't think it belongs
here, however odd it is that it only appeared with the use of CXF
async.

On Tue, Dec 29, 2015 at 2:38 PM, Benson Margulies  wrote:

I switched some code of mine to use AsyncRequest, and I get some scary
backtraces even though everything seems to be working just fine.

Note the presence of
org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity
in the backtrace. Now, I am running in Karaf with the jolokia feature
enabled, but until now I had no idea that jolokia was inserting itself
into the process. Can anyone suggest a way to learn anything about
what's happening here?



2015-12-29 14:32:14,328 | WARN  | tp1821513140-131 | HttpChannel
| 150 - org.eclipse.jetty.util - 9.2.10.v20150310 |
/rest/worker/process
java.lang.IllegalStateException: Committed
at 
org.eclipse.jetty.server.Response.resetBuffer(Response.java:1253)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.Response.sendError(Response.java:567)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.Response.sendError(Response.java:544)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:167)[51:javax.servlet-api:3.1.0]
at 
org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity(BasicAuthenticationHttpContext.java:49)[164:org.jolokia.osgi:1.3.0]
at 
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:68)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[146:org.eclipse.jetty.security:9.2.10.v20150310]
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[148:org.eclipse.jetty.servlet:9.2.10.v20150310]
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.Server.handleAsync(Server.java:553)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[150:org.eclipse.jetty.util:9.2.10.v20150310]
at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[150:org.eclipse.jetty.util:9.2.10.v20150310]



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/


Re: async problem ; Illegal State Exception

2015-12-30 Thread Benson Margulies
On Wed, Dec 30, 2015 at 6:28 AM, Sergey Beryozkin  wrote:
> Hi Benson
>
> Does it happen only when
>
> org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity

Sergey, there are no credentials anywhere that I know of. I'm invoking
my endpoint, not jolokia, and my endpoint has no credentials
configured of any kind.

>
> deals with the wrong user credentials, i.e, does it call
> HttpServletResponseWrapper.sendError ?
>
> May be that can explain it because that would probably bypass the async
> response channel (Jetty Continuation instance) allocated to a current
> request/response, but I'm only guessing at the moment
>
> Sergey
>
>
>
> On 29/12/15 23:11, Benson Margulies wrote:
>>
>> Removing jolokia made this disappear, so I don't think it belongs
>> here, however odd it is that it only appeared with the use of CXF
>> async.
>>
>> On Tue, Dec 29, 2015 at 2:38 PM, Benson Margulies 
>> wrote:
>>>
>>> I switched some code of mine to use AsyncRequest, and I get some scary
>>> backtraces even though everything seems to be working just fine.
>>>
>>> Note the presence of
>>> org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity
>>> in the backtrace. Now, I am running in Karaf with the jolokia feature
>>> enabled, but until now I had no idea that jolokia was inserting itself
>>> into the process. Can anyone suggest a way to learn anything about
>>> what's happening here?
>>>
>>>
>>>
>>> 2015-12-29 14:32:14,328 | WARN  | tp1821513140-131 | HttpChannel
>>> | 150 - org.eclipse.jetty.util - 9.2.10.v20150310 |
>>> /rest/worker/process
>>> java.lang.IllegalStateException: Committed
>>> at
>>> org.eclipse.jetty.server.Response.resetBuffer(Response.java:1253)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.Response.sendError(Response.java:567)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.Response.sendError(Response.java:544)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:167)[51:javax.servlet-api:3.1.0]
>>> at
>>> org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity(BasicAuthenticationHttpContext.java:49)[164:org.jolokia.osgi:1.3.0]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:68)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
>>> at
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[146:org.eclipse.jetty.security:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
>>> at
>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[148:org.eclipse.jetty.servlet:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
>>> at
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.Server.handleAsync(Server.java:553)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[147:org.eclipse.jetty.server:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[150:org.eclipse.jetty.util:9.2.10.v20150310]
>>> at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[150:org.eclipse.jetty.util:9.2.10.v20150310]
>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/


Re: async problem ; Illegal State Exception

2015-12-30 Thread Sergey Beryozkin

Hi
On 30/12/15 13:13, Benson Margulies wrote:

On Wed, Dec 30, 2015 at 6:28 AM, Sergey Beryozkin  wrote:

Hi Benson

Does it happen only when

org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity


Sergey, there are no credentials anywhere that I know of. I'm invoking
my endpoint, not jolokia, and my endpoint has no credentials
configured of any kind.


Jolokita context is still invoked though and it affects it somehow, so I 
guess going via its code may shed some light.


Cheers, Sergey





deals with the wrong user credentials, i.e, does it call
HttpServletResponseWrapper.sendError ?

May be that can explain it because that would probably bypass the async
response channel (Jetty Continuation instance) allocated to a current
request/response, but I'm only guessing at the moment

Sergey



On 29/12/15 23:11, Benson Margulies wrote:


Removing jolokia made this disappear, so I don't think it belongs
here, however odd it is that it only appeared with the use of CXF
async.

On Tue, Dec 29, 2015 at 2:38 PM, Benson Margulies 
wrote:


I switched some code of mine to use AsyncRequest, and I get some scary
backtraces even though everything seems to be working just fine.

Note the presence of
org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity
in the backtrace. Now, I am running in Karaf with the jolokia feature
enabled, but until now I had no idea that jolokia was inserting itself
into the process. Can anyone suggest a way to learn anything about
what's happening here?



2015-12-29 14:32:14,328 | WARN  | tp1821513140-131 | HttpChannel
 | 150 - org.eclipse.jetty.util - 9.2.10.v20150310 |
/rest/worker/process
java.lang.IllegalStateException: Committed
at
org.eclipse.jetty.server.Response.resetBuffer(Response.java:1253)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.Response.sendError(Response.java:567)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.Response.sendError(Response.java:544)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:167)[51:javax.servlet-api:3.1.0]
at
org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity(BasicAuthenticationHttpContext.java:49)[164:org.jolokia.osgi:1.3.0]
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:68)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[146:org.eclipse.jetty.security:9.2.10.v20150310]
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[148:org.eclipse.jetty.servlet:9.2.10.v20150310]
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.Server.handleAsync(Server.java:553)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[147:org.eclipse.jetty.server:9.2.10.v20150310]
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[150:org.eclipse.jetty.util:9.2.10.v20150310]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[150:org.eclipse.jetty.util:9.2.10.v20150310]




--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/




Re: async problem ; Illegal State Exception

2015-12-29 Thread Benson Margulies
Removing jolokia made this disappear, so I don't think it belongs
here, however odd it is that it only appeared with the use of CXF
async.

On Tue, Dec 29, 2015 at 2:38 PM, Benson Margulies  wrote:
> I switched some code of mine to use AsyncRequest, and I get some scary
> backtraces even though everything seems to be working just fine.
>
> Note the presence of
> org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity
> in the backtrace. Now, I am running in Karaf with the jolokia feature
> enabled, but until now I had no idea that jolokia was inserting itself
> into the process. Can anyone suggest a way to learn anything about
> what's happening here?
>
>
>
> 2015-12-29 14:32:14,328 | WARN  | tp1821513140-131 | HttpChannel
>| 150 - org.eclipse.jetty.util - 9.2.10.v20150310 |
> /rest/worker/process
> java.lang.IllegalStateException: Committed
> at 
> org.eclipse.jetty.server.Response.resetBuffer(Response.java:1253)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.Response.sendError(Response.java:567)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.Response.sendError(Response.java:544)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:167)[51:javax.servlet-api:3.1.0]
> at 
> org.jolokia.osgi.security.BasicAuthenticationHttpContext.handleSecurity(BasicAuthenticationHttpContext.java:49)[164:org.jolokia.osgi:1.3.0]
> at 
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:68)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[146:org.eclipse.jetty.security:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
> at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[148:org.eclipse.jetty.servlet:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:99)[191:org.ops4j.pax.web.pax-web-jetty:4.2.2]
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.Server.handleAsync(Server.java:553)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:261)[147:org.eclipse.jetty.server:9.2.10.v20150310]
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[150:org.eclipse.jetty.util:9.2.10.v20150310]
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[150:org.eclipse.jetty.util:9.2.10.v20150310]