<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:58 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-2340] Moving apps to Mongo 3.2.2 driver and getting error</title>
                <link>https://jira.mongodb.org/browse/JAVA-2340</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;In my app I am trying to use mongo java 3.2.2 driver and seeing below errors.&lt;br/&gt;
I made sure that there is no libraries duplication or old libraries. &lt;/p&gt;


&lt;p&gt;TRACKING_ID:null ACCOUNT_NUM:null SESSION_ID:null] com.comcast.MongoDBConfiguration.mongoTemplate - Error occurred when creating the mongoTemplate.......ERROR_MESSAGE: Error creating bean with name &apos;mongoDbFactory&apos; defined in class path resource &lt;span class=&quot;error&quot;&gt;&amp;#91;com/comcast/sparrow/activatorweb/repository/MongoDBConfiguration.class&amp;#93;&lt;/span&gt;: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate &lt;span class=&quot;error&quot;&gt;&amp;#91;org.springframework.data.mongodb.MongoDbFactory&amp;#93;&lt;/span&gt;: Factory method &apos;mongoDbFactory&apos; threw exception; &lt;/p&gt;

&lt;p&gt;nested exception is java.lang.IllegalAccessError: tried to access method org.bson.types.ObjectId.&amp;lt;init&amp;gt;(III)V from class com.mongodb.Bytes &lt;/p&gt;

&lt;p&gt;ERROR_DETAILS: org.springframework.beans.factory.BeanCreationException: Error creating bean with name &apos;mongoDbFactory&apos; defined in class path resource &lt;span class=&quot;error&quot;&gt;&amp;#91;com/comcast/sparrow/activatorweb/repository/MongoDBConfiguration.class&amp;#93;&lt;/span&gt;: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate &lt;span class=&quot;error&quot;&gt;&amp;#91;org.springframework.data.mongodb.MongoDbFactory&amp;#93;&lt;/span&gt;: Factory method &apos;mongoDbFactory&apos; threw exception; nested exception is java.lang.IllegalAccessError: tried to access method org.bson.types.ObjectId.&amp;lt;init&amp;gt;(III)V from class com.mongodb.Bytes at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1023) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:381) at com.comcast.sparrow.activatorweb.repository.MongoDBConfiguration$$EnhancerBySpringCGLIB$$bd6b329d.mongoDbFactory(&amp;lt;generated&amp;gt;) at com.comcast.sparrow.activatorweb.repository.MongoDBConfiguration.mongoTemplate(MongoDBConfiguration.java:68) at com.comcast.sparrow.activatorweb.repository.MongoDBConfiguration$$EnhancerBySpringCGLIB$$bd6b329d.CGLIB$mongoTemplate$0(&amp;lt;generated&amp;gt;) at com.comcast.sparrow.activatorweb.repository.MongoDBConfiguration$$EnhancerBySpringCGLIB$$bd6b329d$$FastClassBySpringCGLIB$$ecc75b5b.invoke(&amp;lt;generated&amp;gt;) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) at com.comcast.sparrow.activatorweb.repository.MongoDBConfiguration$$EnhancerBySpringCGLIB$$bd6b329d.mongoTemplate(&amp;lt;generated&amp;gt;) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) at org.springframework&lt;/p&gt;</description>
                <environment>spring boot</environment>
        <key id="322607">JAVA-2340</key>
            <summary>Moving apps to Mongo 3.2.2 driver and getting error</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="pradeepkusingh@gmail.com">pradeep</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Oct 2016 22:21:21 +0000</created>
                <updated>Wed, 11 Sep 2019 19:13:33 +0000</updated>
                            <resolved>Mon, 10 Oct 2016 23:20:34 +0000</resolved>
                                    <version>3.2.2</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1404751" author="jeff.yemin" created="Mon, 10 Oct 2016 23:20:19 +0000"  >&lt;p&gt;The relevant part of the error message is:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;tried to access method org.bson.types.ObjectId.&amp;lt;init&amp;gt;(III)V from class com.mongodb.Bytes&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The version of the Bytes class in the 3.x driver does not call any ObjectId constructors, while the version in the 2.x driver does.&lt;/p&gt;

&lt;p&gt;So it does appear that you have an old version of the mongo-java-driver on your classpath.   I suggest that you start your application with  -verbose:class specified on the java command line.  That will tell you where the Bytes class is being loaded from.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsqosn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>