java.lang.UnsupportedOperationException: No support for uniqueness constraints

Spring JIRA | Tomas de Priede | 6 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    The error is produced when a unique constraint add to field. But i didn't know it, and for resolve i had to search in junit logs, because the test failed, and no message was showed Maybe roo must restrict the use of unique constraint with datanucleus or show a message. ------------------------------------------------------------------------------- Test set: ar.com.titan.pizzashop.domain.PizzaIntegrationTest ------------------------------------------------------------------------------- Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 3.106 sec <<< FAILURE! testCountPizzas(ar.com.titan.pizzashop.domain.PizzaIntegrationTest) Time elapsed: 0.09 sec <<< ERROR! java.lang.UnsupportedOperationException: No support for uniqueness constraints at org.datanucleus.store.appengine.DatastoreProperty.<init>(DatastoreProperty.java:80) at org.datanucleus.store.appengine.DatastoreTable.addDatastoreField(DatastoreTable.java:236) at org.datanucleus.store.appengine.DatastoreTable.addDatastoreField(DatastoreTable.java:82) at org.datanucleus.store.appengine.DatastoreMappingManager.createDatastoreField(DatastoreMappingManager.java:156) at org.datanucleus.store.mapped.mapping.SingleFieldMapping.prepareDatastoreMapping(SingleFieldMapping.java:56) at org.datanucleus.store.mapped.mapping.SingleFieldMapping.initialize(SingleFieldMapping.java:46) at org.datanucleus.store.mapped.mapping.MappingFactory.createMapping(MappingFactory.java:97) at org.datanucleus.store.mapped.mapping.AbstractMappingManager.getMapping(AbstractMappingManager.java:248) at org.datanucleus.store.appengine.DatastoreTable.initializeNonPK(DatastoreTable.java:322) at org.datanucleus.store.appengine.DatastoreTable.buildMapping(DatastoreTable.java:288) at org.datanucleus.store.appengine.DatastoreManager.buildStoreData(DatastoreManager.java:479) at org.datanucleus.store.appengine.DatastoreManager.newStoreData(DatastoreManager.java:437) at org.datanucleus.store.AbstractStoreManager.addClasses(AbstractStoreManager.java:788) at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:759) at org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:358) at org.datanucleus.store.appengine.DatastoreManager.getDatastoreClass(DatastoreManager.java:709) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:214) at org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.java:77) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) at ar.com.titan.pizzashop.domain.Pizza_Roo_Entity.findPizzaEntries_aroundBody8(Pizza_Roo_Entity.aj:111)

    Spring JIRA | 6 years ago | Tomas de Priede
    java.lang.UnsupportedOperationException: No support for uniqueness constraints
  2. 0

    The error is produced when a unique constraint add to field. But i didn't know it, and for resolve i had to search in junit logs, because the test failed, and no message was showed Maybe roo must restrict the use of unique constraint with datanucleus or show a message. ------------------------------------------------------------------------------- Test set: ar.com.titan.pizzashop.domain.PizzaIntegrationTest ------------------------------------------------------------------------------- Tests run: 9, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 3.106 sec <<< FAILURE! testCountPizzas(ar.com.titan.pizzashop.domain.PizzaIntegrationTest) Time elapsed: 0.09 sec <<< ERROR! java.lang.UnsupportedOperationException: No support for uniqueness constraints at org.datanucleus.store.appengine.DatastoreProperty.<init>(DatastoreProperty.java:80) at org.datanucleus.store.appengine.DatastoreTable.addDatastoreField(DatastoreTable.java:236) at org.datanucleus.store.appengine.DatastoreTable.addDatastoreField(DatastoreTable.java:82) at org.datanucleus.store.appengine.DatastoreMappingManager.createDatastoreField(DatastoreMappingManager.java:156) at org.datanucleus.store.mapped.mapping.SingleFieldMapping.prepareDatastoreMapping(SingleFieldMapping.java:56) at org.datanucleus.store.mapped.mapping.SingleFieldMapping.initialize(SingleFieldMapping.java:46) at org.datanucleus.store.mapped.mapping.MappingFactory.createMapping(MappingFactory.java:97) at org.datanucleus.store.mapped.mapping.AbstractMappingManager.getMapping(AbstractMappingManager.java:248) at org.datanucleus.store.appengine.DatastoreTable.initializeNonPK(DatastoreTable.java:322) at org.datanucleus.store.appengine.DatastoreTable.buildMapping(DatastoreTable.java:288) at org.datanucleus.store.appengine.DatastoreManager.buildStoreData(DatastoreManager.java:479) at org.datanucleus.store.appengine.DatastoreManager.newStoreData(DatastoreManager.java:437) at org.datanucleus.store.AbstractStoreManager.addClasses(AbstractStoreManager.java:788) at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:759) at org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:358) at org.datanucleus.store.appengine.DatastoreManager.getDatastoreClass(DatastoreManager.java:709) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:214) at org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.java:77) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398) at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163) at ar.com.titan.pizzashop.domain.Pizza_Roo_Entity.findPizzaEntries_aroundBody8(Pizza_Roo_Entity.aj:111)

    Spring JIRA | 6 years ago | Tomas de Priede
    java.lang.UnsupportedOperationException: No support for uniqueness constraints

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      No support for uniqueness constraints

      at org.datanucleus.store.appengine.DatastoreProperty.<init>()
    2. org.datanucleus.store
      DatastoreManager.newStoreData
      1. org.datanucleus.store.appengine.DatastoreProperty.<init>(DatastoreProperty.java:80)
      2. org.datanucleus.store.appengine.DatastoreTable.addDatastoreField(DatastoreTable.java:236)
      3. org.datanucleus.store.appengine.DatastoreTable.addDatastoreField(DatastoreTable.java:82)
      4. org.datanucleus.store.appengine.DatastoreMappingManager.createDatastoreField(DatastoreMappingManager.java:156)
      5. org.datanucleus.store.mapped.mapping.SingleFieldMapping.prepareDatastoreMapping(SingleFieldMapping.java:56)
      6. org.datanucleus.store.mapped.mapping.SingleFieldMapping.initialize(SingleFieldMapping.java:46)
      7. org.datanucleus.store.mapped.mapping.MappingFactory.createMapping(MappingFactory.java:97)
      8. org.datanucleus.store.mapped.mapping.AbstractMappingManager.getMapping(AbstractMappingManager.java:248)
      9. org.datanucleus.store.appengine.DatastoreTable.initializeNonPK(DatastoreTable.java:322)
      10. org.datanucleus.store.appengine.DatastoreTable.buildMapping(DatastoreTable.java:288)
      11. org.datanucleus.store.appengine.DatastoreManager.buildStoreData(DatastoreManager.java:479)
      12. org.datanucleus.store.appengine.DatastoreManager.newStoreData(DatastoreManager.java:437)
      12 frames
    3. DataNucleus Core
      AbstractStoreManager.addClass
      1. org.datanucleus.store.AbstractStoreManager.addClasses(AbstractStoreManager.java:788)
      2. org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:759)
      2 frames
    4. org.datanucleus.store
      JPQLQuery.performExecute
      1. org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:358)
      2. org.datanucleus.store.appengine.DatastoreManager.getDatastoreClass(DatastoreManager.java:709)
      3. org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:214)
      4. org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.java:77)
      4 frames
    5. DataNucleus Core
      Query.executeWithMap
      1. org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
      2. org.datanucleus.store.query.Query.executeWithMap(Query.java:1398)
      2 frames
    6. org.datanucleus.jpa
      JPAQuery.getResultList
      1. org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163)
      1 frame
    7. ar.com.titan
      Pizza_Roo_Entity.findPizzaEntries_aroundBody8
      1. ar.com.titan.pizzashop.domain.Pizza_Roo_Entity.findPizzaEntries_aroundBody8(Pizza_Roo_Entity.aj:111)
      1 frame