解决方案 »

  1.   

    你的错误只是运行时的错误,应该在应用启动的时候,还有其他错误,导致了无法运行。最大的问题可能性是,xfire用的是旧的apache的xml解析包。会和新版的冲突。
      

  2.   


    2015-1-15 10:05:28 org.apache.catalina.core.AprLifecycleListener init
    信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files (x86)\jdk1.5.0_13\bin;C:\Users\laihui\AppData\Local\Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_8.6.0.me201007231647\tomcat\bin
    2015-1-15 10:05:28 org.apache.coyote.http11.Http11Protocol init
    信息: Initializing Coyote HTTP/1.1 on http-8080
    2015-1-15 10:05:28 org.apache.catalina.startup.Catalina load
    信息: Initialization processed in 329 ms
    2015-1-15 10:05:28 org.apache.catalina.core.StandardService start
    信息: Starting service Catalina
    2015-1-15 10:05:28 org.apache.catalina.core.StandardEngine start
    信息: Starting Servlet Engine: Apache Tomcat/6.0.13
    log4j:ERROR Could not find value for key log4j.appender.INFO
    log4j:ERROR Could not instantiate appender named "INFO".
    2015-1-15 10:05:29 org.apache.catalina.core.ApplicationContext log
    信息: Loading Spring root WebApplicationContext
    2015-1-15 10:05:38 org.apache.coyote.http11.Http11Protocol start
    信息: Starting Coyote HTTP/1.1 on http-8080
    2015-1-15 10:05:38 org.apache.jk.common.ChannelSocket init
    信息: JK: ajp13 listening on /0.0.0.0:8009
    2015-1-15 10:05:38 org.apache.jk.server.JkMain start
    信息: Jk running ID=0 time=0/24  config=null
    2015-1-15 10:05:38 org.apache.catalina.startup.Catalina start
    信息: Server startup in 10211 ms启动没有错误啊 日志里面也没有其它错误!
      

  3.   

    我也觉得应该是包的版本冲突了,要不升级下xfire包试试或者换一种调用webService方式也行
      

  4.   

    xfire已经是最高的1.2.6了
    升级下原有的项目 不想这么麻烦
      

  5.   

    换个webservice调用方式应该不难啊,生成下wsdl客户端也很快
      

  6.   

    新建一个xfire webServices 一样启动不了
    IWAB0379E Unable to open http://laihui-pc:8080/laihui/service/test.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: http://laihui-pc:8080/laihui/service/test 
      

  7.   

    新建一个 xfire webServices 项目 然后将项目中包全部复制过去 可以启动 这样应该可以证明不是包冲突问题吧
      

  8.   

    xfire实在太老了,我用它碰到的错误几乎全是包冲突。你把全部包copy过去不冲突不代表什么,发生包冲突的话,肯定是只能发布一个包。你copy后可能发生了classload时使用的是旧包。
    另外,如果可能的话,还是建议换cxf了,是xfire合并后推出的。
      

  9.   

    找到问题了  
    web.xml 的Struts2的配置问题 ,改成       <filter-name>Struts2</filter-name>
    <filter-class>
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
    </filter-class>就webservice 启动成功了,但是页面就访问不到了 报404错误
    2015-01-23 09:45:33,619 org.springframework.core.CollectionFactory.createLinkedMapIfPossible.116 [DEBUG]: Creating [java.util.LinkedHashMap]
    2015-01-23 09:45:33,619 org.springframework.web.context.request.RequestContextListener.requestInitialized.60 [DEBUG]: Bound request context to thread: org.apache.catalina.connector.RequestFacade@18faa02
    2015-01-23 09:45:33,619 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory.214 [DEBUG]: Using SessionFactory 'sessionFactory' for OpenSessionInViewFilter
    2015-01-23 09:45:33,619 org.springframework.beans.factory.support.AbstractBeanFactory.getBean.202 [DEBUG]: Returning cached instance of singleton bean 'sessionFactory'
    2015-01-23 09:45:33,619 org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance.1170 [DEBUG]: Bean with name 'sessionFactory' is a factory bean
    2015-01-23 09:45:33,619 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal.156 [DEBUG]: Opening single Hibernate Session in OpenSessionInViewFilter
    2015-01-23 09:45:33,619 org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession.333 [DEBUG]: Opening Hibernate Session
    2015-01-23 09:45:33,619 org.hibernate.impl.SessionImpl.<init>.220 [DEBUG]: opened session at timestamp: 14219775336
    2015-01-23 09:45:33,619 org.hibernate.impl.SessionImpl.setFlushMode.1289 [DEBUG]: setting flush mode to: NEVER
    2015-01-23 09:45:33,619 org.springframework.transaction.support.TransactionSynchronizationManager.bindResource.166 [DEBUG]: Bound value [org.springframework.orm.hibernate3.SessionHolder@e26d2e] for key [org.hibernate.impl.SessionFactoryImpl@1469a69] to thread [http-8080-2]
    2015-01-23 09:45:33,619 org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource.190 [DEBUG]: Removed value [org.springframework.orm.hibernate3.SessionHolder@e26d2e] for key [org.hibernate.impl.SessionFactoryImpl@1469a69] from thread [http-8080-2]
    2015-01-23 09:45:33,619 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal.182 [DEBUG]: Closing single Hibernate Session in OpenSessionInViewFilter
    2015-01-23 09:45:33,619 org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession.781 [DEBUG]: Closing Hibernate Session
    2015-01-23 09:45:33,619 org.hibernate.impl.SessionImpl.close.273 [DEBUG]: closing session
    2015-01-23 09:45:33,619 org.hibernate.jdbc.ConnectionManager.cleanup.373 [DEBUG]: connection already null in cleanup : no action
    2015-01-23 09:45:33,619 org.springframework.web.context.request.RequestContextListener.requestDestroyed.71 [DEBUG]: Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@18faa02
      

  10.   

    web.xml 配置中 OpenSessionInViewFilter 是放到Struts2 的前面