weixin_42298208 2008-11-12 21:11
浏览 124
已采纳

整合CXF+Spring+Hibernate的问题

第一次整合,配置应该都好了,因为测试了一个简单的值注入的helloworld 的webservice,现在在试图注入dao的时候总抛出异常。。。用的cxf2.1.3+spring 2.5.5+hibernate 3.2
[code="java"]

jaxws:implementor

/jaxws:implementor

/jaxws:endpoint

[/code]

[code="java"] 1. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException [/code]

google了n小时。。。也没解决。。。不知道哪位朋友有过类似经验的。。。
[b]问题补充:[/b]
第一次整合,配置应该都好了,因为测试了一个简单的值注入的helloworld 的webservice,现在在试图注入dao的时候总抛出异常。。。用的cxf2.1.3+spring 2.5.5+hibernate 3.2

# <bean id="UserServiceImpl" class="com.ramon.hiking.webservice.UserService">  
#        <property name="um">  
#            <ref bean="UserManager"/>  
#        </property>  
#    </bean>  
#    <jaxws:endpoint id="UserService" address="/UserService">  
#        <jaxws:implementor>  
#            <ref bean="UserServiceImpl"/>  
#        </jaxws:implementor>  
#    </jaxws:endpoint> 
   1. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException  

google了n小时。。。也没解决。。。不知道哪位朋友有过类似经验的。。。

楼下的同学,现在是异常啊。。。感觉不是配置问题呢
[b]问题补充:[/b]
楼下的同学,现在是异常啊。。。感觉不是配置问题呢

  • 写回答

4条回答 默认 最新

  • iteye_521 2008-11-13 08:14
    关注

    [quote]
    楼下的同学,现在是异常啊。。。感觉不是配置问题呢
    [/quote]
    spring配置文件中添加这个了吗?
    [code="java"]



    [/code]

    另外,接口需要这样:
    [code="java"]
    @WebService
    public interface VoteService {
    [/code]

    实现类需要这样:
    [code="java"]
    @WebService
    public class VoteServiceImpl implements VoteService {
    [/code]
    实在不行可以站内短信PM我,我把我前几天搞的示例工程给你一个

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?