简体   繁体   English

org.apache.cxf.interceptor.Fault:[警告] org.eclipse.jetty.io.EofException:超时

[英]org.apache.cxf.interceptor.Fault: [warning] org.eclipse.jetty.io.EofException: timeout

I am using apache karaf container along with jetty, spring and cxf. 我正在使用apache karaf容器以及码头,弹簧和cxf。 And noticed lot of warning while authenticating using spring security. 并且在使用Spring Security进行身份验证时注意到很多警告。

Tried to find the information on web, but could not find much. 试图在网上查找信息,但找不到太多。 Anybody experienced similar issue. 任何人都遇到过类似的问题。 Why such warnings? 为什么会有这样的警告? Will it impact? 有影响吗?

Code Snippet public void prepareSecurityContext(ServletRequest request, ServletResponse response, FilterChain chain, MeetingRef user, String username, String token) throws IOException, ServletException { 代码段 public void prepareSecurityContext(ServletRequest request, ServletResponse response, FilterChain chain, MeetingRef user, String username, String token) throws IOException, ServletException {

  // Build an Authentication object with the user's info AbstractAuthenticationToken auth = new UserTokenAuthentication( username, token, getAuthorities(user)); auth.setDetails(new WebAuthenticationDetailsSource() .buildDetails((HttpServletRequest) request)); // Set the authentication into the SecurityContext SecurityContextHolder.getContext().setAuthentication(auth); // Continue through the filter chain chain.doFilter(request, response); } 

Below is the 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 at [warning] org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1243) 2015-07-23T09:37:42.0 localhost.localdomain at [warning] org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:782) 2015-07-23T09:37:42.0 localhost.localdomain at [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 at [warning] org.apache.cxf.attachment.LazyAttachmentCollection.loadAll(LazyAttachmentCollection.java:58) 2015-07-23T09:37:42.0 localhost.localdomain at [warning]
....................................................... org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 2015-07-23T09:37:42.0 localhost.localdomain at [warning] com.mypackage.UserAuthenticationProcessingFilter.prepareSecurityContext(UserAuthenticationProcessingFilter.java:132)

Can you try manually setting the authentication this way please : 您可以尝试以这种方式手动设置身份验证吗:

// Below gets the object from the database for the user which you want to authenticate. 
    Person person1 = this.personService.findPersonByUsername(username);
        Collection<GrantedAuthority> authorities = new ArrayList<>();
// Add the role of the user
        authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
        Authentication authentication = new UsernamePasswordAuthenticationToken(person1, null, authorities);
        SecurityContextHolder.getContext().setAuthentication(authentication);

Try this out and please post the log a bit more properly with proper formatting, because of which it's only possible to see warnings now, and flow is not understandable. 尝试一下,请使用正确的格式更正确地发布日志,因此现在只能看到警告,并且流程无法理解。 Lemme know if this helps. 莱姆知道这是否有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CXF 2.7.7 org.apache.cxf.interceptor.Fault:意外元素 - CXF 2.7.7 org.apache.cxf.interceptor.Fault: Unexpected element dropwizard org.eclipse.jetty.io.EofException:早期的EOF异常 - dropwizard org.eclipse.jetty.io.EofException: Early EOF exception org.apache.cxf.interceptor.Fault:编组错误:null - org.apache.cxf.interceptor.Fault: Marshalling Error: null 获取异常org.apache.cxf.interceptor.Fault:org / apache / camel / CamelContext - Getting exception org.apache.cxf.interceptor.Fault: org/apache/camel/CamelContext org.apache.cxf.interceptor.Fault:无法发送消息。 引起:java.io.IOException: IOException invoking Service: Authentication failure - org.apache.cxf.interceptor.Fault: Could not send Message. Caused by: java.io.IOException: IOException invoking Service: Authentication failure CXF:org.apache.cxf.interceptor.Fault:调用时arguments的编号错误 - CXF : org.apache.cxf.interceptor.Fault: wrong number of arguments while invoking org.eclipse.jetty.io.EofException:上传大文件时抛出的早期EOF - org.eclipse.jetty.io.EofException: Early EOF thrown while uploading large file org.apache.cxf.interceptor.Fault:com / itextpdf / text / Document NoClassDefFoundError - org.apache.cxf.interceptor.Fault: com/itextpdf/text/Document NoClassDefFoundError org.apache.cxf.interceptor.Fault:找不到MIME边界 - org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary org.apache.cxf.interceptor.Fault:编组错误:遇到非法字符(NULL,Unicode 0):在任何内容中均无效 - org.apache.cxf.interceptor.Fault: Unmarshalling Error: Illegal character (NULL, unicode 0) encountered: not valid in any content
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM