Something had changed but you don't know. Then you need to follow WYSIWYG pattern. The error happens when the application starts. The problem is in the struts-plugin.xml
which is inside the struts2-jquery-grid plugin. The exceptipn org.xml.sax.SAXParseException
tells you that this file cannot be parsed because it either not valid or has a wrong DTD. Then it worth to start reading about plugins.
Struts 2 plugins contain classes and configuration that extend, replace, or add to existing Struts framework functionality. A plugin can be installed by adding its JAR file to the application’s class path, in addition to the JAR files to fulfill whatever dependencies the plugin itself may have. To configure the plugin, the JAR should contain a struts-plugin.xml
file, which follows the same format as an ordinary struts.xml
file.
When Struts2 application starts it's looking for configuration files such as struts.xml
, struts-default.xml
, struts-plugin.xml
.
The framework loads its default configuration first, then any plugin configuration files found in others JARs on the classpath, and finally the bootstrap struts.xml
.
struts-default.xml
(bundled in the Core JAR)
struts-plugin.xml
(as many as can be found in other JARs)
struts.xml
(provided by your application)
Since the struts.xml
file is always loaded last, it can make use of any resources provided by the plugins bundled with the distribution, or any other plugins available to an application.
The configuration file struts-plugin.xml
which should be located on classpath had parsed by the SAX parser to validate against document DTD supplied with the document. It has thrown an exception while parsing the document. It means that the document is invalid because it has wrong structure.
The line number and column number indicate where the invalid structure had started.
First time you make sure the referenced file exists and it's accessible by the URL.
You can try to replace wrong configuration file or it's DTD and make sure only one configuration file with the same name exists per project.
You should keep this file along source file for making modifications. When you package the project the file should copy to the WEB-INF/classes
in the war
archive. Make sure the file is the same as on the source folder.
Make the project clean before the build to remove files used by the previous build.
If something has changed on the server, i.e. Java brand/version installation. Then you need to upgrade it manually.