严重: Context initialization failed,TypeNotPresentExcepti解决:struts注释annotation加载错误
系统加载时出现:
严重: Context initialization failed
java.lang.TypeNotPresentException: Type javax.annotation.Resource not present
Caused by: java.lang.ClassNotFoundException: javax.annotation.Resource
该错误有些说annotation需要JDK1.6以上,是缺少javax.annotation.Resource导致的,
实际上JDK1.5就可以了,只需要添加一个包:geronimo-annotation_1.0_spec-1.1.jar.
该bug就解决了.
jar下载地址:http://mirrors.ibiblio.org/pub/mirrors/maven/org.apache.geronimo.specs/jars/geronimo-annotation_1.0_spec-1.1.jar
严重: Context initialization failed
java.lang.TypeNotPresentException: Type javax.annotation.Resource not present
Caused by: java.lang.ClassNotFoundException: javax.annotation.Resource
该错误有些说annotation需要JDK1.6以上,是缺少javax.annotation.Resource导致的,
实际上JDK1.5就可以了,只需要添加一个包:geronimo-annotation_1.0_spec-1.1.jar.
该bug就解决了.
jar下载地址:http://mirrors.ibiblio.org/pub/mirrors/maven/org.apache.geronimo.specs/jars/geronimo-annotation_1.0_spec-1.1.jar