Eclipse Tomcat jsp class files not sporadically found

I recently started getting the following SEVERE: Servlet.service () for jsp servlet java.lang.ClassNotFoundException: org.apache.jsp.login_jsp exception

This happens spontaneously. Everything was fine before the holidays. But now I began to experience an exception.

I believe this applies to restarting and publishing server settings. [Start, restart synchronized] ... etc ... Based on whether I save a jsp or java file, Eclipse sometimes deletes things in this folder: .metadata\.plugins\org.eclipse.wst.server.core\tmp1\work\Catalina\localhost

When I remove the update in the browser, I will see that a specific _jsp.class file appears. But sometimes I get an exception and notice that jsp_class is missing, usually WEB-INF / view files.

I do not think that this is due to the fact that it was not possible to multiply jsp, because there are no errors - my jsps does not contain any <%%> only JSTL / EL

EDIT: I followed BalusC's suggestion to delete the project (uncheck the permission to delete files, etc.) and import. I did this for both the original and the β€œcopied” project, but now I have imported only the original project. It seems that he is behaving, but it is too early to talk about it, since it was an intermediate error.

I got it several times after editing and saving the .java file, but I can’t repeat it after a dozen attempts:

 Jan 6, 2011 6:54:53 PM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started Jan 6, 2011 6:54:53 PM org.apache.catalina.session.StandardManager doUnload SEVERE: IOException while saving persisted sessions: java.io.FileNotFoundException: C:\jrozycki\MyDocuments\Development\Eclipse\STK\.metadata\.plugins\org.eclipse.wst.server.core\tmp1 \work\Catalina\localhost\_\SESSIONS.ser (The system cannot find the path specified) java.io.FileNotFoundException: C:\jrozycki\MyDocuments\Development\Eclipse\STK\.metadata\.plugins\org.eclipse.wst.server.core\tmp1 \work\Catalina\localhost\_\SESSIONS.ser (The system cannot find the path specified) 
+4
source share
2 answers

Well, this is a glitch in the matrix. Eclipse is quite complicated. It also happens to me and all my colleagues and someone else.

The best you can try is to click on the appropriate server instance in Eclipse and select "Clear." If this does not help, just restart the server. If this does not even help, close / open the project, clean the server and restart it.


Update according to comment:

I tried everything so as not to start with a new job. It started right after I copied the nested project in the project viewer, which I wanted to use to start a new project. Is it bad to do?

Including the .metadata folder, etc.? I think this is really a criminal. It can strongly conflict if it is created by another version / environment of Eclipse. Delete the project, and then choose File> Import> General> Existing Projects In The Workspace, and then specify the root of the project.

0
source

Just in case someone is still reading this, the problem just hit me the first time. The only thing that seems to work for me in Eclipse 4.5 is to right-click on the server in the Servers tab, then Add and Remove ..., delete the affected project (clear the generated _jsp.class files in the workspace ) and add it back.

0
source

Source: https://habr.com/ru/post/1334594/


All Articles