Spring error Cannot convert value of type [java.lang.String] to required type - Nomatching editors or conversion strategy found -
Spring error Cannot convert value of type [java.lang.String] to required type - Nomatching editors or conversion strategy found -
any ideas causing error?
i have been reading around , think how have declared object failing (i.e. has declared interface) dont think understanding happening. please provide clear explanation of causes error , how can resolve it.
thanks in advance
2014-06-23 16:43:12,905 [main] error com.abc.author.loader.service.duplicate.myprodduplicateauthorservice - jduplicate - error processing 198587 author. org.springframework.beans.conversionnotsupportedexception: failed convert property value of type 'java.lang.string' required type 'com.abc.author.loader.model.myprodduplicate' property 'myprodduplicate'; nested exception java.lang.illegalstateexception: cannot convert value of type [java.lang.string] required type [com.abc.author.loader.model.myprodduplicate] property 'myprodduplicate': no matching editors or conversion strategy found @ org.springframework.beans.beanwrapperimpl.convertifnecessary(beanwrapperimpl.java:463) @ org.springframework.beans.beanwrapperimpl.convertforproperty(beanwrapperimpl.java:494) @ org.springframework.beans.beanwrapperimpl.setpropertyvalue(beanwrapperimpl.java:1097) @ org.springframework.beans.beanwrapperimpl.setpropertyvalue(beanwrapperimpl.java:882) @ org.springframework.data.jpa.repository.support.jpametamodelentityinformation$directfieldaccessfallbackbeanwrapper.setpropertyvalue(jpametamodelentityinformation.java:290) @ org.springframework.data.jpa.repository.support.jpametamodelentityinformation$identifierderivingdirectfieldaccessfallbackbeanwrapper.setpropertyvalue(jpametamodelentityinformation.java:333) @ org.springframework.data.jpa.repository.support.jpametamodelentityinformation.getid(jpametamodelentityinformation.java:123) @ org.springframework.data.repository.core.support.abstractentityinformation.isnew(abstractentityinformation.java:51) @ org.springframework.data.jpa.repository.support.jpametamodelentityinformation.isnew(jpametamodelentityinformation.java:190) @ org.springframework.data.jpa.repository.support.simplejparepository.save(simplejparepository.java:357) @ sun.reflect.generatedmethodaccessor57.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.executemethodon(repositoryfactorysupport.java:344) @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.invoke(repositoryfactorysupport.java:329) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterceptor.java:96) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspectsupport.java:260) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:94) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.dao.support.persistenceexceptiontranslationinterceptor.invoke(persistenceexceptiontranslationinterceptor.java:155) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.data.jpa.repository.support.lockmoderepositorypostprocessor$lockmodepopulatingmethodintercceptor.invoke(lockmoderepositorypostprocessor.java:92) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.aop.interceptor.exposeinvocationinterceptor.invoke(exposeinvocationinterceptor.java:91) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:204) @ $proxy103.save(unknown source) @ com.abc.author.loader.dao.common.myprodduplicatedao.storeunequivocalmatch(myprodduplicatedao.java:44) @ com.abc.author.loader.service.duplicate.myprodduplicateauthorservice.matchauthor(myprodduplicateauthorservice.java:62) @ com.abc.author.loader.service.duplicate.myprodduplicateauthorservice.matchbatch(myprodduplicateauthorservice.java:43) @ com.abc.author.loader.app.myprodduplicatematchmain.main(myprodduplicatematchmain.java:18) caused by: java.lang.illegalstateexception: cannot convert value of type [java.lang.string] required type [com.abc.author.loader.model.myprodduplicate] property 'myprodduplicate': no matching editors or conversion strategy found @ org.springframework.beans.typeconverterdelegate.convertifnecessary(typeconverterdelegate.java:264) @ org.springframework.beans.beanwrapperimpl.convertifnecessary(beanwrapperimpl.java:448) ... 31
the object complaning (i.e. 'myprodduplicate') part of composite key of jpa entity lots of fields. managed figure out problem composite key because if alter composite key utilize @embedable annotation works fine.
edit@id @manytoone @joincolumn(name="author_id") private myprodduplicate myprodduplicate; @id @column(name = "title") private string title;
the error occurs @ line (using spring info repository save db):
authorrepository.save(listitem);
is there reason above definition stop working , produce above error? spring (spring data) version upgrade cause this?
i using spring version 3.2.3.release , spring info version 1.4.2.release
java spring hibernate spring-data
Comments
Post a Comment