org.springframework.dao.InvalidDataAccessApiUsageException: Provided id of the wrong type for class com.boot.model.Tickets. Expected: class com.boot.model.TicketsPK, got class java.lang.String; nested exception is java.lang.IllegalArgumentException: Provided id of the wrong type for class com.boot.model.Tickets. Expected: class com.boot.model.TicketsPK, got class java.lang.String

Stack Overflow | Switcher05 | 8 months 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

    Using composite key with JPA

    Stack Overflow | 8 months ago | Switcher05
    org.springframework.dao.InvalidDataAccessApiUsageException: Provided id of the wrong type for class com.boot.model.Tickets. Expected: class com.boot.model.TicketsPK, got class java.lang.String; nested exception is java.lang.IllegalArgumentException: Provided id of the wrong type for class com.boot.model.Tickets. Expected: class com.boot.model.TicketsPK, got class java.lang.String
  2. 0

    transaction cannot complete using JtaTransactionManager, while using JpaTransactionManager works fine

    Stack Overflow | 1 year ago | bwa
    org.springframework.dao.InvalidDataAccessApiUsageException: Can only perform operation while a transaction is active.; nested exception is <openjpa-2.2.1-r422266:1396819 nonfatal user error> org.apache.openjpa.persistence.TransactionRequiredException: Can only perform operation while a transaction is active.
  3. 0

    JPA Query - SELECT clause with entity and case condition returning int

    Stack Overflow | 9 months ago | Fernando Luiz
    org.springframework.dao.InvalidDataAccessApiUsageException: No explicit selection and an implicit one could not be determined; nested exception is java.lang.IllegalStateException: No explicit selection and an implicit one could not be determined
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.hibernate.PersistentObjectException: detached entity passed to persist domain object

    Stack Overflow | 9 months ago | px06
    java.lang.IllegalStateException: Failed to execute ApplicationRunner
  6. 0

    org.springframework.dao.InvalidDataAccessApiUsageException: No value for key [org.hibernate.jpa.internal.EntityManagerImpl

    Stack Overflow | 8 months ago | melad
    org.springframework.dao.InvalidDataAccessApiUsageException: No value for key [org.hibernate.jpa.internal.EntityManagerImpl@2b99335] bound to thread [service-catalina-exec-16]; nested exception is java.lang.IllegalStateException: No value for key [org.hibernate.jpa.internal.EntityManagerImpl@2b99335] bound to thread [service-catalina-exec-16]
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. org.springframework.dao.InvalidDataAccessApiUsageException

    Provided id of the wrong type for class com.boot.model.Tickets. Expected: class com.boot.model.TicketsPK, got class java.lang.String; nested exception is java.lang.IllegalArgumentException: Provided id of the wrong type for class com.boot.model.Tickets. Expected: class com.boot.model.TicketsPK, got class java.lang.String

    at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible()
  2. Spring ORM
    AbstractEntityManagerFactoryBean.translateExceptionIfPossible
    1. org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:384)[spring-orm-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    2. org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:227)[spring-orm-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:417)[spring-orm-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3 frames
  3. Spring Tx
    PersistenceExceptionTranslationInterceptor.invoke
    1. org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    2. org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147)[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3 frames
  4. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    1 frame
  5. Spring Data JPA
    CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke
    1. org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:131)[spring-data-jpa-1.9.2.RELEASE.jar:na]
    1 frame
  6. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    4 frames
  7. com.sun.proxy
    $Proxy80.findOne
    1. com.sun.proxy.$Proxy80.findOne(Unknown Source)[na:na]
    1 frame
  8. com.boot.service
    TicketsEditor.editTicket
    1. com.boot.service.TicketsEditor.editTicket(TicketsEditor.java:88)[classes/:na]
    1 frame
  9. com.boot
    TicketsUI.lambda$init$ca60a5c0$1
    1. com.boot.TicketsUI.lambda$init$ca60a5c0$1(TicketsUI.java:75)[classes/:na]
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_91]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_91]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_91]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_91]
    4 frames
  11. com.boot
    TicketsUI.lambda$init$ca60a5c0$1
    1. com.boot.TicketsUI.lambda$init$ca60a5c0$1(TicketsUI.java:75)[classes/:na]
    1 frame
  12. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_91]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_91]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_91]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_91]
    4 frames