org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.util.UUID for entity of type org.springframework.xd.tuple.DefaultTuple!

Spring JIRA | Glenn renfro | 2 years ago
  1. 0

    Looks to have been introduced by https://github.com/spring-projects/spring-xd/pull/1577 Deployment: single admin, 2 container deployment using +RabbitMQ+ as the transport. Below is a partial stacktrace (please check log for full stacktrace). Log is attached. {noformat) 2015-05-15 10:50:15,843 1.2.0.SNAP ERROR xdbus.job:ec2Job3-1 step.AbstractStep - Encountered an error executing step readResourcesStep in job ec2Job3 org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.util.UUID for entity of type org.springframework.xd.tuple.DefaultTuple! at org.springframework.data.mongodb.core.MongoTemplate.assertUpdateableIdIfNotSet(MongoTemplate.java:1153) at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:882) at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:837) at org.springframework.batch.item.data.MongoItemWriter.doWrite(MongoItemWriter.java:128) at org.springframework.batch.item.data.MongoItemWriter$1.beforeCommit(MongoItemWriter.java:156) at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:928) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:740) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) {noformat)

    Spring JIRA | 2 years ago | Glenn renfro
    org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.util.UUID for entity of type org.springframework.xd.tuple.DefaultTuple!
  2. 0

    Looks to have been introduced by https://github.com/spring-projects/spring-xd/pull/1577 Deployment: single admin, 2 container deployment using +RabbitMQ+ as the transport. Below is a partial stacktrace (please check log for full stacktrace). Log is attached. {noformat) 2015-05-15 10:50:15,843 1.2.0.SNAP ERROR xdbus.job:ec2Job3-1 step.AbstractStep - Encountered an error executing step readResourcesStep in job ec2Job3 org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.util.UUID for entity of type org.springframework.xd.tuple.DefaultTuple! at org.springframework.data.mongodb.core.MongoTemplate.assertUpdateableIdIfNotSet(MongoTemplate.java:1153) at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:882) at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:837) at org.springframework.batch.item.data.MongoItemWriter.doWrite(MongoItemWriter.java:128) at org.springframework.batch.item.data.MongoItemWriter$1.beforeCommit(MongoItemWriter.java:156) at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:928) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:740) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) {noformat)

    Spring JIRA | 2 years ago | Glenn renfro
    org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.util.UUID for entity of type org.springframework.xd.tuple.DefaultTuple!
  3. 0

    Spring data mongodb. Generating id's error

    Stack Overflow | 2 years ago | b3lowster
    org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.lang.Long for entity of type ua.home.springdata.investigation.entity.Account!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using a domain object as a MongoDB document ID with Spring Data

    Stack Overflow | 2 years ago | David Goate
    org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type com.example.AccountId for entity of type com.example.Account!
  6. 0

    Using composite key with JPA

    Stack Overflow | 4 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

    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

      Cannot autogenerate id of type java.util.UUID for entity of type org.springframework.xd.tuple.DefaultTuple!

      at org.springframework.data.mongodb.core.MongoTemplate.assertUpdateableIdIfNotSet()
    2. Spring Data MongoDB - Core
      MongoTemplate.save
      1. org.springframework.data.mongodb.core.MongoTemplate.assertUpdateableIdIfNotSet(MongoTemplate.java:1153)
      2. org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:882)
      3. org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:837)
      3 frames
    3. Spring Batch Infrastructure
      MongoItemWriter$1.beforeCommit
      1. org.springframework.batch.item.data.MongoItemWriter.doWrite(MongoItemWriter.java:128)
      2. org.springframework.batch.item.data.MongoItemWriter$1.beforeCommit(MongoItemWriter.java:156)
      2 frames
    4. Spring Tx
      AbstractPlatformTransactionManager.commit
      1. org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:928)
      3. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:740)
      4. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
      4 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames