Xfire与SSH2项目集成时遇到的困难!!!

城邑耕夫 发布于 2013/03/12 11:12
阅读 811
收藏 0

SSH项目是已经上线的项目了!

Xfire配置文件:

<beans>
	<!-- 引入XFire预配置信息 -->
	<import resource="classpath:org/codehaus/xfire/spring/xfire.xml" />

	<!-- 使用XFire导出器 -->
    <bean id="baseWebService" class="org.codehaus.xfire.spring.remoting.XFireExporter" lazy-init="false" abstract="true">
        <!-- 引用xfire.xml中定义的工厂 -->
        <property name="serviceFactory" ref="xfire.serviceFactory" />
        <!-- 引用xfire.xml中的xfire实例 -->
        <property name="xfire" ref="xfire" />
    </bean>
    
    <bean id="echoService" parent="baseWebService">
        <property name="serviceBean" ref="echoBean" />
        <property name="serviceClass" value="com.thgk.ws.service.Echo" />
    </bean>

	<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="urlMap">
            <map>
                <entry key="/Echo">
                    <ref bean="echoService" />
                </entry>
            </map>
        </property>
    </bean>
</beans>
错误描述
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.codehaus.xfire.spring.remoting.XFireExporter] for bean with name 'echoService' defined in class path resource [xfire/xfire-servlet.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/Controller

添加了spring-webmvc.jar后
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'echoService' defined in class path resource [xfire/xfire-servlet.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: $Proxy126 cannot be cast to org.codehaus.xfire.service.binding.ObjectServiceFactory
请问各位大侠,这个问题怎么处理啊,思路在哪儿,难道是jar还有冲突!
加载中
返回顶部
顶部