gpt4 book ai didi

java - weblogic springframework TypeMismatchException 转换失败

转载 作者:行者123 更新时间:2023-12-02 08:03:27 25 4
gpt4 key购买 nike

成功部署 Web 项目后,当我尝试从浏览器访问 Web 应用程序时收到以下错误。

2011-12-17 17:37:52.887  AdminServer <consumerFaultTracking> [-] ERROR Context initialization failed : org.springframework.web.struts.ContextLoaderPlugIn-(228) 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.bt.custc.faulttracking.dao.FaultTrackingProfileAccountDAOImpl#e71be2' defined in ServletContext resource [/WEB-INF/action-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.bt.custc.userdetails.service.UserdetailsServiceImpl] to required type [com.bt.custc.profileaccountservice.service.ProfileAccountService] for property 'profileAccountService']
PropertyAccessExceptionsException (1 errors)
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.bt.custc.userdetails.service.UserdetailsServiceImpl] to required type [com.bt.custc.profileaccountservice.service.ProfileAccountService] for property 'profileAccountService'
at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1103)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:848)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:733)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:890)
at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:917)

action-servlet.xml内容:

<property name="accountService">
<bean class="com.bt.custc.faulttracking.service.FaultTrackingProfileAccountServiceImpl">
<property name="profileAccountDAO">
<bean class="com.bt.custc.faulttracking.dao.FaultTrackingProfileAccountDAOImpl">
<property name="profileAccountService">
<ref bean="profileAccountServiceImplRefBean" />
</property>
</bean>
</property>
</bean>
</property>

如果有人之前遇到过同样的问题,请告诉我解决方案。我认为我不允许更改代码,因为这应该适用于其他团队成员。

从 weblogic 配置的角度来看,我可能缺少什么东西,或者可能是重复的 jar 等...请告诉我是否有任何可能导致此错误的可能性?

最佳答案

此异常中没有任何与 WebLogic 相关的内容。在您的 /WEB-INF/action-servlet.xml 文件中,您尝试设置 com.bt.custc 类型的 bean 的属性 profileAccountService .faulttracking.dao.FaultTrackingProfileAccountDAOImplcom.bt.custc.userdetails.service.UserdetailsS​​erviceImpl 的实例。该属性的类型为 com.bt.custc.profileaccountservice.service.ProfileAccountService,并且 UserdetailsS​​erviceImpl 不是 ProfileAccountService 的实现。

关于java - weblogic springframework TypeMismatchException 转换失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8545604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com