java - org.apache.cxf.interceptor.Fault: [warning] org.eclipse.jetty.io.EofException: timeout -
i using apache karaf container along jetty, spring , cxf. , noticed lot of warning while authenticating using spring security.
tried find information on web, not find much. experienced similar issue. why such warnings? impact?
code snippet public void preparesecuritycontext(servletrequest request, servletresponse response, filterchain chain, meetingref user, string username, string token) throws ioexception, servletexception {
// build authentication object user's info abstractauthenticationtoken auth = new usertokenauthentication( username, token, getauthorities(user)); auth.setdetails(new webauthenticationdetailssource() .builddetails((httpservletrequest) request)); // set authentication securitycontext securitycontextholder.getcontext().setauthentication(auth); // continue through filter chain chain.dofilter(request, response); }
below snippet of exception stacktrace:
2015-07-23t09:37:42.0 localhost.localdomain org.apache.cxf.interceptor.fault: [warning] org.eclipse.jetty.io.eofexception: timeout 2015-07-23t09:37:42.0 localhost.localdomain @ [warning] org.apache.cxf.jaxrs.utils.jaxrsutils.readfrommessagebody(jaxrsutils.java:1243) 2015-07-23t09:37:42.0 localhost.localdomain @ [warning] org.apache.cxf.jaxrs.utils.jaxrsutils.processparameter(jaxrsutils.java:782) 2015-07-23t09:37:42.0 localhost.localdomain @ [warning] org.apache.cxf.jaxrs.utils.jaxrsutils.processparameters(jaxrsutils.java:741)
......................................................
2015-07-23t09:37:42.0 localhost.localdomain caused [warning] by: java.lang.runtimeexception: org.eclipse.jetty.io.eofexception: timeout 2015-07-23t09:37:42.0 localhost.localdomain @ [warning] org.apache.cxf.attachment.lazyattachmentcollection.loadall(lazyattachmentcollection.java:58) 2015-07-23t09:37:42.0 localhost.localdomain @ [warning]
....................................................... org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) 2015-07-23t09:37:42.0 localhost.localdomain @ [warning] com.mypackage.userauthenticationprocessingfilter.preparesecuritycontext(userauthenticationprocessingfilter.java:132)
can try manually setting authentication way please :
// below gets object database user want authenticate. person person1 = this.personservice.findpersonbyusername(username); collection<grantedauthority> authorities = new arraylist<>(); // add role of user authorities.add(new simplegrantedauthority("role_user")); authentication authentication = new usernamepasswordauthenticationtoken(person1, null, authorities); securitycontextholder.getcontext().setauthentication(authentication);
try out , please post log bit more proper formatting, because of it's possible see warnings now, , flow not understandable. lemme know if helps.
Comments
Post a Comment