正在回答 回答被采纳积分+1
。。。。。严重: Resource read error: Could not load。。。。。
已经解决,是因为依赖错误,aspectjweaver的版本太高,jstl应该引入javax.servlet的jstl。
其他问题开了新帖。
SpringMVC,Mybatis以及Spring各种功能都可以实现,应该和版本没有关系,中途我以为是Maven的Module的原因,新建了一个测试用项目吧两个Module合并一下依然不好用,而且更改了素材里提供的web.xml里的标签
因为我的Tomcat是7.0.88版本的所以我在我的其他项目里的web.xml把默认提供的标签复制过来,可能是解决了一个错误,不过没有解决根本错误。。。。。。以上。
之前的是启动服务器报的错误,这是加载网页报的错误。。
Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.<clinit>(ReflectiveAspectJAdvisorFactory.java:75)
at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.initBeanFactory(AnnotationAwareAspectJAutoProxyCreator.java:82)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.setBeanFactory(AbstractAdvisorAutoProxyCreator.java:63)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1730)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Around
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1928)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1771)
... 36 more
八月 05, 2018 11:37:06 上午 org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
严重: Resource read error: Could not load org/aspectj/bridge/IMessageHandler.class.
java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal(WebappClassLoaderBase.java:3538)
at org.apache.catalina.loader.WebappClassLoaderBase.findResource(WebappClassLoaderBase.java:1494)
at org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1722)
at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2262)
at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2255)
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2158)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2110)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1971)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1932)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1917)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1322)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5566)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1702)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1692)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
八月 05, 2018 11:37:07 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 05, 2018 11:37:07 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
警告: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [346] milliseconds.
八月 05, 2018 11:37:07 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\docs
八月 05, 2018 11:37:11 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 05, 2018 11:37:11 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\docs has finished in 3,101 ms
八月 05, 2018 11:37:11 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\examples
八月 05, 2018 11:37:13 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 05, 2018 11:37:13 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
八月 05, 2018 11:37:13 上午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
八月 05, 2018 11:37:13 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@1fd5147')
八月 05, 2018 11:37:13 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@14b213a5')
八月 05, 2018 11:37:13 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\examples has finished in 2,817 ms
八月 05, 2018 11:37:13 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\host-manager
八月 05, 2018 11:37:15 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 05, 2018 11:37:15 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\host-manager has finished in 1,945 ms
八月 05, 2018 11:37:15 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\manager
八月 05, 2018 11:37:17 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 05, 2018 11:37:17 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\manager has finished in 1,462 ms
八月 05, 2018 11:37:17 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\ROOT
八月 05, 2018 11:37:18 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
八月 05, 2018 11:37:18 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Tomcat\apache-tomcat-7.0.88\webapps\ROOT has finished in 1,320 ms
八月 05, 2018 11:37:18 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
八月 05, 2018 11:37:18 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
八月 05, 2018 11:37:18 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 17056 ms
八月 05, 2018 11:34:31 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:sm_web' did not find a matching property.
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.88
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: May 7 2018 11:12:57 UTC
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.88.0
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.8.0_171\jre
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_171-b11
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\Tomcat\apache-tomcat-7.0.88
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\Tomcat\apache-tomcat-7.0.88
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\Tomcat\apache-tomcat-7.0.88
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Tomcat\apache-tomcat-7.0.88
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\Tomcat\apache-tomcat-7.0.88\wtpwebapps
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Tomcat\apache-tomcat-7.0.88\endorsed
八月 05, 2018 11:34:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
八月 05, 2018 11:34:31 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_171\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_171/bin/server;C:/Program Files/Java/jre1.8.0_171/bin;C:/Program Files/Java/jre1.8.0_171/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin;D:\Maven\apache-maven-3.5.4\bin;;D:\EclipseJavaEE\eclipse;;.
八月 05, 2018 11:34:32 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
八月 05, 2018 11:34:32 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
八月 05, 2018 11:34:32 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1290 ms
八月 05, 2018 11:34:32 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 05, 2018 11:34:32 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.88
八月 05, 2018 11:34:32 上午 org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
信息: validateJarFile(D:\Tomcat\apache-tomcat-7.0.88\wtpwebapps\sm_web\WEB-INF\lib\javax.servlet-api-4.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
八月 05, 2018 11:34:32 上午 org.apache.catalina.deploy.WebXml setVersion
警告: Unknown version string [3.1]. Default version will be used.
八月 05, 2018 11:34:32 上午 org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
严重: Resource read error: Could not load org/aspectj/weaver/ast/ITestVisitor.class.
java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal(WebappClassLoaderBase.java:3538)
at org.apache.catalina.loader.WebappClassLoaderBase.findResource(WebappClassLoaderBase.java:1494)
at org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1722)
at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2262)
at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2255)
at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2270)
at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2252)
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2158)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2110)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1971)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1932)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1917)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1322)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5566)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1702)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1692)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
你好!建议把控制台的错误提示贴完整。在控制台看看有没有Caused by的内容,这个一般就是引起错误的根本原因。
这个报错也有可能是编译问题,可能没有编译成功,可以在pom.xml文件中加入如下内容:
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
再有,你的JDK看到是8版本,Tomcat是什么版本呢?
祝学习愉快!
还有好多class都不能加载
- 参与学习 人
- 提交作业 205 份
- 解答问题 4317 个
Java中非常实用的SSM整合开发内容,从Spring开始,到MyBaits的进阶内容,再到SpringMVC的应用,最后是SSM整合开发案例,逐步深入,助你成长为一名Java工程师!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星