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)])

Eclipse Bugzilla | adrian.goerler | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Bug 336731 – Persisting an object that has the same id as a previously existing object in the same inheritance hierarchy causes caching issues

    eclipse.org | 11 months ago
    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)])
  2. 0

    Persisting an object that has the same id as a previously existing object in the same inheritance hierarchy causes caching issues

    Eclipse Bugzilla | 6 years ago | adrian.goerler
    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)])
  3. 0

    How to tell which field failed Gson serialization

    Stack Overflow | 3 years ago | styler1972
    java.lang.IllegalArgumentException: invalid value for field
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to inject EntityManager in CDI (weld)?

    Stack Overflow | 2 years ago | SuperChia
    com.sun.faces.mgbean.ManagedBeanCreationException: 对受管 bean resumeAudit 执行资源注入 (resource injection) 时发生错误
  6. 0

    WildFly 8.2.0 and Infinispan 6.0.2 CacheContainer Injection error

    Stack Overflow | 2 years ago | ObiWanKenobi
    component.SimpleCache.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."Test2.war".component.SimpleCache.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance

  1. Andreas Häber 5 times, last 3 weeks ago
  2. linxiaolong 8 times, last 3 months ago
  3. Hronom 1 times, last 4 months ago
  4. kjhdofjosvs 3 times, last 4 months ago
  5. Indri Yunita 236 times, last 5 months ago
6 more registered users
28 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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

    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException()
  2. Java RT
    Field.set
    1. sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
    2. sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
    3. sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source)
    4. sun.reflect.UnsafeShortFieldAccessorImpl.set(Unknown Source)
    5. java.lang.reflect.Field.set(Unknown Source)
    5 frames
  3. EclipseLink (non-OSGi)
    EntityTransactionImpl.commitInternal
    1. org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.setAttributeValueInObject(InstanceVariableAttributeAccessor.java:141)
    2. org.eclipse.persistence.exceptions.DescriptorException.illegalArgumentWhileSettingValueThruInstanceVariableAccessor(DescriptorException.java:700)
    3. org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.setAttributeValueInObject(InstanceVariableAttributeAccessor.java:188)
    4. org.eclipse.persistence.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1428)
    5. org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.mergeIntoObject(AbstractDirectMapping.java:1097)
    6. org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:3444)
    7. org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:3381)
    8. org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:748)
    9. org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:623)
    10. org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:267)
    11. org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeChangesIntoParent(UnitOfWorkImpl.java:3246)
    12. org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.mergeChangesIntoParent(RepeatableWriteUnitOfWork.java:368)
    13. org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:282)
    14. org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1135)
    15. org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
    15 frames