java.lang.IllegalArgumentException: Can not set short field org.eclipse.persistence.testing.models.wdf.jpa1.employee.Bicycle.numberOfGears to org.eclipse.persistence.testing.models.wdf.jpa1.employee.Car Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[numberOfGears-->TMP_VEHICLE.NUM_GEARS] Descriptor: RelationalDescriptor(org.eclipse.persistence.testing.models.wdf.jpa1.employee.Bicycle --> [DatabaseTable(TMP_VEHICLE)])

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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Eclipse Bugzilla by adrian.goerler, 1 year ago
Can not set short field org.eclipse.persistence.testing.models.wdf.jpa1.employee.Bicycle.numberOfGears to org.eclipse.persistence.testing.models.wdf.jpa1.employee.Car Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[numberOfGears
via eclipse.org by Unknown author, 1 year ago
Can not set short field org.eclipse.persistence.testing.models.wdf.jpa1.employee.Bicycle.numberOfGears to org.eclipse.persistence.testing.models.wdf.jpa1.employee.Car Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[numberOfGears
via Stack Overflow by Alejandro Gomez Auad
, 7 months ago
Can not set java.lang.Double field ar.asimov.acumar.ema.model.DoubleListValue.doubleValue to ar.asimov.acumar.ema.model.ExtraHumidity Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[doubleValue
via Eclipse Bugzilla by david.minsky, 1 year ago
Can not set org.eclipse.persistence.testing.models.inheritance.Teacher field org.eclipse.persistence.testing.models.inheritance.Apple.teacher to org.eclipse.persistence.testing.models.inheritance.Pear Mapping
via Stack Overflow by user3233001
, 2 years ago
Can not set java.util.List field com.test.dto.impl.Friend.relatives to com.test.dto.impl.Enemy Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[relatives] Descriptor: XMLDescriptor(com.test.dto.impl.Friend --> [])
via Stack Overflow by Sla
, 1 year ago
Can not set java.util.Collection field test2.TestCase2$Payload.collection to test2.TestCase2$RequestMetaInfo Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping[collection] Descriptor: XMLDescriptor(test2.TestCase2$Payload --> [DatabaseTable(collection)])
java.lang.IllegalArgumentException: Can not set short field org.eclipse.persistence.testing.models.wdf.jpa1.employee.Bicycle.numberOfGears to org.eclipse.persistence.testing.models.wdf.jpa1.employee.Car Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[numberOfGears-->TMP_VEHICLE.NUM_GEARS] Descriptor: RelationalDescriptor(org.eclipse.persistence.testing.models.wdf.jpa1.employee.Bicycle --> [DatabaseTable(TMP_VEHICLE)])
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source)
at sun.reflect.UnsafeShortFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.setAttributeValueInObject(InstanceVariableAttributeAccessor.java:141)
at org.eclipse.persistence.exceptions.DescriptorException.illegalArgumentWhileSettingValueThruInstanceVariableAccessor(DescriptorException.java:700)
at org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.setAttributeValueInObject(InstanceVariableAttributeAccessor.java:188)
at org.eclipse.persistence.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1428)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.mergeIntoObject(AbstractDirectMapping.java:1097)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:3444)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:3381)
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:748)
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:623)
at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:267)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent(UnitOfWorkImpl.java:3246)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.mergeChangesIntoParent(RepeatableWriteUnitOfWork.java:368)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:282)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1135)

Users with the same issue

Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 4 weeks ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 1 month ago

Write tip

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