Home  >  Article  >  Java  >  What should I do if there is an error when tomcat loads the war package?

What should I do if there is an error when tomcat loads the war package?

怪我咯
怪我咯Original
2017-06-25 10:13:002143browse

Try to use springmvc, mybatis, mysql as a tool platform.

It runs normally on the local mac laptop, but when I place the package on the server and start tomcat, an error is reported. Class not found.

File Directory:

Implementation requirements: Upload documents and record them in the database. Created the DocFile class by itself. Create the corresponding mapper file and write the sql statement.

The namespace in mapper.xml points to DocFileDao.

update t_docfile set valiable='N' where docFileId=#{docFileId}

But after starting, it inexplicably reported that the DocFile class could not be found. And there is an exclamation mark after the war package in the prompted path.

Later I found out that I was careless in the class reference of the mapper file. I did not add

to the complete package path and changed it to

It will be normal if you package and upload it and restart it. The reason why the local environment does not report an error is that some configurations within the environment are messed up and do not appear.

The above is the detailed content of What should I do if there is an error when tomcat loads the war package?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn