我在部署web项目时,报以下错。有没高手帮忙解决啊。
粗的解决办法是,将jdk目录下的tools.jar拷贝到tomcat的lib下,或者项目工程的lib下。 可是这个tools.jar不是应该默认加载jdk时就会加载的到吗
10:53:25.913 [main] ERROR o.s.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlerMapping' defined in ServletContext resource [/WEB-INF/spring-mvc.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/sun/tools/internal/ws/processor/model/Model
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:212) [servlet-api.jar:2.5.MR2]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734) [catalina.jar:6.0.33]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) [catalina.jar:6.0.33]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) [catalina.jar:6.0.33]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) [catalina.jar:6.0.33]
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) [catalina.jar:6.0.33]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) [catalina.jar:6.0.33]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) [catalina.jar:6.0.33]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) [catalina.jar:6.0.33]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) [catalina.jar:6.0.33]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) [catalina.jar:6.0.33]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardService.start(StandardService.java:525) [catalina.jar:6.0.33]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) [catalina.jar:6.0.33]
at org.apache.catalina.startup.Catalina.start(Catalina.java:595) [catalina.jar:6.0.33]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_26]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_26]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_26]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.33]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.33]
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/internal/ws/processor/model/Model
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.6.0_26]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) ~[na:1.6.0_26]
at java.lang.Class.getDeclaredMethods(Class.java:1791) ~[na:1.6.0_26]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474) ~[spring-core-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.method.HandlerMethodSelector.selectMethods(HandlerMethodSelector.java:57) ~[spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:133) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:108) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:88) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:126) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509) ~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
... 42 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.tools.internal.ws.processor.model.Model
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) ~[catalina.jar:6.0.33]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) ~[catalina.jar:6.0.33]
... 53 common frames omitted
分享到:
相关推荐
### Tomcat部署项目时报错解决方案 在部署Java Web应用程序到Apache Tomcat服务器的过程中,经常会遇到各种各样的问题,其中一种常见的错误就是启动时出现“严重:Exception starting filters struts2”这样的异常...
在开发Vue.js应用程序时,通常会使用Webpack进行模块打包,以便于部署到各种服务器环境,如Apache、Nginx或Tomcat。然而,在部署到Tomcat时,由于Vue.js使用了HTML5 History模式,可能会遇到刷新页面时出现404错误的...
7. 集成到Java Web应用: WebSocket服务通常运行在Servlet容器(如Tomcat)中,需要在Web应用的配置文件web.xml中添加WebSocket的监听器和servlet: ```xml <listener-class>javax.websocket.server....
安装Jenkins相对比较简单,因为它可以被部署为WAR文件到Servlet容器中,例如Tomcat。Jenkins的安装包括以下几个关键步骤: 1. 下载Jenkins WAR文件; 2. 将WAR文件部署到Servlet容器中(如Tomcat); 3. 访问Jenkins...
要解决这个问题,只需将缺失的库文件添加到项目的`WEB-INF/lib`目录中即可。 #### 3. Console 错误:Could not create JarEntryRevision **问题描述**: ``` java.lang.NoClassDefFoundError: org/apache/commons/...
- 如果服务器启动时报错且没有项目存在,可能是服务器本身的配置问题,如配置文件损坏。 - 如果服务器有项目存在,则需检查项目的配置文件`web.xml`是否存在错误。 - **解决方案:** - 重新安装或配置Tomcat...
Standard.jar是Tomcat服务器的一部分,它实现了Servlet和JSP规范,使得Web应用可以在服务器上运行。在SSM框架中,Servlet负责接收HTTP请求并调用对应的控制器方法,进行业务逻辑处理。 3. `spring-form.tld`: 这是...
其中,将SpringBoot应用打包成WAR(Web Application Archive)文件用于部署到Web服务器上是一种常见的需求。然而,在这个过程中可能会遇到一些问题。本文主要探讨了在使用SpringBoot打包WAR时遇到...