频繁刷新页面websocket报错 5C

这是源码

这是错误日志

求解

5个回答

//建立
var websocket = null;
//判断当前浏览器是否支持WebSocket
if ('WebSocket' in window) {
websocket = new WebSocket("ws://localhost:8080/projectName/chat);
} else {
alert('当前浏览器 Not support websocket');
}
//监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
window.onbeforeunload = function() {
websocket.close;
};

每次刷新页面,都涉及websocket的关闭和新建问题,这种情况就是后端没有正确处理前端的websocket关闭。

ChineseYoung
一个善良的码农 回复Kiloveyousmile:好的,我试一下 ,谢谢了
一年多之前 回复
Kiloveyousmile
Kiloveyousmile 回复ChineseYoung: 对于java的websocket API我不了解。说一下方案,很简单,在后端处理websocket的地方,加一个处理监听前端websocket关闭的函数,处理前端websocket关闭事件。
一年多之前 回复
ChineseYoung
一个善良的码农 求解,应该怎么解决?
一年多之前 回复

没有关闭WEBSOCK造成通道占用资源过多。

ChineseYoung
一个善良的码农 求解,应该怎么解决?
一年多之前 回复

图片说明图片说明 js中主动设置监听,页面关闭时主动去关websocket

ChineseYoung
一个善良的码农 回复huixion: 好的,谢谢,我让前端试一下
一年多之前 回复
huixion
边缘颓废之 应该一样的,我也是这样用的 没问题
一年多之前 回复
ChineseYoung
一个善良的码农 页面刷新也一样吗?
一年多之前 回复

websocket 支持ping pong 操作。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
频繁刷新页面数据库报错
java.sql.SQLException: Timed out waiting for a free available connection.rn at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:503)rn at cn.com.zdhr.inventory.tool.DBConnection.getConnection(DBConnection.java:28)rn at cn.com.zdhr.inventory.apply.ApplyList.getList(ApplyList.java:106)rn at org.apache.jsp.apply.listAjax_jsp._jspService(listAjax_jsp.java:81)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at cn.com.zdhr.inventory.filter.YearSelectFilter.doFilter(YearSelectFilter.java:32)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at cn.com.zdhr.inventory.filter.LoginFilter.doFilter(LoginFilter.java:39)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rn当我刷新到一定次数后报错
问大家一个问题 用websocket 刷新页面之后报错
java.util.concurrent.ExecutionException: java.io rnrn.IOException: 你的主机中的软件中止了一个已建立的连接。rnrn前台jsp页面用的是websocket
WCF通信频繁报错
wcf经常莫名其妙的出错,提示通信对象system.servicemodel.channels.servicechannel无法永远通信,因为其处于出错状态。估计是连接数太多导致,重启一下服务又正常了。请问各位大侠有无什么办法解决?
DDMS频繁报错求解
[img=https://img-bbs.csdn.net/upload/201706/15/1497491725_119491.png][/img]rn求大神指出我的设备问题!!
ExtJS session过期,刷新页面报错
当session过期时,如果我点击页面上的操作,系统会提示重新登录;如果我是直接刷新页面,就报500错误。rn拦截器:rnpublic class LoginInterceptor extends AbstractInterceptorrn @Overridern public String intercept(ActionInvocation invocation) throws Exception rn Map session = invocation.getInvocationContext().getSession();rn// if(!ServletActionContext.getRequest().isRequestedSessionIdValid())rn// return "login";//session过期跳转rn// rn if(invocation.getAction() instanceof LoginAction || invocation.getAction() instanceof LogoutAction || invocation.getAction() instanceof ImageCodeAction || invocation.getAction() instanceof ValidCodeAction)rn return invocation.invoke();rn rn HttpServletRequest request = ServletActionContext.getRequest();rn HttpServletResponse response = ServletActionContext.getResponse();rn System.out.println(session.get("loginUser"));rn if(session.get("loginUser") == null)rn System.out.println("1111");rn if(request.getHeader("x-requested-with") != null && request.getHeader("x-requested-with").equalsIgnoreCase("XMLHttpRequest"))rn System.out.println("2222");rn response.setHeader("sessionstatus", "timeout");rn rn return "login";rn elsern return invocation.invoke();rn rn rnrnrnrnjs:rnExt.Ajax.on('requestcomplete',checkUserSessionStatus,this);rnfunction checkUserSessionStatus(conn,response,options)rn //Ext重新封装了response对象rn if(response.getResponseHeader.sessionstatus)rn //alert('您的登录已超时,请重新登录');rn Ext.Msg.alert('提示','会话超时,请重新登录',function()rn window.location.href="login.jsp";rn );rn rnrnrnstruts配置文件:rnrn rn rn rn rn image,validCodern rn rn image,validCodern rn rn rn rn rn /login.jsprn rn
vue 刷新页面报错404
如图:   vue路由的问题:把历史改为哈希之后就好了,但是哈希路由在360浏览器下,后退不了。如果大家有什么好的解决方法欢迎留言!
asp.net如果防止用户频繁刷新页面
asp.net如果防止用户频繁刷新页面rn 因页面的数据量大,用户频繁刷新页面会加重服务器的负担.rn 1,用JS屏蔽F5.好像浏览上面的刷新按钮无法屏蔽.rn 2,用window.open(页面);会不会有浏览器屏蔽了弹出窗口.rn
Asp.Net系统刷新页面频繁出错,寻求帮助。
我的一个不复杂的库存数据查询页面,反复刷新时,偶尔会有黄色错误页面,按工具栏再刷新又显示出正常查询结果。rn Dugub信息显示是:DataBinder.Eval:“System.Data.DataRowView”不包含名称为 商品代号 的属性。。rn 在多台机共享ADSL上网的网络访问,更是频繁。开发时单机调试从来没有碰到这个问题。程序中数据链接每次查询完我都关闭的。服务器Win2003+SQL2000SP3,双1.8G+RAID5+2GB内存+1M光纤接入,单独运行该Asp.Net系统。rnrn '函数:从数据库中获取数据集rn '参数:SqlStr-SQL查询字符串rn '返回:DataSet-数据集rn Public Function GetDataFromDB(ByVal sqlstr As String) As DataSetrn Dim DataConnection As New SqlConnection(ConnectStr)rn Dim DataAdapter As New SqlDataAdapter(sqlstr, DataConnection)rn Dim DataSet As New DataSetrn Tryrn DataSet.Clear()rn DataAdapter.Fill(DataSet)rn If Not DataSet Is Nothing Thenrn Return DataSetrn End Ifrn Catchrn Return Nothingrn Finallyrn DataConnection.Close()rn End Tryrn End Functionrn-------页面代码---------------rn Public strSqlInfo As Stringrn Public Ds As New DataSetrnrn Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadrn '在此处放置初始化页的用户代码rn If Not IsPostBack Thenrn '判断是否正常登录进入rn If Request.Cookies("归属单位").Value = "" Then Response.Redirect("../Default.Aspx")rn DataGridInfo.DataSource = GetDataFromDB("Select TOP 1 * From 视图_库存视图 Where 1<>1")rn DataGridInfo.DataBind()rn '填充类别树rn TreeViewinfo.Nodes.Clear()rn Ds.Clear()rn Ds = GetDataFromDB("Select * From 商品类别表 Order By 类别代号")rn IntiTree(TreeViewinfo.Nodes, "0")rn '填充可选择的仓库rn DrpListSKU.DataSource = GetDataFromDB("Select 仓库名称 From 字典_仓库表 ")rn DrpListSKU.DataBind()rn Elsern Dim strNode As String '树型节点名称rn Dim strAskInfo As Stringrn '获取商品类型节点rn strNode = TreeViewinfo.GetNodeFromIndex(TreeViewinfo.SelectedNodeIndex).ID.ToStringrn '检查是否有查询内容rn If Trim$(TxtBoxAsk.Text) = "" Thenrn strAskInfo = "%"rn strSqlInfo = " Where 类别代号 Like '" + strNode + "%' And 仓库名称='" + DrpListSKU.SelectedValue.ToString + "'"rn Elsern strAskInfo = "%" + Trim$(TxtBoxAsk.Text) + "%"rn strSqlInfo = " Where 仓库名称='" + DrpListSKU.SelectedValue.ToString + "'" _rn + " And (商品名称 Like '" + strAskInfo + "' Or 商品型号 Like '" + strAskInfo + "' " _rn + " Or 商品规格 Like '" + strAskInfo + "' Or 五笔代码 Like '" + strAskInfo + "' Or 拼音代码 Like '" + strAskInfo + "') "rn End Ifrn '判断是否只显示数量>0的商品rn If ChkHasSKU.Checked = True Thenrn strSqlInfo = strSqlInfo + " And (库存<>0 Or 预订<>0) "rn End Ifrnrn End Ifrn End Subrnrn '功能:递归填充TreeView树/该模块已测试完全正常rn Private Sub IntiTree(ByRef Nds As Microsoft.Web.UI.WebControls.TreeNodeCollection, ByVal ParentId As String)rn Dim dv As New DataViewrn Dim drv As DataRowViewrn Dim tmpNd As Microsoft.Web.UI.WebControls.TreeNodern Dim strId As Stringrn dv.Table = Ds.Tables(0).DefaultView.Tablern dv.RowFilter = "父类别='" & ParentId & "'"rn For Each drv In dvrn tmpNd = New Microsoft.Web.UI.WebControls.TreeNodern strId = drv("类别代号")rn tmpNd.ID = strIdrn tmpNd.Text = drv("类别名称")rn 'tmpNd.ImageUrl = drv("ICON").ToStringrn Nds.Add(tmpNd)rn IntiTree(Nds(Nds.Count - 1).Nodes, strId)rn Nextrn End Subrnrn Private Sub BtnAsk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAsk.Clickrn '清除显示和选择rn DataGridInfo.SelectedIndex = -1rn DataGridInfo.CurrentPageIndex = 0rn DataGridInfo.DataSource() = GetDataFromDB("Select * From 视图_库存视图 " + strSqlInfo + " Order BY 商品名称")rn DataGridInfo.DataBind()rn End Subrnrn Private Sub DataGridInfo_PageIndexChanged1(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles DataGridInfo.PageIndexChangedrn '清除显示和选择rn DataGridInfo.SelectedIndex = -1rn DataGridInfo.CurrentPageIndex = e.NewPageIndexrn DataGridInfo.DataSource() = GetDataFromDB("Select * From 视图_库存视图 " + strSqlInfo + " Order BY 商品名称")rn DataGridInfo.DataBind()rn End Sub
nginx下websocket报错解决方法
在eginx中server里加上 proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_s...
autobahn websocket 报错问题
大神们,Android 上用 websocket ,connection连接时回调了onOPen然后又马上回调了onClose。请问这是怎么回事??rnonClose 中的code值 为1 , reason 为null。rn[img=https://img-bbs.csdn.net/upload/201804/28/1524900824_591708.png][/img]rnrn请问这是怎么回事?是什么原因导致的?rn
【见鬼了】WIN7下不报错XP下频繁报错
公司的软件最近要我改个东西,改完后发现XP下会经常报错rnrnWIN7下不报错,报错的地方我截下来了,请看图rnrn[img=http://www.lxkkk.cn/1.jpg][/img]rnrn[img=http://www.lxkkk.cn/2.jpg][/img]rnrn[img=http://www.lxkkk.cn/3.jpg][/img]rnrn[img=http://www.lxkkk.cn/4.jpg][/img]
waveOutUnprepareHeader 报错很频繁怎么办?
我用的双缓冲,结果发现rn switch(uMsg)rn rn case WOM_DONE:rn waveOutUnprepareHeader(hwo,dwParam1,sizeof(WAVEHDR));rn m_pMain->PlaySound(*dwParam1);rn break;rn rn这里的waveOutUnprepareHeader(hwo,dwParam1,sizeof(WAVEHDR))很频繁的出错,返回的dwParam1是错误的指针,返回的错误值是11,结果好像这次播放就跳过去了,如果写入的缓冲设大一点,那么中间就会有音掉了,如果缓冲小一点,播出来的声音又发颤,像哭.为什么waveOutUnprepareHeader会出错啊?我该怎么改呢
tomcat5.5和apache 频繁报错 80分
异常如下 rnMay 2, 2006 4:08:22 PM org.apache.jk.core.MsgContext actionrnWARNING: Error sending end packetrnjava.net.SocketException: Broken pipern at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:136)rn at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:518)rn at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112)rn at org.apache.jk.core.MsgContext.action(MsgContext.java:293)rn at org.apache.coyote.Response.action(Response.java:182)rn at org.apache.coyote.Response.finish(Response.java:304)rn at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204)rn at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)rn at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)rn at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)rn at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Thread.java:595)rnMay 2, 2006 4:08:22 PM org.apache.jk.common.ChannelSocket processConnectionrnWARNING: processCallbacks status 2rnrn那位对这方面比较熟悉 ,给些指点
ambari安装频繁报错问题
刚开始报no moduled named yum。 意识到python版本问题,我用的centos7.2,自带python是2.7.5,公司运维同事又给我装了python2.7.12 搞的出了一大堆问题。 于是vi /etc/bin/yum 把首行改回去,吧/usr/bin/python链接到老的python,不报这个错了,又开始报下面的。。 hdp-select-2.6.3.0-235.n...
websocket打包时单元测试报错
Caused by: java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.1.4.RELEASE.jar:5.1.4.RELEAS...
websocket报错后重连
websocket报错后重连原始代码解决过程最终解决方案 今天后端websocket服务器出了问题,导致前端一直在提示net::ERR_CONNECTION_REFUSED。 原始代码 websocket连接的方法之前的代码: deviceWebsocket () { if ('WebSocket' in window) { try { // 报错...
spring与websocket集成请求头报错
nn```一月 05, 2018 6:28:16 下午 org.apache.catalina.core.StandardWrapperValve invoken严重: Servlet.service() for servlet [Spring MVC Dispatcher Servlet] in context with path [/eLearningSystem] threw exception [Request processing failed; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Uncaught failure for request http://127.0.0.1:8085/eLearningSystem/ws.do?CFAPP_USERNAME=admin; nested exception is java.lang.NoSuchMethodError: org.springframework.web.socket.WebSocketHttpHeaders.getUpgrade()Ljava/lang/String;] with root causenjava.lang.NoSuchMethodError: org.springframework.web.socket.WebSocketHttpHeaders.getUpgrade()Ljava/lang/String;n at org.springframework.web.socket.server.support.DefaultHandshakeHandler.doHandshake(DefaultHandshakeHandler.java:171)n at org.springframework.web.socket.server.support.WebSocketHttpRequestHandler.handleRequest(WebSocketHttpRequestHandler.java:120)n at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)n at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:73)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at cn.learning.filter.SessionFilter.doFilter(SessionFilter.java:55)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at cn.learning.pager.PagerFilter.doFilter(PagerFilter.java:28)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at cn.learning.filter.EncryptionRequestFilter.doFilter(EncryptionRequestFilter.java:199)n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)n at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)n at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)n at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)n at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)n at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)n at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)n at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)n at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)n at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)n at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)n at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)n at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)n at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)n at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623)n at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)n at java.lang.Thread.run(Thread.java:745)n n```n请各位大神帮帮忙,我下载的demo上传的时候Upgrade的值也是个字符串数组。 但是我集成到项目里就报这个错了,在网上搜了找解决方案,都没出现过这样的情况,不知道该怎么修改。nn
ssh整合+websocket报错org.springframework.beans.
rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSocketHandlerMapping' defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.web.servlet.HandlerMapping org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport.webSocketHandlerMapping()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultSockJsTaskScheduler' defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport.defaultSockJsTaskScheduler()] threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.setRemoveOnCancelPolicy(Z)Vrn at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4751)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5175)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1722)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.web.servlet.HandlerMapping org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport.webSocketHandlerMapping()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultSockJsTaskScheduler' defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler org.springframework.web.socket.config.annotation.WebSocketConfigurationSupport.defaultSockJsTaskScheduler()] threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.setRemoveOnCancelPolicy(Z)Vrn
不用缓存,如何防止用户频繁刷新页面呢
?最好用javascriptrn让用户只能在几秒之内不能刷新页面,显示错误信息.
Linux下web应用中频繁刷新页面产生的问题
我需要从后台通过命令获取一个操作的状态以及进度,通过刷新jsp来获取这些信息(3秒每次),过了一个时间之后,发现用pstree看到有1000多个java子进程之多,并且报IOException:too many open files,请问怎么解决呢?rnrn很急,希望大虾救命!
Eclipse中Tomcat频繁报错的解决办法
在Web应用程序的开发中,一旦修改JSP文件或静态资源文件,Tomcat服务器则不断提示错误,大意为某某日志文件被其他进程锁定,无法删除更新,并且这种提示是中断性的,需要用户确认终结,十分影响工作效率:Publishing failed with multiple errors Could not delete C:\DTools\STS\pivotal-tc-server-developer-3.
我的电脑在开机20分钟频繁报错~
我组装的电脑(K6/233 CPU、FIC-PA2007主板(威盛Apollo VP2芯片组)、Corsair PC133 SDRAM 256Mb内 存)最近在开机20分钟左右、做内核编译时频繁地报SIG11错,但在头20分钟内从不出问题。重启动不会复位时钟,但整夜关机会。更换所有内存未解决问 题,相关的典型编译会话日志附后。
关于频繁点击页面上的linkbutton报错
Server Error in '/' Application.rn--------------------------------------------------------------------------------rnrnInvalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. rnDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. rnrnException Details: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.rnrnSource Error: rnrnAn unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. rnrnStack Trace: rnrnrn[ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]rn System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +2080185rn System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +106rn System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +31rn System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11rn System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +408rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3776rnrn rnrnrn--------------------------------------------------------------------------------rnVersion Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 rn于永鑫china 20:42:59rnServer Error in '/' Application.rn--------------------------------------------------------------------------------rnrnIndex was outside the bounds of the array. rnDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. rnrnException Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.rnrnSource Error: rnrnAn unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. rnrnStack Trace: rnrnrn[IndexOutOfRangeException: Index was outside the bounds of the array.]rn DJQ_TokenAllList.OpinionParam() +231rn DJQ_TokenAllList.GetInit() +771rn DJQ_TokenAllList.Page_Load(Object sender, EventArgs e) +154rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34rn System.Web.UI.Control.OnLoad(EventArgs e) +99rn System.Web.UI.Control.LoadRecursive() +47rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061rnrn rnrnrn--------------------------------------------------------------------------------rnVersion Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 rnrnrnrnrnrnrn我的页面上有些 linkbutton 控件..如果快速地点..点几下以后就会报上面这个错误 rnrn不知道是什么原因? 英文不大会.请教一下大家.谢谢..rnrn另: 服务器上的项目会发生这样的事情.我本地测试了不会.谢谢
【请教】Ext异步树频繁加载报错
Ext异步树频繁加载报错rn---------------------------rn错误rn---------------------------rn出现了运行时间错误。rn是否要进行调试?rnrn行: 22902rn错误: 'length' is null or not an objectrn---------------------------rn是(Y) 否(N) rn---------------------------rn我是点击一个图片,弹出ext。widnowrn里面是一棵异步树rn主要代码如下:rnvar wincount = 0;rnvar resTreeWindow;rnfunction openResTree(img, hashId) rn if (wincount == 1 && resTreeWindow) rn resTreeWindow.close();rn rn var root = new parent.parent.Ext.tree.AsyncTreeNode(rn id : '-1',rn text : '资源列表'rn );rnrn var resourceTree = new parent.parent.Ext.tree.TreePanel(rn width : 253,rn height : 320,rn rootVisible : true,rn autoScroll : true,rn loader : new parent.parent.Ext.tree.TreeLoader(rn dataUrl : 'authacount.do?method=getResTree&hashId='rn + hashIdrn ),rn root : rootrn );rnrn resourceTree.getRootNode().expand(true,false);rnrn var pos = getElementPos(img);rnrn resTreeWindow = new parent.parent.Ext.Window(rn id : 'resTreeWindow',rn title : '查看资源列表',rn // renderTo : Ext.get("body"),rn width : 275,rn autoHeight : true, // 窗口自适应高度rn pageX : pos.x + 50,rn pageY : pos.y + 120,rn closeAction : 'close',rn cls : 'pop',rn autoDestroy : true,rn draggable : false,rn modal : false,rn plain : true,rn collapsible : false,rn closable : true,rn resizable : false,rn items : resourceTree,rn listeners : rn beforeclose : function() rn wincount = 0;rn ,rn beforeshow : function() rn wincount = 1;rn rn rn );rn resTreeWindow.setPosition(pos.x + 50, pos.y + 120);rn resTreeWindow.show();rn var close = parent.parent.Ext.DomQuery.select("div[class*=x-tool-close]");rn for (var i = 0; close && i < close.length; i++) rn close[i].title = Mocha.app.closetitle;rn rnrnrn我如果频繁点击图片,就报错:rn---------------------------rn错误rn---------------------------rn出现了运行时间错误。rn是否要进行调试?rnrn行: 22902rn错误: 'length' is null or not an objectrn---------------------------rn是(Y) 否(N) rn---------------------------rnrn请大家帮忙看看有解决办法吗
没有重启动,但是IE频繁报错
你们的机器最近是不是也出现这种情况呢?
麻烦大家:Win2000 系统频繁报错
麻烦大家:Win2000 系统频繁报错rn1、驱动程序在 \Device\Harddisk0\DR0 上检测到控制器错误 rn2、网络地址转换器(NAT)未能请求内核 模式转换模块的操作。这可能意味着配置不正确、资源不足 或有一个内部错误。数据是错误代码。 rnrn这两项提示是现在我们的 Win2000 Pro 的事件查看器 当中最常见的 错误信息。 rnrn现在麻烦大家帮助分析一下,看看究竟原因是什么?? rnrn谢谢!rnrn
系统频繁报错,而且不能安装软件
有一台安装了win2000的电脑,使用一段时间后,系统不断报告一个错误:WinMgmt.exe程序启动出现错误,正被windows关闭。。。。。的对话框,点击确定按钮后,该对话框不断出现,最后会重新启动。而且如果我不管对话框的话。要是安装软件的话,等到安装快要结束后自动关闭,重新启动。
在IE7.0的环境下没有报错,在6.0中就频繁报错啊
[code=HTML]rn rn rn rn rn rnrn rnrn rnrn rnrn rnrnrnrn rn rn rn rn rn rn rn1rn rn2rn rn3rn rn4rn rn5rn rn rn rn rn rn 1rn rn 2rn rn 3rn 4rn 5rnrnrnrnrnrnrnrnrn rn[/code]rn这段代码在VS的编译环境下,切换不到设计页面。rn可是能在IE7.0环境下运行。可是到6.0下,就会频繁报错。rn
刷新页面
一些查询数据库的asp页面,为什么更改了数据库之后,再去浏览该页面,看到的是该之前的数据,只有刷新后才可以看到此刻数据库里的数据。这是不是浏览器缓存的缘故,有哪些方法可以实现一打开该页,就是刷新了的呢?rn望高手指教!
关于在vue项目中,刷新页面时websocket断开连接的解决办法
Vue作为一个单页面应用, webSocket可以说是用起来非常爽了. 因为webSocket在同一个html文件中,是可以保持连接的. 但是当使用f5或者点击刷新页面以后, websocket连接就会强制关闭. 关于这个问题我研究了很久,最后找到两种解决办法;先说下我踩过的坑,起初我设想,在登录并创建websocket连接成功后,设置一个字段保存在localStorage或者cookie中: w...
……刷新页面……
如何实现页面的刷新,rn第一,说我想用一个按钮,点之后可以实现和浏览器刷新一样的功能。rn第二,如果用链接呢?链到本页,但是如何实现在重新打开该页面的过程中自动刷新呢?
刷新页面!!
在我关闭模态窗体的时候并刷新页面的时候:为什么在刷新页面的时候它还打开了一次页面窗体并出现了两个页面请问为什么要这样不让它出现两个页面呢???rn代码:rnPage.RegisterStartupScript("CloseAndRefresh"," ");rn我也加上不管用!
刷新页面?
b/s下在页面A中打开一个文档(新开一个windows窗口B),w文档中有一个按钮,做了一些操作后,我关闭该窗口,此时我希望在关闭B窗口时,A窗口的页面可以刷新以下以重新从domino取数据,不知道该如何处理?rn谢谢!!!
websocket连接不上、报错、自动关闭,求解
学WS遇到三个问题:rn一:rn[img=https://img-bbs.csdn.net/upload/201404/07/1396833649_156463.png][/img]rn描述:能够成功连上并调用onopen方法,并且能够收到服务器推送的消息,但是在send发送数据时,提示连接被关闭1002:An unrecoverable IOException occurred so the connection was closedrn环境:window7+chrome/360浏览器+tomcat7rnwebsocket初始化方法:rn[code=javascript]function WS(u, messageF) rnvar ws = null;rnvar url = 'ws://localhost:8080/Auction/websocket';rnif ('WebSocket' in window) rnws = new WebSocket(url);rn else if ('MozWebSocket' in window) rnws = new MozWebSocket(url);rnrnws.onmessage = function(m) rnmessageF(m.data);rn;rnws.onopen = function() rnmessageF('Opened');rn;rnws.onclose = function(e) rnmessageF(e.code + ":" + e.reason);rn;rnws.onerror = function(e) rnfor ( var p in e) rnmessageF(p + "=" + e[p]);rnrn;rnthis.send = function(m) rnws.send(m);rn;rn[/code]rn服务器WS:rn[code=java]public void onOpen(Session session, EndpointConfig conf) rnthis.session = session;rnRemoteEndpoint.Basic remoteEndpointBasic = session.getBasicRemote();rnsession.addMessageHandler(new WSMessageHandler(remoteEndpointBasic));rnString message = String.format("* %s %s", nickname, "has joined.");rntry rnsession.getBasicRemote().sendText(message);//这条信息页面能收到rn catch (Exception e) rnrnrnpublic void onClose() rnString message = Stringrn.format("* %s %s", nickname, "has disconnected.");rnSystem.out.println(message);rnrnpublic void onError(Throwable t)rnSystem.out.println(t.toString());rnrn[/code]rn二:rn环境:android4.0+chrome+tomcat7,代码跟上面相同rn描述:连不上WS,onopen方法没有被调用,onerror方法被调用,错误信息如下。之后调用onclose,正常关闭,关闭码为1006rn[img=https://img-bbs.csdn.net/upload/201404/07/1396833692_997954.png][/img]rn三、rn环境:android4.0+UC+tomcat7,代码跟上面相同rn描述:连不上WS,onopen方法没有被调用,onerror方法也没被调用,onclose被调用,连接被正常关闭,关闭码为1006rnrn测试用的浏览器都是支持WS的,求解啊rn求大神,在线等……
springboot同时整合websocket和定时任务报错
springboot同时整合websocket和定时任务报错 最近用springboot整合websocket和定时任务时,出现报错信息Unexpected use of scheduler 启动类 @EnableWebSocket @EnableScheduling public class MpApplication { public static void m...
spring boot 运行单元测试时,websocket报错
spring boot 运行单元测试时,websocket报错 SpringBootTest增加webEnvironment 参数: package com.hengyun.admin; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.Sp...
【WebSocket】WebSocket经典实例
接着上一篇的环境,我们接下来弄了个WebSocketTest2 目录结构 jquery-1.12.3.js(贴心服务) WebSocketTest2.java package com.hust.websockettest; import java.io.IOException; import java.util.Queu...
websocket
java代码rnimport javax.websocket.OnMessage;rnimport javax.websocket.server.ServerEndpoint;rnrnrn @ServerEndpoint("/echo")rn public class EchoServer rn @OnMessagern public String echo(String incomingMessage)rn return "I got this"+incomingMessage+""rn +"so i am sending it back !";rn rnrn rnrn html代码rnrnrnrn rn Insert title herern rnrnrn Echo Serverrn rn rnrnrn rnrnrn rnrnrnrn2个错误 rn第一个是直接报错 rn第二个是 send_echo 未定义
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数