Can we please have a notification scheme enabled for Undertow Jira?
by Darran Lofthouse
Can we please have a notification scheme enabling for the Undertow Jira
project so that we can receive e-mail notifications.
I would suggest just use the same one as is used for Remoting JMX, it
should be sufficient to have the notifications go to the general mailing
list and interested individuals.
Regards,
Darran Lofthouse.
10 years, 2 months
Deadlock in JSP page on Wilflfy 8.0 Alpha 4 with umlauts
by Wolfgang Knauf
Hi all,
hope this is the right place and the correct component to post a
possible Undertow bug:
I have a simple EAR application, used to test the JavaEE feature of a
one-to-many-relationship. It contains an EJB jar and a WAR file, bundled
in an EAR file.
Whenever I add an umlaut in an input field and submit the form, WildFly
hangs up while processing the request to display the result page (which
should display a list of my entities). As this happens when generating
the JSP page, I assume an Undertow issue.
To reproduce:
1) deploy "KuchenZutat.ear" to WildFly (it uses the
"java:jboss/datasources/ExampleDS", so no configuration changes needed).
2) browse to "http://localhost:8080/KuchenZutatWeb/"
3) Klick "Neu"
4) enter something with an umlaut, e.g. "Käsekuchen"
5) click OK
Now the server hangs.
It works when avoiding umlauts.
Here are two stack traces, which I took by debugging the server with
Eclipse and breaking into debugger at random times. Note that the thread
name is different in the two stack traces - I took them at different
server runs.
"CoderResult.unmappableForLength()" seems to be the place for the
endless loop.
Thread [default task-3] (Suspended)
owns: CoderResult$2 (id=285)
HashMap<K,V>.hash(Object) line: not available
HashMap<K,V>.getEntry(Object) line: not available
HashMap<K,V>.get(Object) line: not available
CoderResult$2(CoderResult$Cache).get(int) line: not available
CoderResult$Cache.access$200(CoderResult$Cache, int) line: not available
CoderResult.unmappableForLength(int) line: not available
Surrogate$Parser.unmappableResult() line: not available
ISO_8859_1$Encoder.encodeBufferLoop(CharBuffer, ByteBuffer) line: not
available
ISO_8859_1$Encoder.encodeLoop(CharBuffer, ByteBuffer) line: not available
ISO_8859_1$Encoder(CharsetEncoder).encode(CharBuffer, ByteBuffer,
boolean) line: not available
ServletPrintWriter.write(CharBuffer) line: 58
ServletPrintWriter.write(char[], int, int) line: 76
ServletPrintWriterDelegate.write(char[], int, int) line: 96
JspWriterImpl.flushBuffer() line: 120
PageContextImpl.release() line: 188
JspFactoryImpl.internalReleasePageContext(PageContext) line: 115
JspFactoryImpl.releasePageContext(PageContext) line: 74
index.jsp line: not available
index_jsp(HttpJspBase).service(HttpServletRequest, HttpServletResponse)
line: 69
index_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 790
JspServletWrapper.service(HttpServletRequest, HttpServletResponse,
boolean) line: 365
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse,
String, Throwable, boolean) line: 321
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 254
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 790
ServletHandler.handleRequest(HttpServerExchange) line: 87
FilterHandler.handleRequest(HttpServerExchange) line: 82
ServletSecurityRoleHandler.handleRequest(HttpServerExchange) line: 54
ServletDispatchingHandler.handleRequest(HttpServerExchange) line: 36
SecurityContextAssociationHandler.handleRequest(HttpServerExchange)
line: 78
PredicateHandler.handleRequest(HttpServerExchange) line: 25
PredicateHandler.handleRequest(HttpServerExchange) line: 25
ServletInitialHandler.dispatchRequest(HttpServerExchange,
ServletRequestContext, ServletChain, DispatcherType) line: 196
ServletInitialHandler.dispatchToPath(HttpServerExchange,
ServletPathMatch, DispatcherType) line: 139
RequestDispatcherImpl.forward(ServletRequest, ServletResponse) line: 156
KuchenEdit.jsp line: 40
KuchenEdit_jsp(HttpJspBase).service(HttpServletRequest,
HttpServletResponse) line: 69
KuchenEdit_jsp(HttpServlet).service(ServletRequest, ServletResponse)
line: 790
JspServletWrapper.service(HttpServletRequest, HttpServletResponse,
boolean) line: 365
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse,
String, Throwable, boolean) line: 321
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 254
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 790
ServletHandler.handleRequest(HttpServerExchange) line: 87
FilterHandler$FilterChainImpl.doFilter(ServletRequest, ServletResponse)
line: 130
JsrWebSocketFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 136
ManagedFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 56
FilterHandler$FilterChainImpl.doFilter(ServletRequest, ServletResponse)
line: 132
JsrWebSocketFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 136
ManagedFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 56
FilterHandler$FilterChainImpl.doFilter(ServletRequest, ServletResponse)
line: 132
FilterHandler.handleRequest(HttpServerExchange) line: 85
ServletSecurityRoleHandler.handleRequest(HttpServerExchange) line: 56
ServletDispatchingHandler.handleRequest(HttpServerExchange) line: 36
SecurityContextAssociationHandler.handleRequest(HttpServerExchange)
line: 78
SSLInformationAssociationHandler.handleRequest(HttpServerExchange)
line: 113
AuthenticationCallHandler.handleRequest(HttpServerExchange) line: 52
ServletConfidentialityConstraintHandler(AbstractConfidentialityHandler).handleRequest(HttpServerExchange) line: 45
CachedAuthenticatedSessionHandler.handleRequest(HttpServerExchange)
line: 65
SecurityInitialHandler.handleRequest(HttpServerExchange) line: 70
PredicateHandler.handleRequest(HttpServerExchange) line: 25
SecurityContextCreationHandler.handleRequest(HttpServerExchange) line: 54
PredicateHandler.handleRequest(HttpServerExchange) line: 25
ServletInitialHandler.handleFirstRequest(HttpServerExchange,
ServletChain, ServletRequestContext, ServletRequest, ServletResponse)
line: 207
ServletInitialHandler.dispatchRequest(HttpServerExchange,
ServletRequestContext, ServletChain, DispatcherType) line: 194
ServletInitialHandler.access$000(ServletInitialHandler,
HttpServerExchange, ServletRequestContext, ServletChain, DispatcherType)
line: 72
ServletInitialHandler$1.handleRequest(HttpServerExchange) line: 128
HttpHandlers.executeRootHandler(HttpHandler, HttpServerExchange,
boolean) line: 36
HttpServerExchange$1.run() line: 628
XnioWorker$TaskPool(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: not available
ThreadPoolExecutor$Worker.run() line: not available
Thread.run() line: not available
Thread [default task-8] (Suspended)
CoderResult$Cache.access$200(CoderResult$Cache, int) line: not available
CoderResult.unmappableForLength(int) line: not available
Surrogate$Parser.unmappableResult() line: not available
ISO_8859_1$Encoder.encodeBufferLoop(CharBuffer, ByteBuffer) line: not
available
ISO_8859_1$Encoder.encodeLoop(CharBuffer, ByteBuffer) line: not available
ISO_8859_1$Encoder(CharsetEncoder).encode(CharBuffer, ByteBuffer,
boolean) line: not available
ServletPrintWriter.write(CharBuffer) line: 58
ServletPrintWriter.write(char[], int, int) line: 76
ServletPrintWriterDelegate.write(char[], int, int) line: 96
JspWriterImpl.flushBuffer() line: 120
PageContextImpl.release() line: 188
JspFactoryImpl.internalReleasePageContext(PageContext) line: 115
JspFactoryImpl.releasePageContext(PageContext) line: 74
Kuchen.jsp line: not available
Kuchen_jsp(HttpJspBase).service(HttpServletRequest,
HttpServletResponse) line: 69
Kuchen_jsp(HttpServlet).service(ServletRequest, ServletResponse) line: 790
JspServletWrapper.service(HttpServletRequest, HttpServletResponse,
boolean) line: 365
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse,
String, Throwable, boolean) line: 321
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 254
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 790
ServletHandler.handleRequest(HttpServerExchange) line: 87
FilterHandler.handleRequest(HttpServerExchange) line: 82
ServletSecurityRoleHandler.handleRequest(HttpServerExchange) line: 54
ServletDispatchingHandler.handleRequest(HttpServerExchange) line: 36
SecurityContextAssociationHandler.handleRequest(HttpServerExchange)
line: 78
PredicateHandler.handleRequest(HttpServerExchange) line: 25
PredicateHandler.handleRequest(HttpServerExchange) line: 25
ServletInitialHandler.dispatchRequest(HttpServerExchange,
ServletRequestContext, ServletChain, DispatcherType) line: 196
ServletInitialHandler.dispatchToPath(HttpServerExchange,
ServletPathMatch, DispatcherType) line: 139
RequestDispatcherImpl.forward(ServletRequest, ServletResponse) line: 156
KuchenEdit.jsp line: 43
KuchenEdit_jsp(HttpJspBase).service(HttpServletRequest,
HttpServletResponse) line: 69
KuchenEdit_jsp(HttpServlet).service(ServletRequest, ServletResponse)
line: 790
JspServletWrapper.service(HttpServletRequest, HttpServletResponse,
boolean) line: 365
JspServlet.serviceJspFile(HttpServletRequest, HttpServletResponse,
String, Throwable, boolean) line: 321
JspServlet.service(HttpServletRequest, HttpServletResponse) line: 254
JspServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 790
ServletHandler.handleRequest(HttpServerExchange) line: 87
FilterHandler$FilterChainImpl.doFilter(ServletRequest, ServletResponse)
line: 130
JsrWebSocketFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 136
ManagedFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 56
FilterHandler$FilterChainImpl.doFilter(ServletRequest, ServletResponse)
line: 132
JsrWebSocketFilter.doFilter(ServletRequest, ServletResponse,
FilterChain) line: 136
ManagedFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
line: 56
FilterHandler$FilterChainImpl.doFilter(ServletRequest, ServletResponse)
line: 132
FilterHandler.handleRequest(HttpServerExchange) line: 85
ServletSecurityRoleHandler.handleRequest(HttpServerExchange) line: 56
ServletDispatchingHandler.handleRequest(HttpServerExchange) line: 36
SecurityContextAssociationHandler.handleRequest(HttpServerExchange)
line: 78
SSLInformationAssociationHandler.handleRequest(HttpServerExchange)
line: 113
AuthenticationCallHandler.handleRequest(HttpServerExchange) line: 52
ServletConfidentialityConstraintHandler(AbstractConfidentialityHandler).handleRequest(HttpServerExchange) line: 45
CachedAuthenticatedSessionHandler.handleRequest(HttpServerExchange)
line: 65
SecurityInitialHandler.handleRequest(HttpServerExchange) line: 70
PredicateHandler.handleRequest(HttpServerExchange) line: 25
SecurityContextCreationHandler.handleRequest(HttpServerExchange) line: 54
PredicateHandler.handleRequest(HttpServerExchange) line: 25
ServletInitialHandler.handleFirstRequest(HttpServerExchange,
ServletChain, ServletRequestContext, ServletRequest, ServletResponse)
line: 207
ServletInitialHandler.dispatchRequest(HttpServerExchange,
ServletRequestContext, ServletChain, DispatcherType) line: 194
ServletInitialHandler.access$000(ServletInitialHandler,
HttpServerExchange, ServletRequestContext, ServletChain, DispatcherType)
line: 72
ServletInitialHandler$1.handleRequest(HttpServerExchange) line: 128
HttpHandlers.executeRootHandler(HttpHandler, HttpServerExchange,
boolean) line: 36
HttpServerExchange$1.run() line: 628
XnioWorker$TaskPool(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: not available
ThreadPoolExecutor$Worker.run() line: not available
Thread.run() line: not available
Best regards
Wolfgang Knauf
11 years, 2 months
Package rename
by Stuart Douglas
Just a heads up that I am planning on moving some classes around.
I am going to create a io.undertow.server.protocol package, and then move all http and ajp specific code to sub packages (similar to what I recently did with the client). At the moment the layout does not really make sense, and is basically just a holdover from the early days.
https://github.com/stuartwdouglas/undertow/compare/packages
Stuart
11 years, 2 months
figuring out how to integration resteasy oauth
by Bill Burke
I'm looking at Undertow handlers and Auth mechanisms and trying to
figure out how to port resteasy oauth. I need to be able to do the
following
1. check a cookie to see if user is already logged in.
2. If not redirect to auth server
3. get a redirect back from auth server
4. make an HTTP request to server based on information from the request
5. Obtain a token from this request
6. Parse and validate the token to obtain user identity and role mappings
7. Propagate the identity and role mappings so other layers can do their
thing (like role checks)
I can do most of this within a AuthenticationMechanism. sendChallenge()
would be used to send the redirect to the auth server. I think a custom
IdentityManager is needed. This would accept a custom Credential. The
Credential would have the identity and role mappings within it and the
IdentityManager would allocate an Account based on this information.
So, thats for Undertow....but I don't see any way to wire this all up
for Wildfly. The IdentityManager is hardcoded to a JaaS one and I see
no way of wiring up AuthenticationMechanisms. I see no other undertow
specific config except for undertow-handlers.conf.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
11 years, 2 months
Undertow development mode
by Stuart Douglas
Hi,
In Wildfly upstream I am introducing a 'development mode' flag (it is actually in Alpha3 as well, but I am going to change how it is represented in the model).
Basically the idea with this is that when this flag is set the server behaves in a way that is much more developer friendly, but is not suitable for production use. So far the changes are:
- Set JSP development mode
- Display stack traces in error pages. We do not do this by default for security reasons.
- Disable caching so file changes are picked up straight away
- Optionally persist session information across redeployments (still needs a little bit of work), which should prevent a developer from having to re-log in every time they redeploy.
I was wondering if anyone had any ideas for other features we could add to make development easier?
Stuart
11 years, 3 months
undertow is redirecting?
by Bill Burke
Client is doing a get request:
GET /jaxrs_spec_resource_requestmatching_web HTTP/1.1
Response is is a 302. Notice that there is no trailing / for the path.
Is this part of tthe servlet spec or something? Did Undertow used to
send a 301, or just invoke on the war's root?
I have a JAX-RS TCK test that is regressing. It is expecting a 200 or
301 response back from the server. I need to know how to word the
challenge to allow 302 as well, or Undertow needs to be fixed.
Thanks,
Bill
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
11 years, 3 months
AsyncContext.setTimeout()
by Bill Burke
Am I reading this correctly from the Javadocs? setTimeout() can only be
called within the thread that suspended the request?
IllegalStateException - if this method is called after the
container-initiated dispatch, during which one of the
ServletRequest#startAsync methods was called, has returned to the container
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
11 years, 3 months