org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaEntityRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported!

Spring JIRA | Mark Dopheide | 5 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

    // Spring Roo 1.2.0.BUILD-SNAPSHOT log opened at 2011-11-05 23:08:41 project --topLevelPackage com.test3 --projectName test3 --java 6 persistence setup --provider HIBERNATE --database POSTGRES --userName admin --password password mongo setup entity jpa --class ~.domain.JpaEntity --activeRecord false entity mongo --class ~.domain.MongoEntity field string --fieldName name repository mongo --interface ~.repository.MongoEntityRepository --entity ~.domain.MongoEntity repository jpa --interface ~.repository.JpaEntityRepository --entity ~.domain.JpaEntity web mvc setup web mvc all --package ~.web {code} SEVERE: The web application [/test2] created a ThreadLocal with key of type [null] (value [com.mongodb.DBTCPConnector$1@77ad4513]) and a value of type [com.mongodb.DBTCPConnector.MyPort] (value [com.mongodb.DBTCPConnector$MyPort@10921fc7]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 2011-11-06 00:54:38,974 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaEntityRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported! at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) Caused by: java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported! at org.springframework.data.mongodb.repository.support.MongoRepositoryFactory.validate(MongoRepositoryFactory.java:143) at org.springframework.data.repository.core.support.RepositoryFactorySupport.validate(RepositoryFactorySupport.java:221) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:129) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:114) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:38) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 26 more {code}

    Spring JIRA | 5 years ago | Mark Dopheide
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaEntityRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported!
  2. 0

    // Spring Roo 1.2.0.BUILD-SNAPSHOT log opened at 2011-11-05 23:08:41 project --topLevelPackage com.test3 --projectName test3 --java 6 persistence setup --provider HIBERNATE --database POSTGRES --userName admin --password password mongo setup entity jpa --class ~.domain.JpaEntity --activeRecord false entity mongo --class ~.domain.MongoEntity field string --fieldName name repository mongo --interface ~.repository.MongoEntityRepository --entity ~.domain.MongoEntity repository jpa --interface ~.repository.JpaEntityRepository --entity ~.domain.JpaEntity web mvc setup web mvc all --package ~.web {code} SEVERE: The web application [/test2] created a ThreadLocal with key of type [null] (value [com.mongodb.DBTCPConnector$1@77ad4513]) and a value of type [com.mongodb.DBTCPConnector.MyPort] (value [com.mongodb.DBTCPConnector$MyPort@10921fc7]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak. 2011-11-06 00:54:38,974 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaEntityRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported! at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) Caused by: java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported! at org.springframework.data.mongodb.repository.support.MongoRepositoryFactory.validate(MongoRepositoryFactory.java:143) at org.springframework.data.repository.core.support.RepositoryFactorySupport.validate(RepositoryFactorySupport.java:221) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:129) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:114) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:38) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 26 more {code}

    Spring JIRA | 5 years ago | Mark Dopheide
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaEntityRepository': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported!

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Unsupported id class! Only class java.math.BigInteger,class org.bson.types.ObjectId,class java.lang.String are supported!

      at org.springframework.data.mongodb.repository.support.MongoRepositoryFactory.validate()
    2. Spring Data MongoDB - Core
      MongoRepositoryFactory.validate
      1. org.springframework.data.mongodb.repository.support.MongoRepositoryFactory.validate(MongoRepositoryFactory.java:143)
      1 frame
    3. Spring Data Core
      RepositoryFactoryBeanSupport.getObject
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport.validate(RepositoryFactorySupport.java:221)
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:129)
      3. org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:114)
      4. org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:38)
      4 frames
    4. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
      2. org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
      3. org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      7. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
      7 frames
    5. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      2 frames
    6. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
      3 frames
    7. Glassfish Core
      StandardContext.listenerStart
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
      1 frame