java.lang.IllegalArgumentException: Unsupported entity org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper! Could not determine IsNewStrategy.

Spring JIRA | Scott Jungers | 4 months ago
  1. 0

    I'm getting the following error when I try to use the delay option on the IntegrationFlowBuilder {quote}Unsupported entity org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper! Could not determine IsNewStrategy.{quote} I've looked at the history of https://jira.spring.io/browse/INT-3346, and it seems to be related, but that issue appears to have been fixed in the version that I am using (I see the _id field). When I step through the code, it looks as though the mapping context (and IsNewStrategy) mapped through my MongoConfig is used instead of what seems to be configured in the MongoDbMessageStore. So, it has access to entity information for all my domain entities (those annotated with @Document), but not the MessageWrapper. *Integration Flow* {code:java} IntegrationFlows.from("channel.in").delay("group1", s -> s.defaultDelay(3000).messageStore(messageStore)) .handle(<somehandler>).get()}} {code} *Message Store Config* {code:java} @Bean public MessageGroupStore messageStore(MongoDbFactory mongoDbFactory) { return new MongoDbMessageStore(mongoDbFactory, "messageStoreCollection") } {code} *Mongo Config* {code:java} @Configuration @EnableMongoAuditing public class MongoConfig extends AbstractMongoConfiguration { @Bean public MongoClient mongo() throws UnknownHostException { MongoClientOptions.Builder builder = new MongoClientOptions.build(); MongoClientOptions options = builder.connectionsPerHost(100).build(); return new MongoClient(new ServerAddress("localhost", 28017)), options); } protected String getDatabaseName() { return "myMongoDb"; } protected String getMappingBasePackage() { return "com.mycompany.myapp.entities"; } @Bean public MongoTemplate mongoTemplate(MongoClient mongo, MongoConverter mongoConverter) throws UnknownHostException { return new MongoTemplate(mongoDbFactory(), mongoConverter); } @Bean public GridFstemplate gridFsTemplate() throws UnknownHostException { return new GridFsTemplate(mongoDbFactory(), mappingMongoConverter()); } @Bean public LocalValidatorFactoryBean localValidatorFactoryBean() { return new LocalValidatorFactoryBean(); } } {code} *Stacktrace* {noformat} java.lang.IllegalArgumentException: Unsupported entity org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper! Could not determine IsNewStrategy. at org.springframework.data.support.IsNewStrategyFactorySupport.getIsNewStrategy(IsNewStrategyFactorySupport.java:48) ~[spring-data-commons-1.11.2.RELEASE.jar:na] at org.springframework.data.auditing.IsNewAwareAuditingHandler.markAudited(IsNewAwareAuditingHandler.java:80) ~[spring-data-commons-1.11.2.RELEASE.jar:na] at org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:54) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na] at org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:31) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.data.mongodb.core.MongoTemplate.maybeEmitEvent(MongoTemplate.java:1627) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na] at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:799) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na] at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:743) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na] at org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessageDocument(MongoDbMessageStore.java:220) ~[spring-integration-mongodb-4.2.4.RELEASE.jar:na] at org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessageToGroup(MongoDbMessageStore.java:302) ~[spring-integration-mongodb-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.DelayHandler.releaseMessageAfterDelay(DelayHandler.java:334) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.DelayHandler.handleRequestMessage(DelayHandler.java:267) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:442) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:392) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) ~[spring-messaging-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) ~[spring-messaging-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105) ~[spring-messaging-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:231) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:154) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:102) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120) ~[spring-integration-core-4.2.4.RELEASE.jar:na] at org.springframework.integration.amqp.channel.AbstractSubscribableAmqpChannel$DispatchingMessageListener.onMessage(AbstractSubscribableAmqpChannel.java:181) ~[spring-integration-amqp-4.2.4.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:800) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:691) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:93) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:183) ~[spring-rabbit-1.5.3.RELEASE.jar:na] at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_40] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_40] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:74) ~[spring-retry-1.1.2.RELEASE.jar:na] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:263) [spring-retry-1.1.2.RELEASE.jar:na] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:168) [spring-retry-1.1.2.RELEASE.jar:na] at org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:98) [spring-retry-1.1.2.RELEASE.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) [spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE] at com.sun.proxy.$Proxy213.invokeListener(Unknown Source) [na:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1358) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:661) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1102) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1086) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1100(SimpleMessageListenerContainer.java:93) [spring-rabbit-1.5.3.RELEASE.jar:na] at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1203) [spring-rabbit-1.5.3.RELEASE.jar:na] at java.lang.Thread.run(Unknown Source) [na:1.8.0_40] {noformat} http://stackoverflow.com/questions/38622878/mongodbmessagestore-could-not-determine-isnewstrategy-error

    Spring JIRA | 4 months ago | Scott Jungers
    java.lang.IllegalArgumentException: Unsupported entity org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper! Could not determine IsNewStrategy.
  2. 0

    MongoDbMessageStore Could not determine IsNewStrategy Error

    Stack Overflow | 4 months ago | Scott J.
    java.lang.IllegalArgumentException: Unsupported entity org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper! Could not determine IsNewStrategy.
  3. 0

    With the update to version 1.7.0 I get the following exception where persisting data via Repositories/MongoTemplate. With version 1.6.2 it is working fine. In the documentation there is nothing mentioned regarding changes related to this issue. {noformat} java.lang.IllegalArgumentException: Unsupported entity org.gessnerfl.persistence.springdata.mongodb.dummy.model.DummyObject! Could not determine IsNewStrategy. at org.springframework.data.support.IsNewStrategyFactorySupport.getIsNewStrategy(IsNewStrategyFactorySupport.java:48) at org.springframework.data.auditing.IsNewAwareAuditingHandler.markAudited(IsNewAwareAuditingHandler.java:80) at org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:54) at org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:31) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331) at org.springframework.data.mongodb.core.MongoTemplate.maybeEmitEvent(MongoTemplate.java:1600) at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:789) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:739) at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.save(SimpleMongoRepository.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:414) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:399) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:371) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy34.save(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) at org.gessnerfl.persistence.springdata.mongodb.audit.aspect.AuditAwareRepositoryAspect.onVersionEvent(AuditAwareRepositoryAspect.java:58) at org.gessnerfl.persistence.springdata.mongodb.audit.aspect.AuditAwareRepositoryAspect.onSaveExecuted(AuditAwareRepositoryAspect.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy38.save(Unknown Source) at org.gessnerfl.persistence.springdata.mongodb.audit.MongoVersionRepositoryIntegrationTest.shouldCreateNoEntryAsRepositoryIsNotVersioned(MongoVersionRepositoryIntegrationTest.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) {noformat}

    Spring JIRA | 2 years ago | Florian Geßner
    java.lang.IllegalArgumentException: Unsupported entity org.gessnerfl.persistence.springdata.mongodb.dummy.model.DummyObject! Could not determine IsNewStrategy.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    With the update to version 1.7.0 I get the following exception where persisting data via Repositories/MongoTemplate. With version 1.6.2 it is working fine. In the documentation there is nothing mentioned regarding changes related to this issue. {noformat} java.lang.IllegalArgumentException: Unsupported entity org.gessnerfl.persistence.springdata.mongodb.dummy.model.DummyObject! Could not determine IsNewStrategy. at org.springframework.data.support.IsNewStrategyFactorySupport.getIsNewStrategy(IsNewStrategyFactorySupport.java:48) at org.springframework.data.auditing.IsNewAwareAuditingHandler.markAudited(IsNewAwareAuditingHandler.java:80) at org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:54) at org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:31) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331) at org.springframework.data.mongodb.core.MongoTemplate.maybeEmitEvent(MongoTemplate.java:1600) at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:789) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:739) at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.save(SimpleMongoRepository.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:414) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:399) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:371) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy34.save(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) at org.gessnerfl.persistence.springdata.mongodb.audit.aspect.AuditAwareRepositoryAspect.onVersionEvent(AuditAwareRepositoryAspect.java:58) at org.gessnerfl.persistence.springdata.mongodb.audit.aspect.AuditAwareRepositoryAspect.onSaveExecuted(AuditAwareRepositoryAspect.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy38.save(Unknown Source) at org.gessnerfl.persistence.springdata.mongodb.audit.MongoVersionRepositoryIntegrationTest.shouldCreateNoEntryAsRepositoryIsNotVersioned(MongoVersionRepositoryIntegrationTest.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) {noformat}

    Spring JIRA | 2 years ago | Florian Geßner
    java.lang.IllegalArgumentException: Unsupported entity org.gessnerfl.persistence.springdata.mongodb.dummy.model.DummyObject! Could not determine IsNewStrategy.
  6. 0

    DB level multi-tenant MongoDB with Spring Data in combination with global db results in Unsupported entity error

    Stack Overflow | 4 months ago | Vlad Manuel Mureșan
    java.lang.IllegalArgumentException: Unsupported entity com.myapp.domain.tenant.FileBatch! Could not determine IsNewStrategy.

    2 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

      Unsupported entity org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper! Could not determine IsNewStrategy.

      at org.springframework.data.support.IsNewStrategyFactorySupport.getIsNewStrategy()
    2. Spring Data Core
      IsNewAwareAuditingHandler.markAudited
      1. org.springframework.data.support.IsNewStrategyFactorySupport.getIsNewStrategy(IsNewStrategyFactorySupport.java:48)[spring-data-commons-1.11.2.RELEASE.jar:na]
      2. org.springframework.data.auditing.IsNewAwareAuditingHandler.markAudited(IsNewAwareAuditingHandler.java:80)[spring-data-commons-1.11.2.RELEASE.jar:na]
      2 frames
    3. Spring Data MongoDB - Core
      AuditingEventListener.onApplicationEvent
      1. org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:54)[spring-data-mongodb-1.8.2.RELEASE.jar:na]
      2. org.springframework.data.mongodb.core.mapping.event.AuditingEventListener.onApplicationEvent(AuditingEventListener.java:31)[spring-data-mongodb-1.8.2.RELEASE.jar:na]
      2 frames
    4. Spring Context
      AbstractApplicationContext.publishEvent
      1. org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      2. org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      3. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      4. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      4 frames
    5. Spring Data MongoDB - Core
      MongoTemplate.insert
      1. org.springframework.data.mongodb.core.MongoTemplate.maybeEmitEvent(MongoTemplate.java:1627)[spring-data-mongodb-1.8.2.RELEASE.jar:na]
      2. org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:799)[spring-data-mongodb-1.8.2.RELEASE.jar:na]
      3. org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:743)[spring-data-mongodb-1.8.2.RELEASE.jar:na]
      3 frames
    6. org.springframework.integration
      MongoDbMessageStore.addMessageToGroup
      1. org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessageDocument(MongoDbMessageStore.java:220)[spring-integration-mongodb-4.2.4.RELEASE.jar:na]
      2. org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessageToGroup(MongoDbMessageStore.java:302)[spring-integration-mongodb-4.2.4.RELEASE.jar:na]
      2 frames
    7. Spring Integration Core
      AbstractMessageChannel.send
      1. org.springframework.integration.handler.DelayHandler.releaseMessageAfterDelay(DelayHandler.java:334)[spring-integration-core-4.2.4.RELEASE.jar:na]
      2. org.springframework.integration.handler.DelayHandler.handleRequestMessage(DelayHandler.java:267)[spring-integration-core-4.2.4.RELEASE.jar:na]
      3. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99)[spring-integration-core-4.2.4.RELEASE.jar:na]
      4. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)[spring-integration-core-4.2.4.RELEASE.jar:na]
      5. org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)[spring-integration-core-4.2.4.RELEASE.jar:na]
      6. org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147)[spring-integration-core-4.2.4.RELEASE.jar:na]
      7. org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120)[spring-integration-core-4.2.4.RELEASE.jar:na]
      8. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)[spring-integration-core-4.2.4.RELEASE.jar:na]
      9. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:442)[spring-integration-core-4.2.4.RELEASE.jar:na]
      10. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:392)[spring-integration-core-4.2.4.RELEASE.jar:na]
      10 frames
    8. Spring Messaging
      AbstractMessageSendingTemplate.send
      1. org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)[spring-messaging-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      2. org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45)[spring-messaging-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      3. org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105)[spring-messaging-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      3 frames
    9. Spring Integration Core
      UnicastingDispatcher.dispatch
      1. org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:231)[spring-integration-core-4.2.4.RELEASE.jar:na]
      2. org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:154)[spring-integration-core-4.2.4.RELEASE.jar:na]
      3. org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:102)[spring-integration-core-4.2.4.RELEASE.jar:na]
      4. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105)[spring-integration-core-4.2.4.RELEASE.jar:na]
      5. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)[spring-integration-core-4.2.4.RELEASE.jar:na]
      6. org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)[spring-integration-core-4.2.4.RELEASE.jar:na]
      7. org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147)[spring-integration-core-4.2.4.RELEASE.jar:na]
      8. org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120)[spring-integration-core-4.2.4.RELEASE.jar:na]
      8 frames
    10. org.springframework.integration
      AbstractSubscribableAmqpChannel$DispatchingMessageListener.onMessage
      1. org.springframework.integration.amqp.channel.AbstractSubscribableAmqpChannel$DispatchingMessageListener.onMessage(AbstractSubscribableAmqpChannel.java:181)[spring-integration-amqp-4.2.4.RELEASE.jar:na]
      1 frame
    11. Spring RabbitMQ Support
      SimpleMessageListenerContainer$1.invokeListener
      1. org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:800)[spring-rabbit-1.5.3.RELEASE.jar:na]
      2. org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:691)[spring-rabbit-1.5.3.RELEASE.jar:na]
      3. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:93)[spring-rabbit-1.5.3.RELEASE.jar:na]
      4. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:183)[spring-rabbit-1.5.3.RELEASE.jar:na]
      4 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)[na:na]
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[na:1.8.0_40]
      3. java.lang.reflect.Method.invoke(Unknown Source)[na:1.8.0_40]
      3 frames
    13. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      3 frames
    14. Spring Retry
      RetryOperationsInterceptor.invoke
      1. org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:74)[spring-retry-1.1.2.RELEASE.jar:na]
      2. org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:263)[spring-retry-1.1.2.RELEASE.jar:na]
      3. org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:168)[spring-retry-1.1.2.RELEASE.jar:na]
      4. org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:98)[spring-retry-1.1.2.RELEASE.jar:na]
      4 frames
    15. 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.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
      2 frames
    16. com.sun.proxy
      $Proxy213.invokeListener
      1. com.sun.proxy.$Proxy213.invokeListener(Unknown Source)[na:na]
      1 frame
    17. Spring RabbitMQ Support
      SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run
      1. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1358)[spring-rabbit-1.5.3.RELEASE.jar:na]
      2. org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:661)[spring-rabbit-1.5.3.RELEASE.jar:na]
      3. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1102)[spring-rabbit-1.5.3.RELEASE.jar:na]
      4. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1086)[spring-rabbit-1.5.3.RELEASE.jar:na]
      5. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1100(SimpleMessageListenerContainer.java:93)[spring-rabbit-1.5.3.RELEASE.jar:na]
      6. org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1203)[spring-rabbit-1.5.3.RELEASE.jar:na]
      6 frames
    18. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)[na:1.8.0_40]
      1 frame