<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkECR3YyfSp7ImA9WxNWE0w.&quot;"><id>tag:blogger.com,1999:blog-26670725</id><updated>2009-10-12T11:37:46.895+08:00</updated><title>Something About J</title><subtitle type="html">A simple blog about Java, Web and their related technologies.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://abtj.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://abtj.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/AboutJ" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;CUMHSHo-cSp7ImA9WxNTF0s.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-6512998913921571899</id><published>2009-08-20T18:17:00.000+08:00</published><updated>2009-08-20T18:17:19.459+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-20T18:17:19.459+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="bug" /><title>Shutdown Hook and Eclipse</title><content type="html">If you would like to get shutdown hook to execute on a process launched from Eclipse, by clicking the red stop button, it won't be called. Here is the reported &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016"&gt;Eclipse bug&lt;/a&gt;, which is opened since 2003-05-23, and the Resolution is WONTFIX. :)&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-6512998913921571899?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/FMP_v-_8cdY" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=6512998913921571899" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6512998913921571899?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6512998913921571899?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/FMP_v-_8cdY/shutdown-hook-and-eclipse.html" title="Shutdown Hook and Eclipse" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2009/08/shutdown-hook-and-eclipse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUFR3gyfSp7ImA9WxJbF0Q.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-7733636302451845555</id><published>2009-07-28T17:35:00.005+08:00</published><updated>2009-07-28T23:50:16.695+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-28T23:50:16.695+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="web" /><category scheme="http://www.blogger.com/atom/ns#" term="tomcat" /><title>How to Add/Deploy WAR file into Eclipse Tomcat Server</title><content type="html">In some scenario, you wish to deploy a default web application into Eclipse Tomcat which is not part of your project, you may just add the war file into the below directory:&lt;br /&gt;&lt;br /&gt;   &lt;your&gt;%your_workspace%\.metadata\.plugins\org.eclipse.wst.server.core\tmp&lt;x&gt;X\webapps&lt;br /&gt;&lt;br /&gt;where tmpX could be tmp0, tmp1 etc&lt;br /&gt;&lt;br /&gt;&lt;/x&gt;&lt;/your&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-7733636302451845555?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/FfpAmzupzYY" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=7733636302451845555" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7733636302451845555?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7733636302451845555?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/FfpAmzupzYY/how-to-adddeploy-war-file-into-eclipse.html" title="How to Add/Deploy WAR file into Eclipse Tomcat Server" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://abtj.blogspot.com/2009/07/how-to-adddeploy-war-file-into-eclipse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcGRX4yfCp7ImA9WxVVF0g.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-3851668664736917149</id><published>2009-03-11T15:29:00.002+08:00</published><updated>2009-03-11T15:37:04.094+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-11T15:37:04.094+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="sun" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><category scheme="http://www.blogger.com/atom/ns#" term="solaris" /><title>Why My Java Program Shows Wrong Timestamp?</title><content type="html">It may due to you set up time zone wrongly if you are in Solaris or Unix machine. For the below example, if you use GMT[+/-] format instead of City or a valid timzone name, you will got wrong timestamp. Refer to my previous post about how to set &lt;a href="http://abtj.blogspot.com/2009/03/how-to-set-time-zone-tz-correctly-in.html"&gt;TZ&lt;/a&gt; correctly.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;fwsst36 scadm$ echo $TZ;date;date -u;java DateUtils&lt;br /&gt;CST6CDT&lt;br /&gt;Tue Mar 10 03:53:35 CDT 2009&lt;br /&gt;Tue Mar 10 08:53:35 GMT 2009&lt;br /&gt;Tue Mar 10 03:53:35 CDT 2009&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fwsst36 scadm$ echo $TZ;date;date -u;java DateUtils&lt;br /&gt;Asia/Jakarta&lt;br /&gt;Tue Mar 10 15:54:05 WIT 2009&lt;br /&gt;Tue Mar 10 08:54:05 GMT 2009&lt;br /&gt;Tue Mar 10 15:54:05 WIT 2009&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fwsst36 scadm$ echo $TZ;date;date -u;java DateUtils&lt;br /&gt;GMT-7&lt;br /&gt;Tue Mar 10 15:54:26 &lt;span style="color:#ff0000;"&gt;GMT&lt;/span&gt; 2009&lt;br /&gt;Tue Mar 10 08:54:26 GMT 2009&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Tue Mar 10 01:54:26&lt;/span&gt; GMT-07:00 2009&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;(This is wrong)&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-3851668664736917149?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/PiEObh8S-DM" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=3851668664736917149" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3851668664736917149?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3851668664736917149?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/PiEObh8S-DM/why-my-java-program-shows-wrong.html" title="Why My Java Program Shows Wrong Timestamp?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2009/03/why-my-java-program-shows-wrong.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMARH8-eCp7ImA9WxVVF0g.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-7953367325912617378</id><published>2009-03-11T15:14:00.004+08:00</published><updated>2009-03-11T15:27:25.150+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-11T15:27:25.150+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sun" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><category scheme="http://www.blogger.com/atom/ns#" term="solaris" /><title>How To Set Time Zone (TZ) Correctly in a Unix/Solaris System?</title><content type="html">First, check your environ manual:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&gt; man -s5 environ&lt;br /&gt;...&lt;br /&gt;TZ&lt;br /&gt;&lt;br /&gt;Timezone information. The contents of this environment&lt;br /&gt;variable are used by the functions ctime(3C),&lt;br /&gt;localtime(3C), strftime(3C), and mktime(3C) to override&lt;br /&gt;the default timezone. The value of TZ has one of the two&lt;br /&gt;formats (spaces inserted for clarity):&lt;br /&gt;&lt;br /&gt;:characters&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;std offset dst offset, rule&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;If TZ is of the first format (that is, if the first&lt;br /&gt;character is a colon (:)), or if TZ is not of the second&lt;br /&gt;format, then TZ designates a path to a timezone database&lt;br /&gt;file relative to /usr/share/lib/zoneinfo/&lt;/span&gt;, ignoring a&lt;br /&gt;leading colon if one exists.&lt;br /&gt;...&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Second, check is your city is under /usr/share/lib/zoneinfo.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;csdbld03: zoneinfo&gt; find . -name Kuala_Lumpur&lt;br /&gt;./Asia/Kuala_Lumpur&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Third, update TZ at your /etc/TIMEZONE. Example TZ=Asia/Kuala_Lumpur.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Avoid&lt;/strong&gt; to use GMT[+/-] format as it is obsolete.&lt;br /&gt;&lt;blockquote&gt;&gt; cat /usr/share/lib/zoneinfo/src/README&lt;br /&gt;...&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;The following files have been removed from the release:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-12&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-11&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-10&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-9&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-8&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-7&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-6&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-5&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-4&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-3&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-2&lt;br /&gt;/usr/share/lib/zoneinfo/GMT-1&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+1&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+2&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+3&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+4&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+5&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+6&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+7&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+8&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+9&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+10&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+11&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+12&lt;br /&gt;/usr/share/lib/zoneinfo/GMT+13&lt;br /&gt;...&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-7953367325912617378?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/UvkvE6py9Uw" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=7953367325912617378" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7953367325912617378?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7953367325912617378?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/UvkvE6py9Uw/how-to-set-time-zone-tz-correctly-in.html" title="How To Set Time Zone (TZ) Correctly in a Unix/Solaris System?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2009/03/how-to-set-time-zone-tz-correctly-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4FRH49fSp7ImA9WxVWE0o.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-7243399593121580654</id><published>2009-02-23T16:45:00.002+08:00</published><updated>2009-02-23T16:48:35.065+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-23T16:48:35.065+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="informix" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><title>How to solve error "Informix -567: Cannot write sorted rows"?</title><content type="html">Try to get the related ISAM error (Follow &lt;a href="http://abtj.blogspot.com/2008/07/how-to-enable-informix-isamrsam-error.html"&gt;this&lt;/a&gt; for JDBC). If it is "2: No such file or directory", look for your DBSPACETEMP or PSORT_DBTEMP value (via &lt;span style="font-family:courier new;"&gt;onstat -g env&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;onstat -c&lt;/span&gt;). Ensure the folder points by DBSPACETEMP or PSORT_DBTEMP exists.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-7243399593121580654?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/CMfwgI7tpPc" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=7243399593121580654" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7243399593121580654?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7243399593121580654?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/CMfwgI7tpPc/how-to-solve-error-informix-567-cannot.html" title="How to solve error &quot;Informix -567: Cannot write sorted rows&quot;?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2009/02/how-to-solve-error-informix-567-cannot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YNQn46cCp7ImA9WxRWFkQ.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-6585143337621238115</id><published>2008-11-03T15:53:00.003+08:00</published><updated>2008-11-03T15:59:53.018+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-03T15:59:53.018+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="informix" /><title>How To Check Is Your Informix Server Shutdown Gracefully?</title><content type="html">Compare the first set of Informix log:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;20:28:34 Checkpoint Completed: duration was 1 seconds.&lt;br /&gt;20:28:34 Checkpoint loguniq 1, logpos 0xd40018, timestamp: 0xf638&lt;br /&gt;20:28:34 Maximum server connections 1&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;20:28:35 IBM Informix Dynamic Server Stopped.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;20:28:36 IBM Informix Dynamic Server Started.&lt;br /&gt;&lt;br /&gt;Sat Oct 11 20:28:36 2008&lt;br /&gt;&lt;br /&gt;20:28:36 Event alarms enabled. ALARMPROG = '/usr/informix/etc/log_full.sh'&lt;br /&gt;20:28:36 Booting Language &lt;c&gt;from module &lt;&gt;&lt;br /&gt;20:28:36 Loading Module &lt;cnull&gt;&lt;br /&gt;20:28:36 Booting Language &lt;builtin&gt;from module &lt;&gt;&lt;br /&gt;20:28:36 Loading Module &lt;builtinnull&gt;&lt;br /&gt;20:28:41 DR: DRAUTO is 0 (Off)&lt;br /&gt;20:28:41 IBM Informix Dynamic Server Version 10.00.UC7 Software Serial Number AAA#B000000&lt;br /&gt;20:28:43 IBM Informix Dynamic Server Initialized -- Shared Memory Initialized.&lt;br /&gt;&lt;br /&gt;20:28:43 Physical Recovery Started at Page (1:2283).&lt;br /&gt;20:28:43 Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored.&lt;br /&gt;20:28:43 Logical Recovery Started.&lt;br /&gt;20:28:43 10 recovery worker threads will be started.&lt;br /&gt;20:28:46 Logical Recovery has reached the transaction cleanup phase.&lt;br /&gt;20:28:46 Logical Recovery Complete.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;20:28:46 Dataskip is now OFF for all dbspaces&lt;br /&gt;20:28:47 Checkpoint Completed: duration was 0 seconds.&lt;br /&gt;20:28:47 Checkpoint loguniq 1, logpos 0xd41018, timestamp: 0xf648&lt;br /&gt;&lt;br /&gt;20:28:47 Maximum server connections 0&lt;br /&gt;20:28:47 On-Line Mode&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;and second set of log:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;19:11:22 Maximum server connections 39&lt;br /&gt;19:16:22 Fuzzy Checkpoint Completed: duration was 0 seconds, 4 buffers not flushed.&lt;br /&gt;19:16:22 Checkpoint loguniq 5, logpos 0x2c63080, timestamp: 0x4958f6&lt;br /&gt;&lt;br /&gt;19:16:22 Maximum server connections 39&lt;br /&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;No stopped message listed. The engine did not shutdown cleanly.&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;19:23:37 IBM Informix Dynamic Server Started.&lt;br /&gt;&lt;br /&gt;Tue Oct 21 19:23:39 2008&lt;br /&gt;&lt;br /&gt;19:23:39 Event alarms enabled. ALARMPROG = '/usr/informix/etc/log_full.sh'&lt;br /&gt;19:23:40 Booting Language &lt;c&gt;from module &lt;&gt;&lt;br /&gt;19:23:40 Loading Module &lt;cnull&gt;&lt;br /&gt;19:23:40 Booting Language &lt;builtin&gt;from module &lt;&gt;&lt;br /&gt;19:23:40 Loading Module &lt;builtinnull&gt;&lt;br /&gt;19:23:56 DR: DRAUTO is 0 (Off)&lt;br /&gt;19:23:56 IBM Informix Dynamic Server Version 10.00.UC7 Software Serial Number AAA#B000000&lt;br /&gt;19:23:59 IBM Informix Dynamic Server Initialized -- Shared Memory Initialized.&lt;br /&gt;&lt;br /&gt;19:23:59 Physical Recovery Started at Page (1:4321).&lt;br /&gt;19:23:59 Physical Recovery Complete: 0 Pages Examined, 0 Pages Restored.&lt;br /&gt;19:23:59 Logical Recovery Started.&lt;br /&gt;19:23:59 10 recovery worker threads will be started.&lt;br /&gt;19:24:02 Logical Recovery has reached the transaction cleanup phase.&lt;br /&gt;19:24:02 Logical Recovery Complete.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;21 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;19:24:04 Dataskip is now OFF for all dbspaces&lt;br /&gt;19:24:04 (11) connection rejected - no calls allowed for sqlexec&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;19:24:04 listener-thread: err = -27002: oserr = 0: errstr = : No connections are allowed in quiescent mode.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;19:24:04 (13) connection rejected - no calls allowed for sqlexec&lt;br /&gt;19:24:04 listener-thread: err = -27002: oserr = 0: errstr = : No connections are allowed in quiescent mode.&lt;br /&gt;&lt;br /&gt;19:24:05 Checkpoint Completed: duration was 1 seconds.&lt;br /&gt;19:24:05 Checkpoint loguniq 5, logpos 0x2c69018, timestamp: 0x4959d3&lt;br /&gt;&lt;br /&gt;19:24:05 Maximum server connections 0&lt;br /&gt;19:24:05 On-Line Mode&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The first one came right to online mode in 11 seconds. If you look at the log you will see the engine was stopped right before restarting it. When the engine is stopped, all transactions are cleaned up. They are either rolled back or committed and the physical log is also cleared out. If you look at the second startup, there was &lt;strong&gt;no clean shutdown&lt;/strong&gt;, This was due to someone &lt;strong&gt;killing the oninit process or perhaps the OS getting rebooted&lt;/strong&gt;. Regardless the engine was still performing work. When the engine was restarted, it discovered that there were open transactions that needed to be dealt with . This explains the &lt;strong&gt;additional time it took to come online&lt;/strong&gt;. The 27002 errors were due to users trying to connect before the engine was ready for them. The engine is working as designed.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-6585143337621238115?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/pYdXHJLntxQ" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=6585143337621238115" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6585143337621238115?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6585143337621238115?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/pYdXHJLntxQ/how-to-check-is-your-informix-server.html" title="How To Check Is Your Informix Server Shutdown Gracefully?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2008/11/how-to-check-is-your-informix-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQHQHYyeip7ImA9WxdUE00.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-7751620363548618448</id><published>2008-07-29T11:52:00.004+08:00</published><updated>2008-07-29T12:05:31.892+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-29T12:05:31.892+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="informix" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><category scheme="http://www.blogger.com/atom/ns#" term="jdbc" /><title>How to enable Informix ISAM/RSAM error in JDBC?</title><content type="html">You will not able to get Informix RSAM / ISAM error with normal SQLException. ISAM error is important to find the real database problem. For example, if an SQLCODE message says that a table cannot be created, the RSAM message states the reason, which might be insufficient disk space. You need to get the nested/chained exception via SQLException.getNextException(). Code example is at &lt;a href="http://exampledepot.com/egs/java.sql/GetSqlException.html"&gt;Java Developers Almanac&lt;/a&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-7751620363548618448?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/m06xSOyWKEM" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=7751620363548618448" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7751620363548618448?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7751620363548618448?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/m06xSOyWKEM/how-to-enable-informix-isamrsam-error.html" title="How to enable Informix ISAM/RSAM error in JDBC?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2008/07/how-to-enable-informix-isamrsam-error.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EAQXo-eSp7ImA9WxZQEEk.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-4820861722933244389</id><published>2008-02-15T09:53:00.003+08:00</published><updated>2008-02-15T10:14:00.451+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-15T10:14:00.451+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="fun" /><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><title>When you should give up on Facebook?</title><content type="html">You should give up on Facebook when you getting some 8,000 requests per day like &lt;a href="http://blogs.wsj.com/biztech/2008/02/12/bill-gates-quits-facebook/"&gt;Bill Gates&lt;/a&gt;. Bill Gates has stopped using it because he was inundated with friend requests, so stop to &lt;a href="http://www.facebook.com/s.php?q=bill+gates&amp;amp;n=50431654&amp;amp;k=400000000010&amp;amp;init=r"&gt;add him as friend&lt;/a&gt;. Yesterday I was still able to check his friends as View Friends link was there (It is good to know who he has added). He has friends about 120 something count. However, he just disable it recently. Maybe is good I should cache it yesterday. :)&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-4820861722933244389?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/111sIDz5mX4" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=4820861722933244389" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/4820861722933244389?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/4820861722933244389?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/111sIDz5mX4/when-you-should-give-up-on-facebook.html" title="When you should give up on Facebook?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2008/02/when-you-should-give-up-on-facebook.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4BSX48eip7ImA9WB9XFE4.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-2329876440313180567</id><published>2007-11-07T19:10:00.000+08:00</published><updated>2007-11-07T19:12:38.072+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-07T19:12:38.072+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="klocwork" /><title>How to refer/get info for a Klocwork code problems, security vulnerabilities category easily?</title><content type="html">If you run Klocwork in Eclipse, you can click the Help button (Question button) in InForce Error Details view/window (right upper corner by default). By doing this, you do not need to refer to separate Klocwork manual pdf file.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-2329876440313180567?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/eoc2GmRlMwc" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=2329876440313180567" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/2329876440313180567?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/2329876440313180567?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/eoc2GmRlMwc/how-to-referget-info-for-klocwork-code.html" title="How to refer/get info for a Klocwork code problems, security vulnerabilities category easily?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/11/how-to-referget-info-for-klocwork-code.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQDRXc5eip7ImA9WB9TEU0.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-1406962183990137880</id><published>2007-09-18T14:10:00.000+08:00</published><updated>2007-09-18T17:06:14.922+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-18T17:06:14.922+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="java 5" /><category scheme="http://www.blogger.com/atom/ns#" term="bug" /><category scheme="http://www.blogger.com/atom/ns#" term="java 6" /><category scheme="http://www.blogger.com/atom/ns#" term="memory" /><category scheme="http://www.blogger.com/atom/ns#" term="fix" /><title>Famous Java Concurrent Library Memory Leak Bug</title><content type="html">The famous Java concurrent library memory leak bug: &lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6460501"&gt;6460501 Synchronizer timed acquire still leaks memory&lt;/a&gt; is fixed and backported to &lt;a href="http://java.sun.com/j2se/1.5.0/ReleaseNotes.html"&gt;1.5.0_12&lt;/a&gt; and &lt;a href="http://java.sun.com/javase/6/webnotes/ReleaseNotes.html"&gt;1.6.0_02&lt;/a&gt;. You should upgrade your Java version if you use Java concurrent library. The test code now does not show OOME on iteration.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;D:\&gt;java -showversion -Xmx16m -esa -ea Leak6&lt;br /&gt;java version "1.6.0_02"Java(TM) SE Runtime Environment (build 1.6.0_02-b05)Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)&lt;br /&gt;&lt;br /&gt;Free: 4996912&lt;br /&gt;Memory used: 70104&lt;br /&gt;D:\&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-1406962183990137880?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/H_ffbd6r4ss" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=1406962183990137880" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/1406962183990137880?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/1406962183990137880?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/H_ffbd6r4ss/famous-java-concurrent-library-memory.html" title="Famous Java Concurrent Library Memory Leak Bug" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/09/famous-java-concurrent-library-memory.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcBQXY8fCp7ImA9WB5aGU4.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-3874814419040377092</id><published>2007-09-16T16:37:00.000+08:00</published><updated>2007-09-16T16:57:30.874+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-16T16:57:30.874+08:00</app:edited><title>Google Reader Search and Google Gear</title><content type="html">If you are unable to find/user search text box under Google Reader in Firefox, you can disable Google Gear plugin/extension (Tools -&gt; Add-ons -&gt; Google Gear -&gt; Disable) and restart your Firefox. You do not need to uninstall Google Gear. No problem is reported for IE 7.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-3874814419040377092?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/FU5Hy03YPSg" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=3874814419040377092" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3874814419040377092?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3874814419040377092?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/FU5Hy03YPSg/google-reader-search-and-google-gear.html" title="Google Reader Search and Google Gear" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/09/google-reader-search-and-google-gear.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QMQXw9fip7ImA9WB5aFkU.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-6601937191693006134</id><published>2007-09-13T13:57:00.000+08:00</published><updated>2007-09-13T21:16:20.266+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-13T21:16:20.266+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="plugin" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="klocwork" /><title>Eclipse and Klocwork Developer Plugin</title><content type="html">If you ever see the below error when you try to run Klocwork InForce for Eclipse plugin (version 7.0) in Windows environment, &lt;blockquote&gt;&lt;p&gt;Cannot load profile file: unknown protocol: c&lt;br /&gt;Error:InforceJava: Exiting with error: Error during loading checkers xml file: unknown protocol: c&lt;br /&gt;Error: cannot parse error report.&lt;/p&gt;&lt;p&gt;OR&lt;/p&gt;&lt;p&gt;Cannot load profile file: unknown protocol: d&lt;br /&gt;Error:InforceJava: Exiting with error: Error during loading checkers xml file: unknown protocol: d&lt;br /&gt;Error: cannot parse error report. &lt;/p&gt;&lt;p&gt;etc&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;try to move your Eclipse directory to root (C:\ or D:\) instead of subdirectory (C:\Program Files, D:\Program Files etc). It should solve the problem.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-6601937191693006134?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/YYJkQ5Z3Kpk" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=6601937191693006134" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6601937191693006134?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6601937191693006134?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/YYJkQ5Z3Kpk/eclipse-and-klocwork.html" title="Eclipse and Klocwork Developer Plugin" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/09/eclipse-and-klocwork.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MERHc7cSp7ImA9WB5aEkQ.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-8591172735211147943</id><published>2007-09-09T08:02:00.000+08:00</published><updated>2007-09-09T08:56:45.909+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-09T08:56:45.909+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sun" /><category scheme="http://www.blogger.com/atom/ns#" term="green_ui" /><category scheme="http://www.blogger.com/atom/ns#" term="gadget" /><category scheme="http://www.blogger.com/atom/ns#" term="competitor" /><category scheme="http://www.blogger.com/atom/ns#" term="iphone" /><category scheme="http://www.blogger.com/atom/ns#" term="rival" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>iPhone™ idea in 15 years ago?</title><content type="html">I have just uploaded a video from &lt;a href="http://blogs.sun.com/jag/entry/the_green_ui"&gt;James Gosling's blog&lt;/a&gt; to Youtube. It shows Sun has a similar finger touch sensitive UI project in year 1992. &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Note: I did not contact James Gosling about posting this video to Youtube. The original video is in mpeg format with file size 141MB and it took me awhile to watch the full video. Before I upload to Youtube, I have to convert it to another format to make it smaller than 100MB file size (Youtube set file size limit to 100MB). I believe this is a good video to be shared and James Gosling is busy to do this. Hope father of Java does not mind to let us know some history about this project easier (in streaming video).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="350" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fMT0vPXMNoU"&gt;&lt;embed src="http://www.youtube.com/v/fMT0vPXMNoU" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-8591172735211147943?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/AdycHR0jpCM" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=8591172735211147943" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/8591172735211147943?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/8591172735211147943?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/AdycHR0jpCM/iphone-idea-in-15-years-ago.html" title="iPhone™ idea in 15 years ago?" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/09/iphone-idea-in-15-years-ago.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UGQH8yfyp7ImA9WB5XGU4.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-4171058019655320534</id><published>2007-07-20T20:43:00.000+08:00</published><updated>2007-07-20T21:47:01.197+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-07-20T21:47:01.197+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="profiler" /><category scheme="http://www.blogger.com/atom/ns#" term="java 6" /><category scheme="http://www.blogger.com/atom/ns#" term="memory" /><title>How To Solve "management agent is not enabled" Problem for JConsole</title><content type="html">JConsole from JDK 6 supports dynamic attach capability, this means it is able to attach any running Java application which does not need to start with -Dcom.sun.management.jmxremote option. However, you may not able to attach a running Java process because of "The management agent is not enabled on this process" error. To solve this, just create a new temporary directory (e.g. C:\tmp) and points your TMP environment to there. (Control Panel -&gt; System -&gt; Advanced -&gt; Environment Variables). Restart your Java application and now your JConsole should be able to attach it now. For more troubleshooting tip, you may read &lt;a href="http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole"&gt;Daniel Fuchs Blogs&lt;/a&gt; and &lt;a href="http://forum.java.sun.com/thread.jspa?threadID=730397&amp;amp;tstart=150"&gt;Sun Forum&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-4171058019655320534?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/Estd3DsJCJs" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=4171058019655320534" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/4171058019655320534?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/4171058019655320534?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/Estd3DsJCJs/how-to-solve-management-agent-is-not.html" title="How To Solve &quot;management agent is not enabled&quot; Problem for JConsole" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/07/how-to-solve-management-agent-is-not.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8BQns9eSp7ImA9WB5SFkQ.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-3559523252258206793</id><published>2007-06-13T08:42:00.000+08:00</published><updated>2007-06-13T09:07:33.561+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-06-13T09:07:33.561+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="guice" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><category scheme="http://www.blogger.com/atom/ns#" term="links" /><title>Google Guice Links and Resources</title><content type="html">&lt;div style="text-align: left;"&gt;Here are some useful links and resources for Google Guice, besides its &lt;a href="http://code.google.com/p/google-guice/"&gt;official site&lt;/a&gt; where you can find its Javadocs, user's guide etc:&lt;br /&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Official slides in pdf &lt;a href="http://google-guice.googlecode.com/files/Java%20on%20Guice%20-%20Developer%20Day%20Slides.pdf"&gt;01&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Official slides in pdf &lt;a href="http://google-guice.googlecode.com/files/JavaOnGuice20070426.pdf"&gt;02&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=x_NpraeC3tk"&gt;Youtube video&lt;/a&gt; in Google Developer Day Beijing, using slide 01&lt;/li&gt;&lt;li&gt;&lt;a href="http://video.google.com/videoplay?docid=2948853912335655747&amp;amp;q=user%3A%22Google+engEDU%22"&gt;Presentation video&lt;/a&gt; in OSS Speaker Series Google Video, using slide 02&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://best-practice-software-engineering.blogspot.com/2007/04/tech-dependency-injection-with-guice.html"&gt;Blog article&lt;/a&gt; from Software Engineering - Best Practices&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-3559523252258206793?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/zmlX6Isb9XU" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=3559523252258206793" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3559523252258206793?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3559523252258206793?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/zmlX6Isb9XU/google-guice-links-and-resources.html" title="Google Guice Links and Resources" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/06/google-guice-links-and-resources.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUGRXw5fip7ImA9WBFVE0U.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-3091109986565566756</id><published>2007-04-12T21:00:00.000+08:00</published><updated>2007-04-12T21:23:44.226+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-04-12T21:23:44.226+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><title>JUnit 4.3 and Primitive Array</title><content type="html">Finally, the below simple primitive array test case has passed with JUnit 4.3&lt;br /&gt;&lt;blockquote&gt;int[] intArr00 = {1};&lt;br /&gt;int[] intArr01 = {1};&lt;br /&gt;assert&lt;span style="color:#ff0000;"&gt;Array&lt;/span&gt;Equals(intArr00, intArr01); &lt;/blockquote&gt;If you use Eclipse IDE, you need not upgrade the internal JUnit jar, just include the JUnit 4.3 jar in your build path and remove the default JUnit jar (Eclipse 3.2 come with 4.1 JUnit jar)&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-3091109986565566756?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/oQ3eJYnfwX4" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=3091109986565566756" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3091109986565566756?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/3091109986565566756?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/oQ3eJYnfwX4/junit-43-and-primitive-array.html" title="JUnit 4.3 and Primitive Array" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/04/junit-43-and-primitive-array.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cDSH07eSp7ImA9WBFXEUU.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-8310947965990655652</id><published>2007-03-18T07:46:00.000+08:00</published><updated>2007-03-18T10:31:19.301+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-03-18T10:31:19.301+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="java 5" /><category scheme="http://www.blogger.com/atom/ns#" term="profiler" /><category scheme="http://www.blogger.com/atom/ns#" term="java 6" /><category scheme="http://www.blogger.com/atom/ns#" term="memory" /><title>Java Profiler and Java/JDK 6/1.6</title><content type="html">In many cases, if your Java profiler (mine is IBM Rational Purify 7 for Windows) does not work as before after your upgrade your Java version to 6 and throws the below error&lt;br /&gt;&lt;blockquote&gt;FATAL ERROR: JVMPI, an experimental interface, is no longer supported.&lt;br /&gt;Please use the supported interface: the JVM Tool Interface (JVM TI).&lt;br /&gt;&lt;/blockquote&gt;This is because in JDK 6, Virtual Machine Tool Interface (JVM TI) has replaced Java Virtual Machine Profiler Interface (JVMPI) and the Java Virtual Machine Debug Interface (JVMDI). See Sun official note at &lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/jvmti/"&gt;here&lt;/a&gt;. The workaround is to install JRE/JDK 5 and set your Java environment (JAVA_HOME) and path (use java -version to check which java version your are using) before bringing up your Java application with your Java profiler.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-8310947965990655652?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/Um-EIyVZH60" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=8310947965990655652" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/8310947965990655652?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/8310947965990655652?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/Um-EIyVZH60/java-profiler-and-javajdk-616.html" title="Java Profiler and Java/JDK 6/1.6" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/03/java-profiler-and-javajdk-616.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQHRH87eyp7ImA9WBFRGEQ.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-5739298362862595640</id><published>2007-03-03T12:10:00.000+08:00</published><updated>2007-03-03T12:32:15.103+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-03-03T12:32:15.103+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="java 5" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="informix" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><category scheme="http://www.blogger.com/atom/ns#" term="jdbc" /><title>Return Auto Increment field from Informix Database</title><content type="html">If you would like to get auto increment field in database after an INSERT statement, you may use Statement.getGeneratedKeys(), which returns an ResultSet in JDK 1.4 and above. You may need to check do your JDBC driver and database support it through DatabaseMetaData.supportsGetGeneratedKeys() method. For Informix Dynamic Server (IDS) it is only supported by its JDBC 3.00 driver and IDS 10 and later.&lt;br /&gt;&lt;br /&gt;My production database is IDS version 9.4. Thus I can't use Statement.getGeneratedKeys(), and have to use vendor based solution: IfmxStatement.getSerial() which return int (Read &lt;a href="http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jdbc.doc/jdbc118.htm"&gt;here&lt;/a&gt; for more). Note that the return type of offical JDBC interface is ResultSet and IDS specific is int.&lt;br /&gt;&lt;br /&gt;If your driver and/or database does not support both of the above, you can try this solution: Add a timestamp column with a unique index . Before you insert a new record, set its&lt;br /&gt;timestamp to now. After inserting you can select the record by its timestamp and find out its&lt;br /&gt;autogenerated key. If you like, you could then update the record by setting the timestamp to null. (suggestion by &lt;a href="http://forum.java.sun.com/profile.jspa?userID=395874"&gt;DrLaszloJamf&lt;/a&gt; in &lt;a href="http://forum.java.sun.com/thread.jspa?threadID=500847&amp;amp;messageID=2369014"&gt;Sun Forum&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-5739298362862595640?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/o8bg8pLezeE" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=5739298362862595640" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/5739298362862595640?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/5739298362862595640?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/o8bg8pLezeE/return-auto-increment-field-from.html" title="Return Auto Increment field from Informix Database" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/03/return-auto-increment-field-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAMRH07cCp7ImA9WBFTFUQ.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-5503645487515290635</id><published>2007-02-04T19:31:00.000+08:00</published><updated>2007-02-04T20:06:25.308+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-02-04T20:06:25.308+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java 5" /><category scheme="http://www.blogger.com/atom/ns#" term="test" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><title>Working Way To Test Primitive Array</title><content type="html">I have tried Andres's &lt;a href="http://ezmorph.sourceforge.net/"&gt;&lt;/a&gt;&lt;a href="http://ezmorph.sourceforge.net/"&gt;EZMorph&lt;/a&gt;. By using his &lt;a href="http://ezmorph.sourceforge.net/apidocs/net/sf/ezmorph/test/ArrayAssertions.html"&gt;ArrayAssertions&lt;/a&gt;, the below simple test case finally passed successfully.&lt;br /&gt;&lt;blockquote&gt;@Test&lt;br /&gt;public void intArr() {&lt;br /&gt; int[] intArr00 = {1};&lt;br /&gt; int[] intArr01 = {1};&lt;br /&gt; ArrayAssertions.assertEquals(intArr00, intArr01);&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;I have tested with my another test case that involves int array of 6 elements and it passed a well. If your test class only contains primitive array, you can just replace your import class &lt;span style="font-family:courier new;"&gt;import static org.testng.Assert.*;&lt;/span&gt; with &lt;span style="font-family:courier new;"&gt;import static net.sf.ezmorph.test.ArrayAssertions.*;&lt;/span&gt; without changing piece of your code.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-5503645487515290635?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/Rn4ngJXwnbY" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=5503645487515290635" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/5503645487515290635?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/5503645487515290635?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/Rn4ngJXwnbY/working-way-to-test-primitive-array.html" title="Working Way To Test Primitive Array" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/02/working-way-to-test-primitive-array.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcCQHk8fyp7ImA9WBFTFUU.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-7097583602344086421</id><published>2007-02-04T17:59:00.000+08:00</published><updated>2007-02-04T18:14:21.777+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-02-04T18:14:21.777+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="testng" /><category scheme="http://www.blogger.com/atom/ns#" term="vs" /><category scheme="http://www.blogger.com/atom/ns#" term="test" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><title>TestNG and JUnit Have The Same Bug in Primitive Array</title><content type="html">In my previous &lt;a href="http://abtj.blogspot.com/2007/01/beware-of-junits-assertequals-for.html"&gt;post&lt;/a&gt; about incorrect result for JUnit against primitive array type. I run the same test case with TestNG, it seems like it has the same wrong result as JUnit:&lt;br /&gt;&lt;br /&gt;Test case:&lt;br /&gt;&lt;blockquote&gt; @Test&lt;br /&gt;public void intArr() {&lt;br /&gt;int[] intArr00 = {1};&lt;br /&gt;int[] intArr01 = {1};&lt;br /&gt;assertEquals(intArr00, intArr01);&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Test result:&lt;br /&gt;&lt;blockquote&gt;FAILED: intArr&lt;br /&gt;java.lang.AssertionError: expected:&lt;[I@127734f&gt; but was:&lt;[I@1037c71&gt;&lt;br /&gt;at SimpleTest.intArr(SimpleTest.java:18)&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://jroller.com/page/aalmiray" rel="nofollow"&gt;Andres Almiray&lt;/a&gt;                          suggested to try &lt;a href="http://ezmorph.sourceforge.net/apidocs/net/sf/ezmorph/test/ArrayAssertions.html"&gt;ArrayAssertions&lt;/a&gt; from EZMorph.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-7097583602344086421?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/kD1c1q1uq7Y" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=7097583602344086421" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7097583602344086421?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7097583602344086421?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/kD1c1q1uq7Y/testng-and-junit-have-same-bug-in.html" title="TestNG and JUnit Have The Same Bug in Primitive Array" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/02/testng-and-junit-have-same-bug-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcDSH09eSp7ImA9WBBaGEU.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-7355389221843355637</id><published>2007-01-27T12:08:00.000+08:00</published><updated>2007-01-27T16:37:59.361+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-01-27T16:37:59.361+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="logging" /><category scheme="http://www.blogger.com/atom/ns#" term="hack" /><title>Insert Current Class Name to Logger Without Hassle</title><content type="html">In &lt;a href="http://www.javaspecialists.co.za/archive/newsletter.do?issue=137"&gt;Creating Loggers DRY-ly&lt;/a&gt; by Dr. Heinz M. Kabutz, he mentioned typical copy-paste and (forgot to) modify error when creating a static logger variable, which cause logging is incorrect (wrong class name) and thereby confusing. He suggested 2 ways, first is to leave the static logger undefined, and initialize it in an initializer block. The other is to create a LoggerFactory that uses the method call stack (Throwable.getStackTrace()[1]) to determine from where it is being called. It saves works, and does not have few limitations as the first way. Sounds good, if you do not mind it is actually a trick, and a little bit overhead.&lt;br /&gt;&lt;br /&gt;IMHO, if you have a good IDE, and you do not want to use the above ways, you may manipulate your IDE auto-completion template/shortcut, if possible. In Eclipse, Window --&gt; Preferences --&gt; Java --&gt; Editor --&gt; Templates, create a new template with the below name qlogger, and patterns:&lt;br /&gt;&lt;br /&gt;private static final Logger logger = Logger.getLogger(${primary_type_name}.class.getName());&lt;br /&gt;${cursor}&lt;br /&gt;&lt;br /&gt;Now, everytime for a new class that need to create logger variable, just type qlogger, then Ctrl+Space. The ${primary_type_name} will be replaced by the current file name. Of course, it won't work for other classes that exists in the same file that is not public, and it does not look like an advanced professional tip, but it works. :)&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-7355389221843355637?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/RxZcrQ5BMik" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=7355389221843355637" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7355389221843355637?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/7355389221843355637?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/RxZcrQ5BMik/insert-current-class-name-to-logger.html" title="Insert Current Class Name to Logger Without Hassle" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/01/insert-current-class-name-to-logger.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cHR3w7fip7ImA9WBBaE0s.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-4251922337581926346</id><published>2007-01-20T22:50:00.000+08:00</published><updated>2007-01-21T14:30:36.206+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-01-21T14:30:36.206+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="net beans" /><category scheme="http://www.blogger.com/atom/ns#" term="test" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><title>JUnit 4 and NetBeans IDE 5.0</title><content type="html">According to article &lt;a href="http://junit.netbeans.org/junit4/first-try.html"&gt;Notes about Integrating JUnit4 into NetBeans&lt;/a&gt; in netbeans.org, the author said  the JUnit output window for a test method with name &lt;span style="font-family: courier new;"&gt;howTheAddGoes&lt;/span&gt; had an empty name and not &lt;span style="font-family: courier new;"&gt;howTheAddGoes&lt;/span&gt;. I believe it is because the embedded Ant in NetBeans 5.0 still does not support JUnit 4. In my &lt;a href="http://abtj.blogspot.com/2006/12/from-ugly-junit-4-to-beautyful-junit-4.html"&gt;first post&lt;/a&gt;, I faced the same problem (the test case name is unknown) but it is resolved after I have upgraded Ant to 1.7. If you are a NetBeans user, let me know if this problem is resolved in NetBeans 5.5 (or its beta 6)?&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-4251922337581926346?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/p33e1a3vM0M" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=4251922337581926346" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/4251922337581926346?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/4251922337581926346?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/p33e1a3vM0M/junit-4-and-netbeans-ide-50.html" title="JUnit 4 and NetBeans IDE 5.0" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/01/junit-4-and-netbeans-ide-50.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIHQX85fip7ImA9WBFQFEg.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-8650773729037327877</id><published>2007-01-20T10:01:00.000+08:00</published><updated>2007-03-09T23:18:50.126+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-03-09T23:18:50.126+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="test" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><category scheme="http://www.blogger.com/atom/ns#" term="links" /><title>Some Useful JUnit 4 Links</title><content type="html">Here are some useful JUnit 4 links/resources:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Basic:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.codign.com/pdf/junit4.pdf"&gt;JUnit 4.0 cheat sheet/reference card&lt;/a&gt; in pdf format by Codign Software.&lt;br /&gt;&lt;a href="http://junit.sourceforge.net/doc/cookbook/cookbook.htm"&gt;JUnit Cookbook&lt;/a&gt;&lt;br /&gt;- official and short JUnit 4 cookbook.&lt;br /&gt;&lt;a href="http://www.instrumentalservices.com/index.php?option=com_content&amp;task=view&amp;amp;id=45&amp;Itemid=52"&gt;     JUnit 4.0 in 10 minutes&lt;/a&gt; by Gunjan Doshi&lt;br /&gt;- A simple and quite comprehensive tutorial&lt;br /&gt;&lt;a href="http://today.java.net/pub/a/today/2006/12/07/junit-reloaded.html"&gt;JUnit Reloaded&lt;/a&gt; in Jave.net by Ralf Stuckert&lt;br /&gt;- read this if you have experience in JUnit 3.8.x.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Intermediate&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;a href="http://developers.sun.com/learning/javaoneonline/2006/tools/TS-1580.html"&gt;JUnit 4 and Java SE 5: Better Testing by Design&lt;/a&gt; in JavaOne, by Kent Beck and Alberto Savoia&lt;br /&gt;- for both new and experienced JUnit user. &lt;span style="font-style: italic;"&gt;(Note: Sun SDN login needed)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.junitext.org/"&gt;JUnit 4 Extension&lt;/a&gt;&lt;br /&gt;- added few new annotations like &lt;code&gt;@Prerequisite&lt;span style="font-family:Georgia,serif;"&gt; &lt;/span&gt;&lt;/code&gt;(ignore tests based on conditions), &lt;code&gt;@Category &lt;/code&gt;(filter and sort tests based on a Category) etc&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-junit4/"&gt;Jump into JUnit 4&lt;code&gt;&lt;/code&gt;&lt;/a&gt; in IBM developerWorks, by &lt;a href="https://www6.software.ibm.com/developerworks/education/j-junit4/authors.html"&gt;Andrew Glover&lt;/a&gt; &lt;span style="font-weight: bold;"&gt;(Updated 09 Mar 07)&lt;/span&gt;&lt;br /&gt;- To understand the major changes to JUnit 4, as well as being familiar with features such as exception testing, parametric testing, and the new flexible fixture model. (IBM Id login is required)&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Here is my &lt;a href="http://del.icio.us/cklee75/junit_4"&gt;del.icio.us&lt;/a&gt; for the above links.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Common:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.codign.com/pdf/junitbprac.pdf"&gt;Unit Testing Recommended Best Practices&lt;/a&gt; in pdf by Codign Software.&lt;br /&gt;- common for all unit test.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-8650773729037327877?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/t8S1iFPJZ9c" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=8650773729037327877" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/8650773729037327877?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/8650773729037327877?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/t8S1iFPJZ9c/some-useful-junit-4-links.html" title="Some Useful JUnit 4 Links" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/01/some-useful-junit-4-links.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUCRn86fCp7ImA9WBBbFk0.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-9001875626384741868</id><published>2007-01-12T18:58:00.000+08:00</published><updated>2007-01-12T19:11:07.114+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-01-12T19:11:07.114+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="test" /><category scheme="http://www.blogger.com/atom/ns#" term="junit" /><title>Beware Of JUnit's assertEquals for Primitive Array</title><content type="html">If you run the below JUnit test case&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;       int[] intArr00 = {1};&lt;br /&gt;       int[] intArr01 = {1};&lt;br /&gt;       assertEquals(intArr00, intArr01);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;It looks simple, and should pass. However, it will throw AssertionFailedError. Why? It is because the compiler calls assertEquals(Object expected, Object actual) as array of primitive type is an Object. Since we do not overwrite the Object.equals(Object obj) method, so you are actually running:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;   public boolean equals(Object obj) {&lt;br /&gt;   return (this == obj);&lt;br /&gt;   }&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;intArr00 and intArr01 are two different references, thus it returns false. I have a method to return array of int, but now, I can't create a test case with official JUnit library. Hope I have time to look at some extension library of JUnit.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-9001875626384741868?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/jXEi9pgmwzw" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=9001875626384741868" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/9001875626384741868?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/9001875626384741868?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/jXEi9pgmwzw/beware-of-junits-assertequals-for.html" title="Beware Of JUnit's assertEquals for Primitive Array" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/01/beware-of-junits-assertequals-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYBR3o8eyp7ImA9WBBbFU4.&quot;"><id>tag:blogger.com,1999:blog-26670725.post-6047452830881090637</id><published>2007-01-11T23:18:00.000+08:00</published><updated>2007-01-11T23:42:36.473+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-01-11T23:42:36.473+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="blogger" /><category scheme="http://www.blogger.com/atom/ns#" term="tip" /><category scheme="http://www.blogger.com/atom/ns#" term="blogspot" /><category scheme="http://www.blogger.com/atom/ns#" term="web" /><category scheme="http://www.blogger.com/atom/ns#" term="hack" /><title>Some Useful Tips After You Removed Blogger NavBar</title><content type="html">As in my &lt;a href="http://abtj.blogspot.com/2007/01/remove-navbar-in-new-blogger.html"&gt;previous post&lt;/a&gt; about how to remove NavBar (navigation bar) in new Blogger/Blogspot, you will not see the bar anymore, as well as some useful link like New Post and Customize. To eliminate this problem, you can create a bookmark/favorite with URL as below&lt;br /&gt;&lt;br /&gt;    http://www2.blogger.com/post-create.g?blogID=xxxxxxx (for New Post)&lt;br /&gt;    http://www2.blogger.com/customize-template.g?blogID=xxxxxxx (for Customize)&lt;br /&gt;&lt;br /&gt;Replace xxxxxxx with your real blog id.&lt;br /&gt;&lt;br /&gt;A better way is,&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to &lt;a href="http://www.blogger.com"&gt;blogger.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Log in to your blogger account&lt;/li&gt;&lt;li&gt;Drag &amp; drop "New Post" to your Bookmarks Toolbar (Firefox) / Links (IE). &lt;a href="http://mozilla.gunnars.net/firefox_bookmarks_tutorial.html#Bookmark_Toolbar"&gt;How?&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Do the same for other link if you wish&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: italic;"&gt;Note: Each blog has different blog id even is under a same login/username.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-5975245645139345";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
//2006-12-30: http://abtj.blogspot.com/
google_ad_channel = "6304668894";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/26670725-6047452830881090637?l=abtj.blogspot.com'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AboutJ/~4/UZgaxUEahlY" height="1" width="1"/&gt;</content><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=26670725&amp;postID=6047452830881090637" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6047452830881090637?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/26670725/posts/default/6047452830881090637?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AboutJ/~3/UZgaxUEahlY/some-useful-tips-after-you-removed.html" title="Some Useful Tips After You Removed Blogger NavBar" /><author><name>CK Lee</name><uri>http://www.blogger.com/profile/18056808260815913916</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01160993978635170555" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://abtj.blogspot.com/2007/01/some-useful-tips-after-you-removed.html</feedburner:origLink></entry></feed>
