<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:48 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-230] Getting [02:04:16.158] java.lang.NoClassDefFoundError: com/mongodb/util/ThreadUtil</title>
                <link>https://jira.mongodb.org/browse/JAVA-230</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; java.lang.NoClassDefFoundError: com/mongodb/util/ThreadUtil&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBPort._open(DBPort.java:222)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBPort.go(DBPort.java:85)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBPort.go(DBPort.java:66)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBPort.call(DBPort.java:56)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:211)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:284)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBCursor._check(DBCursor.java:297)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBCursor._hasNext(DBCursor.java:420)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt;  at com.mongodb.DBCursor.hasNext(DBCursor.java:445)&lt;/p&gt;</description>
                <environment>bash-3.2$ uname -a&lt;br/&gt;
Linux lpsapp3.la2.estalea.net 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux&lt;br/&gt;
&lt;br/&gt;
bash-3.2$ ls *mongo*&lt;br/&gt;
mongo-java-driver-2.3.jar&lt;br/&gt;
</environment>
        <key id="13922">JAVA-230</key>
            <summary>Getting [02:04:16.158] java.lang.NoClassDefFoundError: com/mongodb/util/ThreadUtil</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="joseph.wang">Joseph Wang </reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Dec 2010 02:07:34 +0000</created>
                <updated>Wed, 4 Dec 2013 16:07:29 +0000</updated>
                            <resolved>Thu, 17 Feb 2011 19:18:59 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="24132" author="antoine" created="Thu, 17 Feb 2011 19:18:59 +0000"  >&lt;p&gt;thanks Joseph.&lt;br/&gt;
Sorry, we&apos;ve fixed quite a few long standing bugs, so it&apos;s tough to know what is the status of certain tickets.&lt;/p&gt;
</comment>
                            <comment id="24128" author="joseph.wang" created="Thu, 17 Feb 2011 18:52:06 +0000"  >&lt;p&gt;Please close it for now. We don&apos;t have time to test new sw for other people.&lt;/p&gt;
</comment>
                            <comment id="24106" author="antoine" created="Thu, 17 Feb 2011 07:29:57 +0000"  >&lt;p&gt;joseph, is this still occuring or can I close ticket?&lt;br/&gt;
If possible, do some tests with 2.4 driver or better latest from trunk (not against production).&lt;br/&gt;
thx&lt;/p&gt;</comment>
                            <comment id="21283" author="joseph.wang" created="Fri, 10 Dec 2010 04:57:00 +0000"  >&lt;p&gt;The problem java.lang.NoClassDefFoundError exception. &lt;/p&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; java.lang.NoClassDefFoundError: com/mongodb/util/ThreadUtil&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBPort._open(DBPort.java:222)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBPort.go(DBPort.java:85)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBPort.go(DBPort.java:66)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBPort.call(DBPort.java:56)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:211)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:284)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBCursor._check(DBCursor.java:297)&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;02:04:16.158&amp;#93;&lt;/span&gt; at com.mongodb.DBCursor._hasNext(DBCursor.java:420) &lt;/p&gt;</comment>
                            <comment id="21282" author="joseph.wang" created="Fri, 10 Dec 2010 04:48:52 +0000"  >
&lt;p&gt;The problem is mainly on the client side. We need to change the web server socket limit.&lt;/p&gt;
</comment>
                            <comment id="21281" author="scotthernandez" created="Fri, 10 Dec 2010 03:54:30 +0000"  >&lt;p&gt;I&apos;m really confused. What is the problem? Can you start with a new issue (that is clean)?&lt;/p&gt;</comment>
                            <comment id="21278" author="jbehl@estalea.com" created="Fri, 10 Dec 2010 03:21:07 +0000"  >&lt;p&gt;I&apos;m on the sysadmin side of things with Joseph and wanted to add ulimit settings in case there was a question:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;lps-mongodb_prod@lpsdb1.la2 ~&amp;#93;&lt;/span&gt;$ ulimit -a&lt;/p&gt;

&lt;p&gt;core file size          (blocks, -c) 0&lt;br/&gt;
data seg size           (kbytes, -d) unlimited&lt;br/&gt;
scheduling priority             (-e) 0&lt;br/&gt;
file size               (blocks, -f) unlimited&lt;br/&gt;
pending signals                 (-i) 399360&lt;br/&gt;
max locked memory       (kbytes, -l) 32&lt;br/&gt;
max memory size         (kbytes, -m) unlimited&lt;br/&gt;
open files                      (-n) 8192&lt;br/&gt;
pipe size            (512 bytes, -p) 8&lt;br/&gt;
POSIX message queues     (bytes, -q) 819200&lt;br/&gt;
real-time priority              (-r) 0&lt;br/&gt;
stack size              (kbytes, -s) 10240&lt;br/&gt;
cpu time               (seconds, -t) unlimited&lt;br/&gt;
max user processes              (-u) 399360&lt;br/&gt;
virtual memory          (kbytes, -v) unlimited&lt;br/&gt;
file locks                      (-x) unlimited&lt;/p&gt;
</comment>
                            <comment id="21277" author="joseph.wang" created="Fri, 10 Dec 2010 02:36:25 +0000"  >
