You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoMerchants': Cannot create inner bean '(inner bean)#690b537a' of type [org.springframework.data.mongodb.core.MongoOptionsFactoryBean] while setting bean property 'mongoOptions'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#690b537a': Instantiation of bean failed; nested exception is java.lang.IllegalAccessError: class com.mongodb.Bytes cannot access its superclass org.bson.BSON at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287)
#321
But Getting the below exception. Please help me to resolve this issue.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoMerchants': Cannot create inner bean '(inner bean)#690b537a' of type [org.springframework.data.mongodb.core.MongoOptionsFactoryBean] while setting bean property 'mongoOptions'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#690b537a': Instantiation of bean failed; nested exception is java.lang.IllegalAccessError: class com.mongodb.Bytes cannot access its superclass org.bson.BSON
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:618) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934) ~[spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4900) [catalina.jar:8.0.52]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363) [catalina.jar:8.0.52]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.52]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) [catalina.jar:8.0.52]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731) [catalina.jar:8.0.52]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.52]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973) [catalina.jar:8.0.52]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850) [catalina.jar:8.0.52]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_171]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#690b537a': Instantiation of bean failed; nested exception is java.lang.IllegalAccessError: class com.mongodb.Bytes cannot access its superclass org.bson.BSON
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
The text was updated successfully, but these errors were encountered:
Hi I am getting below exception when I upgraded java mongodriver and spring-data-mongo version.
from Java Mongo Driver
to
and Spring data from
to
This I did to upgrade to support Mongo Server 7.0 as per the guideline below.
https://www.mongodb.com/docs/drivers/java/sync/v4.5/compatibility/
But Getting the below exception. Please help me to resolve this issue.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoMerchants': Cannot create inner bean '(inner bean)#690b537a' of type [org.springframework.data.mongodb.core.MongoOptionsFactoryBean] while setting bean property 'mongoOptions'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#690b537a': Instantiation of bean failed; nested exception is java.lang.IllegalAccessError: class com.mongodb.Bytes cannot access its superclass org.bson.BSON
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:618) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934) ~[spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4900) [catalina.jar:8.0.52]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363) [catalina.jar:8.0.52]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.52]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755) [catalina.jar:8.0.52]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731) [catalina.jar:8.0.52]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.52]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973) [catalina.jar:8.0.52]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1850) [catalina.jar:8.0.52]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_171]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#690b537a': Instantiation of bean failed; nested exception is java.lang.IllegalAccessError: class com.mongodb.Bytes cannot access its superclass org.bson.BSON
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) ~[spring-beans-3.2.13.RELEASE.jar:3.2.13.RELEASE]
The text was updated successfully, but these errors were encountered: