java 由于错误 c00ce56e 无法完成操作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10194257/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 00:01:10  来源:igfitidea点击:

Could not complete the operation due to error c00ce56e

javaajaxjsf-2richfacesinternet-explorer-9

提问by wutzebaer

I've upgraded from rich faces 3.3 to rich faces 4.2 because ajax didn't work for IE9. Now it still not works.

我已经从富人脸 3.3 升级到富人脸 4.2,因为 ajax 不适用于 IE9。现在还是不行。

After receiving the Response IE gets an JS error "SCRIPT58734: Der Vorgang konnte aufgrund des folgenden Fehlers nicht fortgesetzt werden: c00ce56e."while trying

收到响应后,IE 收到 JS 错误“SCRIPT58734: Der Vorgang konnte aufgrund des folgenden Fehlers nicht fortgesetzt werden: c00ce56e。” 在尝试时

data.responseText=request.responseText

on jsf.js.html?ln=javax.faces&conversationContext=2, Line 1 Row 21747

在 jsf.js.html?ln=javax.faces&conversationContext=2,第 1 行第 21747 行

I think it's because of an incorrecct HTTP header

我认为这是因为 HTTP 标头不正确

Content-Type: text/xml;charset=UTF8

should be

应该

Content-Type: text/xml;charset=UTF-8

Here The raw-response of the server

这里是服务器的原始响应

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: JSF/2.0
Cache-Control: no-cache
Content-Type: text/xml;charset=UTF8
Content-Length: 293
Date: Tue, 17 Apr 2012 15:25:22 GMT

<?xml version='1.0' encoding='UTF8'?>
<partial-response><changes><update id="outtest"><![CDATA[<span id="outtest"><span     class="outhello">Hello !</span></span>]]></update><update id="javax.faces.ViewState"><![CDATA[2809980525147413088:295565165947012503]]></update></changes></partial-response>

i'm usinng

我在用

javaee-web-api 6
myfaces-orchestra-core 1.4
Hibernate  4.1
Spring 3.1.1
Richfaces 4.2.0
Primefaces 3.2
jsf-api+impl 2.1.7

jstl 1.2

jstl 1.2

and running on tomcat 7

并在 tomcat 7 上运行

EDIT: of now i'm sure its the header. I set a breakpoint in charles-proxy and edited the response header manually, with the edited http header IE9 showed the right result without any errors

编辑:现在我确定它的标题。我在 charles-proxy 中设置了一个断点并手动编辑了响应头,编辑后的 ​​http 头 IE9 显示了正确的结果,没有任何错误

回答by BalusC

Your analysis is correct. The charsetattribute in the Content-Typeheader is wrong and IE9 chokes on that with error c00ce56e.

你的分析是正确的。标题中的charset属性Content-Type是错误的,IE9 因错误而窒息c00ce56e

JSF uses by default the one as obtained from ServletRequest#getCharacterEncoding(). This normally defaults to the client-specified one, or nullif there's none (which is often the case). This is normally overrideable by some custom filter which calls request.setCharacterEncoding().

JSF 默认使用从ServletRequest#getCharacterEncoding(). 这通常默认为客户端指定的一个,或者null如果没有(通常是这种情况)。这通常可以被一些调用的自定义过滤器覆盖request.setCharacterEncoding()

Given the incorrect charset, this can only mean that your web application is somewhere calling request.setCharacterEncoding()with "UTF8"instead of "UTF-8".

由于不正确的字符集,这只能意味着你的Web应用程序调用的地方request.setCharacterEncoding()"UTF8"替代"UTF-8"

I'd start checking all filters and their configuration.

我会开始检查所有过滤器及其配置。

回答by ckalyanp

i got similar error but the problem was with the response headers content length. We had 24kb of data on the request header and we have to reduce it to half. That fixed the issue. i hope this helps someone.

我遇到了类似的错误,但问题出在响应标头内容长度上。我们在请求标头上有 24kb 的数据,我们必须将其减半。那解决了这个问题。我希望这可以帮助别人。