简体   繁体   English

Java Web应用程序在一段时间后停止工作

[英]Java web app stops working after some time

When I run my Java Web App, made using Netbeans, it runs perfectly with no problems, and everything seems to work, but if I leave it be, after some idle time, if wanted to do anything with it (mostly loading rows from database, jquery, ajax), nothing happens, when I refresh the page, I get this error. 当我运行使用Netbeans制作的Java Web App时,它可以完美运行,没有任何问题,并且一切正常,但是如果我保留它,经过一段空闲时间后,想对其进行任何处理(主要是从数据库中加载行) ,jquery,ajax),什么也没有发生,当我刷新页面时,出现此错误。

在此处输入图片说明

I'm sorry because I couldn't post the log here, it was too big and my browser crashed every time I pasted, and when it worked Stackoverflow has a limit...so I uploaded it and here's the link. 很抱歉,因为我无法在此处发布日志,日志太大了,每次粘贴时浏览器都崩溃了,并且当它工作时Stackoverflow有限制...所以我上传了日志,这是链接。

http://www.crocko.com/99F6AEF8373B425A885BD379686EF2C5/server.log_2012-08-11T05-03-18 http://www.crocko.com/99F6AEF8373B425A885BD379686EF2C5/server.log_2012-08-11T05-03-18

StandardWrapperValve[JoinPart]: PWC1406: Servlet.service() for servlet JoinPart threw exception
java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:454)
    at java.lang.Integer.parseInt(Integer.java:527)
    at JoinPart.doGet(JoinPart.java:315)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:770

EDIT: the current project was a copy of a previous project that contained a servlet JoinPart.java , after creating this copy, I deleted this servlet because I no longer needed it, I don't know if it still exist in some traces of this project, how can I get rid of it? 编辑:当前项目是包含Servlet JoinPart.java的先前项目的副本,创建此副本后,我删除了该servlet,因为不再需要它,我不知道它是否仍存在于此痕迹中项目,我该如何摆脱它? this servlet is already deleted, I checked the javascript files, and none of them contains ajax requests on this servlet, I should have created a whole new project instead of copying, how can I get rid of any traces of this servlet? 此Servlet已被删除,我检查了javascript文件,并且这些文件都不包含对该servlet的ajax请求,我应该创建一个全新的项目而不是进行复制,如何摆脱此servlet的任何痕迹?

Given the symptom and the very little information, I would guess that you are using something from the session. 考虑到症状和很少的信息,我想您正在使用会话中的某些内容。 Leaving it for a time you timeout. 暂时搁置一段时间。 Since you timed out on your next request you get a new session and it isn't setup the way you expect it to be anymore. 由于您在下一个请求上超时,因此您将获得一个新会话,并且它并没有像您期望的那样进行设置。 You reference something in the session and it's null and you aren't checking for that situation. 您在会话中引用了某些内容,并且该内容为空,并且您没有检查这种情况。 The stack trace should tell you where you are referencing that something. 堆栈跟踪应告诉您在何处引用该内容。

Of course, this is just conjecture. 当然,这只是猜测。 When you give more information you will get better answers. 当您提供更多信息时,您将获得更好的答案。

如果您打算从事完全不同的工作,请不要复制项目,请始终创建新项目!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM