- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
成功部署 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.UserdetailsServiceImpl
的实例。该属性的类型为 com.bt.custc.profileaccountservice.service.ProfileAccountService
,并且 UserdetailsServiceImpl
不是 ProfileAccountService
的实现。
关于java - weblogic springframework TypeMismatchException 转换失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8545604/
以下是我的 Person 类: package com.subir.sample; import java.io.Serializable; import java.util.Set; import
我尝试使用 spring mvc 和 hibernate 开发一些服务器程序。在我的 table 上,有些 table 有两个主射线键。所以,我想使用这些键。 简单地说,我使用双 @Id 注释。 在结
成功部署 Web 项目后,当我尝试从浏览器访问 Web 应用程序时收到以下错误。 2011-12-17 17:37:52.887 AdminServer [-] ERROR Context ini
好吧,经过几天的努力,我仍然无法完成这项工作。 这就是问题所在:我有一个 JSP,它托管一个 Google 图表,该图表将根据通过 Servlet 发送的数据构建。我正在使用 Google Visua
在 Hibernate 中开发我的第一个应用程序时。尝试从数据库中检索用户对象时出现以下异常: org.hibernate.TypeMismatchException: Provided id of
我是 Quartz 的新手,我刚刚开始一个已经使用 Quartz 调度程序的项目。该项目正在编译,但在运行时抛出以下异常: BeanCreationException: Error creating
我的 application-context.xml 中有以下简单表达式: Instrument 类是一个简单的 POJO。但是,它抛出以下错误: [ERROR] ...nested excep
我第一次使用 MyEclipse For Spring,它支持 hibernate 。 下面是mysql数据库的相关部分: CREATE TABLE `delidete`.`DatiGeneraliV
在spring mvc中,我想用hibernate将数据保存到mysql数据库中,并且还想通过电子邮件获取数据。在我的数据库中,我有表 users 表,其中包含以下字段:-(id(bigint),na
在我的 Spring Batch 应用程序中,我读取数据库表并将其映射到 dto。我的 dto 有一些 boolean 类型的字段。 我的 Dto 和 dao 方法如下所示: public class
我试图通过使用关键字查询(以“类(class)代码”的形式绑定(bind))从数据库表“问题”中获取一些搜索结果。目标是从具有外键“Course_coursecode”(字符串值)的列中获取表中的结果
我有以下域模型类: class UserSettings { static mapping = { id name: 'pid', generator: 'assigned' }
当两个类中的复合主键相同时,我无法成功使用 @OneToOne: @Entity public class One implements Serializable { private stat
我使用以下查询来获取客户端。客户端有一个 long 类型的公共(public) ID。 var client = Session.CreateQuery("from Client as c where
在 applicationContext.xml 中我有一个 bean ems: 现在在 applicationContext-aceg
我已经从 struts 2.0 升级到 2.3.16.1,以便为我的 web 应用程序获取 struts 中的最新安全修复 当我升级部署在 tomcat 服务器时,出现以下错误: Caused by:
我不知道为什么在我启动我的应用程序时 spring 会给我这个错误。我已经在包中定义了java类,并通过bean注入(inject)在xml文件中调用它。 这是bean注入(inject)
我想用@Value注解注入(inject)一个Double属性如: @Service public class MyService { @Value("${item.priceFactor}"
我是一名优秀的程序员,十分优秀!