&lt;p&gt;change max_connection to 200. Apparently, this is not max connection per pool, but per server. Can someone confirm this?&lt;/p&gt;

&lt;p&gt;bash-3.2$ netstat -an| grep 4110 | wc -l&lt;br/&gt;
603&lt;/p&gt;</comment>
                            <comment id="21276" author="joseph.wang" created="Fri, 10 Dec 2010 02:26:20 +0000"  >
&lt;p&gt;Sorry, in the resin startup, we do set to 1.6 java.&lt;/p&gt;

&lt;p&gt;JAVA_HOME=/usr/java/jdk1.6.0_21&lt;/p&gt;

</comment>
                            <comment id="21275" author="joseph.wang" created="Fri, 10 Dec 2010 02:20:55 +0000"  >&lt;p&gt;We&apos;ve wrong java installed. Please wait till we install correct sw.&lt;/p&gt;


&lt;p&gt;bash-3.2$ java -version&lt;br/&gt;
java version &quot;1.4.2&quot;&lt;br/&gt;
gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-48)&lt;/p&gt;

&lt;p&gt;Copyright (C) 2006 Free Software Foundation, Inc.&lt;br/&gt;
This is free software; see the source for copying conditions.  There is NO&lt;br/&gt;
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;br/&gt;
bash-3.2$&lt;br/&gt;
bash-3.2$ hostname -f&lt;br/&gt;
lpsapp3.la2.estalea.net&lt;/p&gt;</comment>
                            <comment id="21273" author="joseph.wang" created="Fri, 10 Dec 2010 02:14:40 +0000"  >&lt;p&gt;specified max_connection=500, yet see 872.&lt;/p&gt;

&lt;p&gt;bash-3.2$ netstat -an | grep 4110 | wc -l&lt;br/&gt;
872&lt;/p&gt;




&lt;p&gt;	public void init(String server_list) {&lt;br/&gt;
		if (m == null) {&lt;br/&gt;
			MongoOptions opt = new MongoOptions();&lt;br/&gt;
			opt.autoConnectRetry = true;&lt;br/&gt;
			opt.connectionsPerHost = max_connection;&lt;/p&gt;

&lt;p&gt;			String[] servers = server_list.split(&quot;,&quot;);&lt;br/&gt;
			ArrayList&amp;lt;ServerAddress&amp;gt; addr = new ArrayList&amp;lt;ServerAddress&amp;gt;();&lt;br/&gt;
			int serverCount = 0;&lt;br/&gt;
			for (int i = 0; i &amp;lt; servers.length; ++i) {&lt;br/&gt;
				String[] serverInfo = servers&lt;span class=&quot;error&quot;&gt;&amp;#91;i&amp;#93;&lt;/span&gt;.split(&quot;:&quot;);&lt;/p&gt;

&lt;p&gt;				try {&lt;br/&gt;
					if (serverInfo.length == SERVER_INFORMATION_FIELD_SIZE) &lt;/p&gt;
{
						log.info(&quot;MongoConnnection: add server &quot;
								+ serverInfo[SERVER_NAME_FIELD] + &quot; at port &quot;
								+ serverInfo[SERVER_PORT_FIELD]);
						ServerAddress host = new ServerAddress(
								serverInfo[SERVER_NAME_FIELD],
								Integer.parseInt(serverInfo[SERVER_PORT_FIELD]));
						addr.add(host);

						serverCount++;
					}
&lt;p&gt;				} catch (Exception ex) &lt;/p&gt;
{
					log.fatal(
							&quot;MongoConnnection: problem with adding server list &quot;
									+ server_list, ex);
				}
&lt;p&gt;			}&lt;/p&gt;

&lt;p&gt;			if (serverCount &amp;gt; 0) {&lt;br/&gt;
				try &lt;/p&gt;
{
					m = new Mongo(addr, opt);
				}
&lt;p&gt; catch (Exception ex) &lt;/p&gt;
{
					log.fatal(&quot;MongoConnnection: problem with creating MongoDB instance for server list &quot;
									+ server_list, ex);
					m = null;
				}
&lt;p&gt;			} else &lt;/p&gt;
{
				log.fatal(&quot;MongoConnnection: empty server list &quot; + server_list);
			}
&lt;p&gt;		}&lt;br/&gt;
	}&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|hrhcjb:</customfieldvalue>

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