简体   繁体   中英

SEVERE: Error filterStart , when try to deploy WAR file in Eclipse to Tomcat server

I created java dynamic web application in tomcat server 7. it works fine when I run it from eclipse.

I deployed it by right click on the project and export by following export dialog to the webapp directory of tomcat installation and start the tomcat server so that I can access

http://localhost:8080 

but when I try to access

http://localhost:8080/projectName. 

I got below error.

The requested resource (/projectName/) is not available.

I look into catalina.log file. and found these lines

SEVERE: Error filterStart
SEVERE: Context [/projectName] startup failed due to previous errors
SEVERE: The web application [/projectName] appears to have started a thread named 
[Abandoned connection cleanup thread] but has failed to stop it. This is very
likely to create a memory leak.

further my application is used struts2 . I add struts2 jars to the WEB-INF/lib directory. why I can't access my application from war file?

I think eclipse is not recognizing your project as a web app, To confirm this

Open to do open Java EE perspective on your Eclipse. If you open the project folder of your app, You should see (Deployment Descriptor)

在此处输入图片说明

If you don't see it, your app is not web app as far as Eclipse is concerned, I have see this in case if you imported/created a maven command line project

To fix this, select Project ==> Properties ==> Project Facets ==> make sure Dynamic Web Module check box is checked

在此处输入图片说明

If you do that the local tomcat server will add your app when do add remove projects.

ok I figured it out my self. I searched the google for

SEVERE: Error filterStart

and found, check the localhost_yyyy_mm_dd.log file for more information about error.

In that file there was an error called java.lang.UnsupportedClassVersionError . The reason for that was my jdk and jre versions are different.

So I changed jdk and jre versions as same level from project properties. after that I built the project and exported the project to webApp again. I restart the tomcat server again. All errors are gone.

reference : Tomcat startup logs - SEVERE: Error filterStart how to get a stack trace?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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