JeeSite项目部署遇到的问题(NoClassDefFoundError;jstl/core、tags/form、sitemesh/decorator cannot be resolved)

来源:互联网 发布:手机淘宝怎么清除缓存 编辑:程序博客网 时间:2024/06/05 18:30

1.java.lang.NoClassDefFoundError: Lorg/slf4j/Logger;

网上查了很多文档,有好几种解决办法,我的是maven没有加载,但是pom.xml里确实添加了,应该是Maven出了问题,然后我自己手动添加到依赖里,下面是其他人的说法及解决办法

1.没有依赖slf4j-log4j12.jar

在pom.xml加入这个包

2.slf4j-log4j12.jar和slf4j-api.jar冲突

在pom.xml中slf4j-api.jar下面添加<scope>provided<scope>,也有人说直接干掉slf4j-api.jar


2.The absolute uri: http://java.sun.com/jstl/core cannot be resolvedin either web.xml or the jar files deployed with this application

jstl包放到lib下,并build path(或者放到tomcatlib下)


3.The absolute uri: http://www.springframework.org/tags/form cannot be resolved in either web.xml or the jar files deployed with this application

这个问题我找了很久,网上没什么解决办法,有几个遇到一样的问题的,讲了一大堆,最后结尾来了一句至今仍未解决,更可怕的是这个问题是两年前,什么鬼?那你说了那么多干嘛!难道这段时间没人遇到这种问题也没有解决办法吗?也有人指出是spring-web-xxx.RELEASE.jar里面没有/META-INF/spring-form.tld,导致他的不兼容,然后换成高的版本就好了,我用的是4.1.9版本的,然后我就去找,哪有这种东西啊,换成别的版本也没有这个文件啊,我 就想会不会是因为maven的问题,没有引入到这个包相关包,然后我把maven仓库里的spring包放到自己建lib目录下build path,然后启动就不报这个错了。


4.http://www.opensymphony.com/sitemesh/decorator cannot be resolved in either

sitemesh.jar放到lib

5.按照官方文档来部署,会在tomcat启动时候报一系列数据库错误,可以忽略,关闭在重新start Tomcat,第三次的时候就不报错了,我的是这样

如果出现一系列NoClassDefFoundErrorClassNotFoundException说明maven出现了问题,可以通过右击项目→propertiesDeployment Assembly→(如果有mavenremove掉,添加其他相关包,如果没有maven,添加maven

阅读全文
0 0
原创粉丝点击