Summary of Struts2 Error filterStart exceptions

Source: Internet
Author: User

Today, a netizen asked polaris to help solve some jqGrid problems. When polaris deploys and runs its project, it throws a Struts2 Error filterStart exception, that is, tomcat cannot be started at all.

Since polaris encountered this problem when he was a beginner at Struts2, he also encountered this problem many times. Today he encountered this problem again, and the problem still exists according to the previous solution. Of course, the problem is finally solved. I believe many people have encountered this problem, and the various situations may be different. Therefore, polaris will summarize the problem here for future reference, you can also give a reference to the problem.

1. Detailed stack information of an Error filterStart exception

2010-9-26 20:28:25 org. apache. catalina. core. StandardContext filterStart
Severe: Exception starting filter struts2
Java. lang. NullPointerException
At com. opensymphony. xwork2.util. FileManager $ FileRevision. needsReloading (FileManager. java: 209)
At com. opensymphony. xwork2.util. FileManager. fileNeedsReloading (FileManager. java: 60)
At com. opensymphony. xwork2.config. providers. XmlConfigurationProvider. needsReload (XmlConfigurationProvider. java: 325)
......
At org. apache. catalina. startup. Bootstrap. start (Bootstrap. java: 289)
At org. apache. catalina. startup. Bootstrap. main (Bootstrap. java: 414)
20:28:25 org. apache. catalina. core. StandardContext start
Severe: Error filterStart
20:28:25 org. apache. catalina. core. StandardContext start
Severe: Context [/jqgridTest] startup failed due to previous errors
20:28:25 org. apache. catalina. loader. WebappClassLoader clearthur readlocalmap
Severe: A web application created a ThreadLocal with key of type [null] (value [com. opensymphony. xwork2.inject. containerImpl $10 @ 1f7e273]) and a value of type [java. lang. object [] (value [[Ljava. lang. object; @ 1342572]) but failed to remove it when the web application was stopped. to prevent a memory leak, the ThreadLocal has been forcibly removed.
20:28:25 org. apache. catalina. loader. WebappClassLoader clearthur readlocalmap
Severe: A web application created a ThreadLocal with key of type [null] (value [com. opensymphony. xwork2.inject. containerImpl $10 @ 869e8f]) and a value of type [java. lang. object [] (value [[Ljava. lang. object; @ 13 ccea]) but failed to remove it when the web application was stopped. to prevent a memory leak, the ThreadLocal has been forcibly removed.
20:28:25 org. apache. catalina. loader. WebappClassLoader clearthur readlocalmap
Severe: A web application created a ThreadLocal with key of type [null] (value [com. sun. faces. config. configureListener $1 @ 1f23ca4]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. to prevent a memory leak, the ThreadLocal has been forcibly removed.

Polaris Note: there is an omission in the middle. Exceptions may be different, but this is probably the case.

2. Solution summary 2.1 solution 1

This problem is easily encountered when you are a beginner at Struts2. At this time, first check whether the imported JAR package is correct. Generally, it is a small JAR package. I remember that when I was learning Struts2, polaris encountered the problem of importing JAR packages, see the article "Solving Error filterStart in Struts2" written by polaris in Baidu space when I first learned struts2.

2.2 solution 2

After entering the company, I encountered a similar problem. In fact, this problem may have nothing to do with Struts2, but I 'd like to mention it here. The general problem is: a program compilation problem occurs, or an error is reported when Tomcat is started after the program is deployed to Tomcat through Eclipse. At that time, I felt very strange because everything was normal on my colleagues' computers. It was discovered later that this was originally caused by SVN: because each person's classpath path is different, there is a file in Eclipse. classpath). This problem occurs when the project is uploaded to SVN for the first time without being uploaded.) When other people download the project from SVN, the classpath is different from the one on your own machine. As a result, if you cannot find the jar package, compilation problems or deployment problems will naturally occur. The solution is to re-import all JAR packages.
650) this. width = 650; "onclick = 'window. open (" http://blog.51cto.com/viewpic.php? Refimg = "+ this. src) 'style = "border-width: 0px;" alt = "Struts2 | Polaris guides you" mce_src = "http://www.beijixing001.com/wp-content/uploads/2010/09/struts2_error.png" src = "http://www.beijixing001.com/wp-content/uploads/2010/09/struts2_error.png"/>
Delete all these jar packages, and then click add jars to import all the jar packages in the lib directory of the current project. Remember that you may need to reset JDK, because JDK names may vary, such as jdk1.6 and jdk1.6.0.3, which may cause compilation errors.

2.3 solution 3

Another question to come up with is whether there is a problem with the configuration file. The first is the web. xml file. Make sure that the Struts2 filter configuration is correct, and then the struts. xml configuration file.

The problem that polaris encountered today is caused by struts. xml. The netizen has no problem during deployment. He enabled the devMode mode in the configuration file. Then, I disabled it and found the problem was resolved. However, although the problem has been solved, there is a question: why is there no problem on the machine of netizens? At this time, I thought of the "space" problem: Tomcat of polaris is installed in the Program Files directory. Confirm with the netizen that there is no space in the Tomcat installation directory.

The following comes from the Network: devMode is the Development Mode. If it is enabled, i18n. reload and configuration. xml. reload are enabled by default. This error is caused by configuration. xml. if reload is set to true, the cause and solution are not described on the Internet. Some people say this is a BUG in version 2.16. The tomcat installation path contains spaces, you can use a more advanced version or install Tomcat to a path without spaces to avoid this error.

3. Description

The above is a summary of the Struts2 Error filterStart exception. If you encounter this problem and the above method cannot be solved, you can leave a message or contact polaris, or leave a message if you have other solutions to this problem. Thank you.

The first draft of this article was completed

This article is from the "Xu Xinhua polaris" blog, please be sure to keep this source http://polaris.blog.51cto.com/1146394/397770

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.