org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'Department' to required type 'java.lang.Long' for property 'department'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [Department] to required type [java.lang.Long] for property 'department': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type [Department]

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Spring JIRA by Romain Fromi, 1 year ago
Failed to convert property value of type 'Department' to required type 'java.lang.Long' for property 'department'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [Department] to required type [java.lang.Long
via Stack Overflow by coryfoo
, 2 years ago
Failed to convert property value of type 'model.UserPK' to required type 'java.lang.Long' for property 'id'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [model.UserPK] to required type [java.lang.Long] for
via redhat.com by Unknown author, 2 years ago
Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'businessInterface'; nested exception is java.lang.IllegalArgumentException: Could not load class [com.aviva.ukhe.address.validation.service.AddressManager]!
via wordpress.com by Unknown author, 1 year ago
Failed to convert property value of type ‘java.lang.String’ to required type ‘java.lang.Class’ for property ‘contextClass’; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext]
via nabble.com by Unknown author, 1 year ago
Failed to convert property value of type ‘java.lang.String’ to required type ‘java.lang.Class’ for property ‘contextClass’; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext]
via GitHub by hi-wayne
, 1 year ago
Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'initialSize'; nested exception is java.lang.NumberFormatException: For input string: "${xmondb.jdbc.initialSize}"
org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'Department' to required type 'java.lang.Long' for property 'department'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [Department] to required type [java.lang.Long] for property 'department': PropertyEditor [org.springframework.beans.propertyeditors.CustomNumberEditor] returned inappropriate value of type [Department]
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:490)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1119)
at org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation$DirectFieldAccessFallbackBeanWrapper.setPropertyValue(JpaMetamodelEntityInformation.java:205)

Users with the same issue

2 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.