• java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet


    1、错误描述

    严重: Servlet /FlashProject threw load() exception
    java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)
    	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1148)
    	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
    	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.StandardContext.reload(StandardContext.java:4009)
    	at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1479)
    	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1462)
    	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1646)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
    	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.ContainerBase.backgroundProcess(ContainerBase.java:1374)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)
    	at java.lang.Thread.run(Thread.java:745)

    2、错误原因

         在web.xml中添加了一段:

    <servlet>
    		<servlet-name>CXFServlet</servlet-name>
    		<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    	<servlet-mapping>
    		<servlet-name>CXFServlet</servlet-name>
    		<url-pattern>/services/*</url-pattern>
    	</servlet-mapping>
        但是没有导入有关cxf的jar,导致报错


    3、解决办法

         将cxf-2.6.0.jar拷贝到Java Web项目中的web/lib目录下,重新启动下Tomcat 

  • 相关阅读:
    服务器的计时器的Interval最大能设置为多大?
    IE页面嵌入复杂WinForm控件不能正常激活
    自动升级组件居然把我那提供升级的站点目录整个删除了!
    自动升级失败,缺少System.resources.dll?
    字频分析结果出来了
    原来是2003 Server的问题
    一直这么渴望执着不一定能成功,只是活着就是执着
    模拟生态系统自己编写"生命"
    微软的Soap样例是错误的!
    对哈希表进行排序
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13314393.html
Copyright © 2020-2023  润新知