日期:2014-05-20  浏览次数:20783 次

XFire启动出现时出现异常
- Marking servlet XFireServlet as unavailable
- Error loading WebappClassLoader
  delegate: false
  repositories:
  /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@763f5d
 org.codehaus.xfire.transport.http.XFireConfigurableServlet
java.lang.ClassNotFoundException: org.codehaus.xfire.transport.http.XFireConfigurableServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
- Servlet /ehomeService threw load() exception

异常提示的意思是
java.lang.ClassNotFoundException: org.codehaus.xfire.transport.http.XFireConfigurableServlet
没有加载XFire相关jar包 ,但是我已经在classpath中加了,依然报这错:
.classpath中
也已经引入了:

<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.ws.xfire.MYECLIPSE_XFIRE_CORE"/>
XML code

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.5.0_12"/>
    <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
    <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.ws.xfire.MYECLIPSE_XFIRE_CORE"/>
    <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/homeServicelib"/>
    <classpathentry kind="lib" path="ehomeServices/WEB-INF/lib/struts-core-1.3.8.jar"/>
    <classpathentry kind="output" path="ehomeServices/WEB-INF/classes"/>
</classpath>


这究竟是何原因?请各位高手相助。

------解决方案--------------------
放到WEB-INF/lib下试试。
------解决方案--------------------
java.lang.ClassNotFoundException

路径不对?
或者是jar包冲突?
------解决方案--------------------
应该是路径问题来的,同意一楼的说法。
------解决方案--------------------
赞成一楼的做法,先试试
------解决方案--------------------