<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8955755</id><updated>2011-12-14T21:45:53.258-05:00</updated><category term='sqlserver'/><category term='eclipse'/><category term='ubuntu'/><category term='java'/><title type='text'>Dave's Code Blog</title><subtitle type='html'>What I'm coding for fun.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>96</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8955755.post-4958374019852958558</id><published>2011-07-05T18:09:00.000-04:00</published><updated>2011-07-05T18:09:21.802-04:00</updated><title type='text'>HP Laptop Headphone Fix</title><content type='html'>Love my HP Pavilion DV6 laptop, and love Ubuntu running on it, but found an issue with my headphone, that plugging into the jack didn't turn off the speakers. &amp;nbsp;Did some poking around, and found that adding:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;options snd-hda-intel model=hp-dv5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to my&amp;nbsp;&lt;i&gt;/etc/modprobe.d/alsa-base.conf&lt;/i&gt; took care of it. &amp;nbsp;There are other values for model that can solve issues with other machines. &amp;nbsp;For reference, &lt;i&gt;lspci&lt;/i&gt; reports:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for my audio card, and&amp;nbsp;&lt;i&gt;cat /proc/asound/card0/codec* | grep Codec&lt;/i&gt; reports:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Codec: IDT 92HD75B3X5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Codec: Intel IbexPeak HDMI&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for my codec(s).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-4958374019852958558?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/4958374019852958558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=4958374019852958558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/4958374019852958558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/4958374019852958558'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2011/07/hp-laptop-headphone-fix.html' title='HP Laptop Headphone Fix'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-2057820992765655541</id><published>2010-11-23T15:53:00.002-05:00</published><updated>2010-11-23T15:56:15.419-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlserver'/><title type='text'>SQL Server 2000 notes</title><content type='html'>A place for stuff that I don't want to forget.  (There's stuff I only do with it once a year, and I'm perpetually looking this stuff back up.)&lt;br /&gt;&lt;br /&gt;1) bcp.exe will let you dump a table at a time to a CSV file.  DTS absolutely sucks for the same task, as it's a stinkin' wizard, that doesn't remember what you did last time, etc., etc., blah blah freakin' blah.  You can at least script bcp with a .bat file, and have a record of what you did, for next time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-2057820992765655541?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/2057820992765655541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=2057820992765655541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/2057820992765655541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/2057820992765655541'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/11/sql-server-2000-notes.html' title='SQL Server 2000 notes'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-1901258692083192902</id><published>2010-11-18T13:12:00.002-05:00</published><updated>2010-12-03T09:06:00.881-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 10.10 Upgrade</title><content type='html'>&lt;span style="font-weight: bold;"&gt;SpongeBob (my laptop): 10.04 -&gt; 10.10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done, no issues yet, love the new font.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Patrick (downstairs desktop): 9.10 -&gt; 10.04 -&gt; 10.10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;9.10 to 10.4 went smoothly.&lt;br /&gt;&lt;br /&gt;10.4 to 10.10 wouldn't bring up X.  Poked around on forums, found "no screens found" message in /var/log/Xorg.0.log, moved xorg.conf out of /etc/X11, did "restart gdm" and it worked.  Rebooted, and it worked.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MrCrabs (Son's laptop): 9.10 -&gt; 10.04 -&gt; 10.10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done, no issues yet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(work laptop): 10.04 -&gt; 10.10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Screen started working again, wireless works on reboot (both were problems with 10.04).  alsamixer still doesn't retail settings over a reboot (which it hasn't done since at least 9.10, maybe 9.04).&lt;br /&gt;&lt;br /&gt;New problems:&lt;br /&gt;&lt;br /&gt;1) Audio cuts out in just a few minutes of use.&lt;br /&gt;&lt;br /&gt;2) CPU usage is up.  Looking at top, appears to be processes called kslowd000 and kslowd001.  Googled them, and apparently they're kernel daemons used for background processing (so as not to interfere with main CPU processing?).  Looking further, this might be related to my GPU, as others with kslowd issues were also using an Intel 855GM.&lt;br /&gt;&lt;br /&gt;Decided to reboot; didn't fix #2.  Decided to boot into 2.6.32-25 (was running 2.6.35, which is apparently when the kslowd problems started, at least for Ted T'so on the kernel mailing list).  Not only did kslowd stop showing up in top, but now problem #1, with the audit, seems to be fixed as well (quite possibly unrelated to #2, except by differing code between the two kernels).&lt;br /&gt;&lt;br /&gt;So, for now, will stay in 2.6.32, as it's nice to not need to schlep MP3's over to my phone to listen to music at work.  Will try out 2.6.36 when it comes down the pipe, probably.&lt;br /&gt;&lt;br /&gt;Update: went up to 2.6.35-23-generic, and it seems to have improved both issues.  Will keep this updated, but for now, I'm back up to 2.6.35.&lt;br /&gt;&lt;br /&gt;Another update: while my audio and CPU usage issues were better, laptop was locked up with a blank screen for the past two mornings when I came into work.  So I'm back to 2.6.32 for now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;(work desktop): 10.04 -&gt; 10.10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done, no issues yet.  Well, except for that odd thing with my 2nd HD coming up randomly as /dev/sda and /dev/sdc.  Fixed it by putting the drive's UUID in /etc/fstab.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-1901258692083192902?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/1901258692083192902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=1901258692083192902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/1901258692083192902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/1901258692083192902'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/11/ubuntu-1010-upgrade.html' title='Ubuntu 10.10 Upgrade'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-5251504824259305961</id><published>2010-08-20T08:00:00.001-04:00</published><updated>2010-11-18T16:58:02.852-05:00</updated><title type='text'>Bind for Logging</title><content type='html'>Talked to Rob and Nate, and both agree that to log internal web requests, setting up my own bind is the easy way to go, then set the router to set all internal machines to it via static dns on dhcp.&lt;br /&gt;&lt;br /&gt;Installing was a snap (straight out of Synaptic), and it just worked, right out of the box. Logging wasn't turned on, but that took 5 mins. Don't need logrotate, as bind9 logging has that built in. Manually, I wrote a cut/sort/uniq/grep script, but I didn't have mail installed, (or the brainpower left at end of day), so the script will have to wait briefly.&lt;br /&gt;&lt;br /&gt;I set the router's static DNS to this box, and by this morning, was getting requests from the XBox and Wii, as well as Wife's Macbook.&lt;br /&gt;&lt;br /&gt;I added an entry to my crontab to generate the filtered list, putting it into ~/bin (for no real good reason). Given the size of it, I'll probably generate it nightly, but only mail it out weekly, and just poke around with adding things to the grep filter.&lt;br /&gt;&lt;br /&gt;Installed first mailutils, then exim4, then mutt, then finally sendemail until the latter let me send email from the command line simply, without configuring an MTA. Configuring an MTA just isn't something I have the brainpower for tonight. Anyway, my ISP doesn't require authentication from within their network, so sendemail worked like a charm, after bzipping the file down, (apparently they have a size limit, or something?)&lt;br /&gt;&lt;br /&gt;So crontab is setup to mail the log out weekly, and we'll see how it goes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-5251504824259305961?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/5251504824259305961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=5251504824259305961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/5251504824259305961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/5251504824259305961'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/08/bind-for-logging.html' title='Bind for Logging'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-5153821428149616308</id><published>2010-08-19T08:00:00.002-04:00</published><updated>2010-11-23T15:49:37.981-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Kicking Ivy out of Eclipse</title><content type='html'>To make Ivy-less operation easier, I:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Removed all of the jars from my development project in Eclipse&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Created a directory (outside of the project)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Made symbolic links from that directory to my common jar path (i.e. "ln -s /usr/share/java/spring.jar ~/dist/project", etc.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Added all of the jars to my Eclipse project in one operation (by clicking Add External JARs and highlighting all of the jars in that dir)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Scripted the creation of the symlinks, and added the script to SVN.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;It might also be worth looking into how SVN handles symbolic links, which could make it feasible to add the symlinks into the projects as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-5153821428149616308?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/5153821428149616308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=5153821428149616308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/5153821428149616308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/5153821428149616308'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/08/kicking-ivy-out-of-eclipse.html' title='Kicking Ivy out of Eclipse'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-561146903288397456</id><published>2010-08-18T16:22:00.001-04:00</published><updated>2010-11-18T16:24:05.036-05:00</updated><title type='text'></title><content type='html'>Fixing a hosed GRUB&lt;br /&gt;&lt;br /&gt;Full details (and years of old fixes) at: &lt;a href="http://ubuntuforums.org/archive/index.php/t-24113.html"&gt;http://ubuntuforums.org/archive/index.php/t-24113.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ubuntu Karmic:&lt;br /&gt;&lt;br /&gt;make changes to partitions locations below&lt;br /&gt;boot from cd/usb/network/yomomma&lt;br /&gt;open terminal&lt;br /&gt;&lt;br /&gt;type:&lt;br /&gt;&lt;br /&gt;sudo mkdir /mnt/fixboot&lt;br /&gt;sudo mount -t ext4 /dev/sda5 /mnt/fixboot&lt;br /&gt;sudo mount -t proc non /mnt/fixboot/proc&lt;br /&gt;sudo mount -o bind /dev /mnt/fixboot/dev&lt;br /&gt;sudo chroot /mnt/fixboot /bin/bash&lt;br /&gt;sudo grub-install /dev/sda&lt;br /&gt;sudo update-grub&lt;br /&gt;sudo umount /mnt/fixboot/dev&lt;br /&gt;sudo umount /mnt/fixboot/proc&lt;br /&gt;sudo umount /mnt/fixboot&lt;br /&gt;reboot&lt;br /&gt;:D&lt;br /&gt;&lt;br /&gt;The first time around, it didn't find Windows, but after booting Ubuntu, ran update-grub, and it picked it up fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-561146903288397456?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/561146903288397456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=561146903288397456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/561146903288397456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/561146903288397456'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/08/fixing-hosed-grub-full-details-and.html' title=''/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-6584884475213568967</id><published>2010-08-17T08:00:00.001-04:00</published><updated>2010-11-18T16:19:39.486-05:00</updated><title type='text'>Rsync Notes</title><content type='html'>Couldn't get rsync to work. Message was "connection refused", among other things. Realized that rsyncd wasn't running on other box. Realized that RSYNC_ENABLE in /etc/default/rsync wasn't set. Set that.&lt;br /&gt;&lt;br /&gt;It then complained about a missing /etc/rsyncd.conf file. Did a locate for it, and found a sample one in /usr/share/doc/rsync/examples. Copied that into place, and tried again. rsyncd would start, and rsync on the other box then connected to it, but complained about a missing module (I think). So I copied lines that looked interesting out of the sample ("ftp") module, and created "home", which is what my old original command was looking for.&lt;br /&gt;&lt;br /&gt;That got me to a point where it would connect to the module, but was unable to read any of the files. Seems I added uid/gid lines, but left them set to nobody/nogroup, which didn't work so well. Changed them to my user/group, and things worked fine.&lt;br /&gt;&lt;br /&gt;Update: Nate suggests using ssh public keys and rsync -auv, instead of the rsync daemon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-6584884475213568967?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/6584884475213568967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=6584884475213568967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6584884475213568967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6584884475213568967'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/08/rsync-notes.html' title='Rsync Notes'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-9098188390671702921</id><published>2010-08-16T08:00:00.000-04:00</published><updated>2010-11-18T13:11:10.904-05:00</updated><title type='text'>Dia Hassles</title><content type='html'>Upgraded Ubuntu to 9.10, and Dia got upgraded to 0.97. This update included a change to the file format for associations elements, (which breaks tedia2sql.pl, which is fully unsupported/orphaned at this point), and apparently changed the default font, which skewed all of our diagrams.&lt;br /&gt;&lt;br /&gt;So I removed 0.97, and pulled down the 0.96 .debs from packages.ubuntu.com, and installed them, but then Ubuntu kept asking to upgrade them, since it saw 0.97 out there in Karmic. So, taking a page from my angel upgrade, I edited /var/lib/dpkg/status, and removed the three 0.96 dia entries from that, and now I have 0.96 installed, but Synaptic doesn't know about it, and doesn't ask to upgrade it. Hackish, but it appears to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-9098188390671702921?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/9098188390671702921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=9098188390671702921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/9098188390671702921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/9098188390671702921'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2010/11/dia-hassles.html' title='Dia Hassles'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-4958804185028838481</id><published>2009-12-30T10:41:00.005-05:00</published><updated>2010-11-23T15:50:02.312-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java and IBM 6400 Line Feeds</title><content type='html'>I've got a client with several IBM 6400 line printers, and I started out printing to them with code that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buf.append( stuff );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buf.append( "\n" );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So far, so good, until I print to a 2nd printer, which in some places double-spaces the printout, and in others, just gives line feeds.  So I ask them to send me a printout of the printer config, and it shows that the printer is in Proprinter Emulation mode, which has an AUTO LF setting that is enabled.  Okay, so I'm thinking I should be just sending carriage returns, and let it generate the line feeds.&lt;br /&gt;&lt;br /&gt;No good.  For whatever reason, when I just:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buf.append( stuff );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buf.append( "\r" );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to send just the CR, nothing comes out.  Just to say I've tried all the combinations, I change the code to:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buf.append( stuff );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buf.append( "\r\n" );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;expecting to get rid of my just-line-feed issue, but also expecting the whole report to be double-spaced, and to my surprise, it works.&lt;br /&gt;&lt;br /&gt;My guess is that Java was doing something with the line-end characters, doing me a favor when I didn't want it to, and being explicit with \r\n turned that off?  I don't know.  And because both printers are some distance away from my office, I didn't bother to get the folks at the 1st printer to send me their config, so I'm still guessing that they have emulation set to something with AUTO LF disabled.  Maybe next time I'm out there, I'll check...&lt;br /&gt;&lt;br /&gt;(Oh, and yeah, looks like I just managed to squeak in my one post to this blog for the year.  I've been making tech notes in Google Wave recently, so when that comes out of preview mode and integrates w/Blogger publicly, I should be reviving this blog somewhat...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-4958804185028838481?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/4958804185028838481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=4958804185028838481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/4958804185028838481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/4958804185028838481'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2009/12/java-and-ibm-6400-line-feeds.html' title='Java and IBM 6400 Line Feeds'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-3063001700859283938</id><published>2008-10-20T22:13:00.002-04:00</published><updated>2008-10-20T22:17:39.070-04:00</updated><title type='text'>CPOSC '08</title><content type='html'>Went yesterday to CPOSC, the Central Pennsylvania Open Source Conference.  There were three talks going on at any one time, and I attended talks on: Asterisk, Blender, Android, Drupal, MozDev, jQuery and O/S project participation.  All were at least good, and most were very good.  I was already planning to get into JS/jQuery, and Asterisk, and now I'm thinking about Android as well (although I'm apparently one of the few attendees not standing in line for a TMobile G1).&lt;br /&gt;&lt;br /&gt;Anyway, it was a day well spent, and I can't wait for CPOSC '09!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-3063001700859283938?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/3063001700859283938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=3063001700859283938' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/3063001700859283938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/3063001700859283938'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2008/10/cposc-08.html' title='CPOSC &apos;08'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-6368891952437001818</id><published>2008-09-13T08:49:00.004-04:00</published><updated>2008-09-13T10:17:57.528-04:00</updated><title type='text'>Javascript</title><content type='html'>Okay, every now and then I get to be embarrassed.  Many years ago (probably around 2001), I looked into Javascript, and only saw that it was a toy language, inconsistent between browsers (there were only two back then) and not worth learning.  (IIRC, I fell in love with Python shortly thereafter.)&lt;br /&gt;&lt;br /&gt;In my defense, a) there were only two browsers back then :), and b) JS was quite inconsistent between them (and possibly still is).  But I've spent a few hours recently looking at JS again, and I'm seeing that it &lt;span style="font-weight: bold;"&gt;*IS*&lt;/span&gt; a real language, every bit as much as Python.  And with add-ons like Firebug that provide a debugger and great visibility to what's going on in the browser, and jsUnit to provide unit testing for JS code, it's a full-fledged programming environment.&lt;br /&gt;&lt;br /&gt;And while at work, we've done quite a bit with JS that's centered on AJAX and UI, we've more recently put together some prototype stuff that's looking a lot more like a full fledged application, which looks quite interesting, and as I dive in, I may well get to be involved in that.&lt;br /&gt;&lt;br /&gt;Yup, I'm thinking it's time to shed some of my JS misconceptions, and join in the fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-6368891952437001818?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/6368891952437001818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=6368891952437001818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6368891952437001818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6368891952437001818'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2008/09/javascript.html' title='Javascript'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-8572610730636862363</id><published>2008-09-01T14:30:00.009-04:00</published><updated>2008-09-01T16:03:24.506-04:00</updated><title type='text'>DWL-520 Wireless Woes</title><content type='html'>Got a new machine that I'm trying to setup for MythTV.  Decided to put a wireless NIC into it, and ran into install problems.  Followed the directions at:&lt;br /&gt;&lt;br /&gt;https://help.ubuntu.com/community/WifiDocs/Device/DWL-520vE1&lt;br /&gt;&lt;br /&gt;then continued the process with the directions at:&lt;br /&gt;&lt;br /&gt;http://ubuntuforums.org/showthread.php?t=643467&lt;br /&gt;http://ubuntuforums.org/showthread.php?t=606861&lt;br /&gt;&lt;br /&gt;and still didn't succeed.  Figured I'd better make a note of it, in case I ever care to try again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-8572610730636862363?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/8572610730636862363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=8572610730636862363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/8572610730636862363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/8572610730636862363'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2008/09/dwl-520-wireless-woes.html' title='DWL-520 Wireless Woes'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-9118710048141969301</id><published>2008-06-27T12:55:00.002-04:00</published><updated>2010-11-23T15:50:51.684-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java Woes</title><content type='html'>Yes, I'm thinking back this day to the good old days of programming.  Back to my C++ days.  Back when, if a piece of code that you called didn't exist or wasn't available, it gave a nice, sensible link error and refused to create your executable.&lt;br /&gt;&lt;br /&gt;Yes, I'm in an "I hate Java" moment.&lt;br /&gt;&lt;br /&gt;We need to connect to a DB2 database.  This particular database insists on encrypted connections, and because it's an IBM database, (and because they can, I suppose), DB2 insists on having client apps use THEIR encryption algorithms.  Which either means using their Java runtime entirely, or messing with the /etc/java/security/java.security file in my Sun JRE install.  Yup, red flags are waving, buzzers are going off.  Danger, Will Robinson, danger!&lt;br /&gt;&lt;br /&gt;So I replace the entries in java.security with IBM's classes.  At this point, everything Java on my box stops working, complaining about not finding SHA-1 and/or MD5.  I mean, Eclipse won't save my source files, for crying out loud.  So I put the Sun stuff back, and add the IBM stuff at the end.  A sample command line program that connects to DB2 now works (as does Eclipse, once again), but the same code in Tomcat 5.5 doesn't work.  Gives error of "Prime size must be multiple of 64, and can only range from 512 to 1024".&lt;br /&gt;&lt;br /&gt;After poking around a good bit further, it finally dawns on my boss, who was also troubleshooting this, that not only do we need to specify the classes in java.security, but we also need to make 6 new jarfiles available on the classpath for Tomcat (and presumably every other Java app that uses that runtime).&lt;br /&gt;&lt;br /&gt;Which brings me back to my pining for the good old days.  The days when, if I forgot a library, I got a message saying "Dude, you forgot a library", not something completely orthogonal like the above "Prime size ..." hooey.&lt;br /&gt;&lt;br /&gt;I'm gonna go do something that makes sense, like C++.  Grrrr...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-9118710048141969301?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/9118710048141969301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=9118710048141969301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/9118710048141969301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/9118710048141969301'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2008/06/java-woes.html' title='Java Woes'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-6832473387644064148</id><published>2008-06-26T16:02:00.002-04:00</published><updated>2010-11-23T15:51:06.827-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Hardy Heron and My BCM4306</title><content type='html'>It seems like every iteration of Ubuntu breaks my wireless, and every iteration requires something new to fix it.  This iteration (Hardy Heron) requires the steps that can be found &lt;a href="http://ubuntuforums.org/showthread.php?t=766560&amp;amp;highlight=bcm4306"&gt;in this post on the Ubuntu Forums&lt;/a&gt;.  I hate that it breaks; I love it that the forums (almost) always have the answer waiting for me when I get there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-6832473387644064148?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/6832473387644064148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=6832473387644064148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6832473387644064148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6832473387644064148'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2008/06/hardy-heron-and-my-bcm4306.html' title='Hardy Heron and My BCM4306'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-7215113305591928498</id><published>2008-02-12T13:32:00.000-05:00</published><updated>2008-02-12T13:50:17.688-05:00</updated><title type='text'>Secure Wireless Proxy</title><content type='html'>After reading a &lt;a href="http://lifehacker.com/software/ssh/geek-to-live--encrypt-your-web-browsing-session-with-an-ssh-socks-proxy-237227.php"&gt;Lifehacker post&lt;/a&gt; a while back on more secure wireless browsing, I decided to setup an &lt;a href="http://ubuntu.wordpress.com/2006/12/08/ssh-tunnel-socks-proxy-forwarding-secure-browsing/"&gt;SSH Tunnel + SOCKS Proxy&lt;/a&gt; for Firefox, including (optionally) using &lt;a href="http://foxyproxy.mozdev.org/"&gt;FoxyProxy&lt;/a&gt; to make things easier.&lt;br /&gt;&lt;br /&gt;The short of it is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Use &lt;span style="font-style: italic;"&gt;"ssh -D 9999 user@server"&lt;/span&gt; to establish a connection to a remote server.&lt;/li&gt;&lt;li&gt;Use FoxyProxy to point to a SOCKS proxy on localhost.&lt;/li&gt;&lt;/ul&gt;The long of it is that the "-D" option causes ssh to setup a proxy server on your local box that redirects your browser requests to the remote box, then from the remote box out to the 'net.  All of your wireless http transmissions will be encrypted and hence unreadable by sneaky folks in the airport (or Panera's, or Starbucks, or wherever), and your browsing will be as secure as if you were sitting on the remote box.  (Not that that's secure by default, but it's at least not being broadcast all over your surroundings.)&lt;br /&gt;&lt;br /&gt;Using FoxyProxy in this case simply makes it easier to switch back and forth between proxied and direct connections if you need to.  FoxyProxy sits on the bottom toolbar in Firefox, and with a couple of clicks will let you switch between proxy setups (including a "no proxy" setup, if desired).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-7215113305591928498?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/7215113305591928498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=7215113305591928498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/7215113305591928498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/7215113305591928498'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2008/02/secure-wireless-proxy.html' title='Secure Wireless Proxy'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-1307312499877935644</id><published>2007-08-10T14:53:00.001-04:00</published><updated>2010-11-23T15:51:19.660-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlserver'/><title type='text'>SQL Server Timestamp Field</title><content type='html'>It's been so long since I've had a decent Microsoft rant, I guess it must just be time.  A while back, in a SQL Server database (don't laugh, the client insisted), I needed to have a timestamp for when a row is created.  Silly me, I actually looked through the data type list, saw "timestamp", and thought, "Hey, that must be a timestamp!".  Yeah, silly me.&lt;br /&gt;&lt;br /&gt;The timestamp type?  It isn't even a usable type.  It gets set whenever the row gets updated, is binary data, and has nothing to do with dates or times.  What I really wanted was a Datetime field with a default value of getdate().  Not a timestamp.&lt;br /&gt;&lt;br /&gt;I'm so glad that the REST of my coding life, I get to be in Postgres.  In Ubuntu.  On Linux.  Away from Microsoft.  Harumph!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-1307312499877935644?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/1307312499877935644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=1307312499877935644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/1307312499877935644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/1307312499877935644'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2007/08/sql-server-timestamp-field.html' title='SQL Server Timestamp Field'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-5794135247200667288</id><published>2007-08-02T16:10:00.001-04:00</published><updated>2007-08-02T16:10:41.655-04:00</updated><title type='text'>A Minor Rails Hiccup, With Solution</title><content type='html'>As mentioned, I've been working through Agile Web Development With Rails, 2E.  I got to p. 88, which talks about adding data via a migration.  So I download the data for 003_add_test_data.rb, and run rake on it.  Nothing.  All of my rows get deleted, but no new ones get added.  I add some print lines, which get displayed when rake runs, so I know the code is getting executed.  But no data gets added.  Harumph!&lt;br /&gt;&lt;br /&gt;Well, let's back up a bit.  A few pages prior, I added validation to the model.  Pretty cool stuff, being able to throw in some regular expressions and have a pretty error message show up on the page.  So I did a little extra-curricular playing around, and life was good.&lt;br /&gt;&lt;br /&gt;After looking around a bit, I discovered that the data that the book wants me to add wasn't passing my validation tests.  Okay, fine.  So why wasn't rake showing any of the validation exceptions?&lt;br /&gt;&lt;br /&gt;Well, a quick post to the Rails forum later, it turns out that create() won't throw exceptions, it just adds entries into the 'errors' list and continues.  create!() will throw an exception with the same error text that the Rails app shows, and stops the migration.  Problem solved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-5794135247200667288?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/5794135247200667288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=5794135247200667288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/5794135247200667288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/5794135247200667288'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2007/08/minor-rails-hiccup-with-solution.html' title='A Minor Rails Hiccup, With Solution'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-2911684982902257298</id><published>2007-07-21T15:10:00.000-04:00</published><updated>2010-11-23T15:48:35.606-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Getting Rails Running on Ubuntu</title><content type='html'>Time to check out the Rails hype.  I borrowed Agile Web Development With Rails, 2nd Edition, from a coworker, and have started working my way through it.  So far, so fun.  The details:&lt;br /&gt;&lt;br /&gt;I'm doing this under Ubuntu, so I figured I'd install via Synaptic.  I grabbed just about everything I thought I might need, and started through the book.  I got to p. 39, which has a couple of rake commands.  These commands failed, and as part of troubleshooting, found https://help.ubuntu.com/community/RubyOnRails.  Following its advice, I removed rails and gems from Synaptic, and ran #1, #2 "Install RubyGems via source (recommended)", then #3 and #4.  I then tried the commands again, and they worked just fine.&lt;br /&gt;&lt;br /&gt;Well, almost fine.  When I got around to running &lt;i&gt;gem update --system&lt;/i&gt;, I got the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Updating RubyGems...&lt;br /&gt;Bulk updating Gem source index for: http://gems.rubyforge.org&lt;br /&gt;Attempting remote update of rubygems-update&lt;br /&gt;ERROR:  While executing gem ... (Gem::GemNotFoundException)&lt;br /&gt;    Could not find rubygems-update (&gt; 0) in any repository&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;On a lark, I ran the same command again, and it ran just fine.  Go figure.&lt;br /&gt;&lt;br /&gt;I then generated my own rails api docs with the &lt;i&gt;rake doc:rails&lt;/i&gt; command, and was able to proceed.&lt;br /&gt;&lt;br /&gt;So far, so fun.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-2911684982902257298?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/2911684982902257298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=2911684982902257298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/2911684982902257298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/2911684982902257298'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2007/07/getting-rails-running-on-ubuntu.html' title='Getting Rails Running on Ubuntu'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-1922019986962085803</id><published>2007-07-13T10:28:00.000-04:00</published><updated>2010-11-23T15:51:27.586-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Feisty + Tomcat5.5 HowTo</title><content type='html'>I got the following off of the Ubuntu Forums, and include it here so I know where it is, for next time.  (Yes, there's always a next time.)  In particular, #2 solved my present issue of not being able to restart Tomcat via the /etc/init.d/ script.&lt;br /&gt;&lt;br /&gt;Thanks to &lt;i&gt;Emblem Parade&lt;/i&gt; for this:&lt;br /&gt;&lt;br /&gt;Argh. So, if you tried installing tomcat5.5 from the repositories, you may have noticed that it's broken. You get a configuration error about JAVA_HOME not being set. Actually, there are three problems! Here's what you can do to get it to work:&lt;br /&gt;&lt;br /&gt;1) Install&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sudo aptitude install sun-java6-jdk tomcat5.5&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;(Note that you absolutely need the JDK, not just the JRE.)&lt;br /&gt;&lt;br /&gt;2) Set Tomcat's default JAVA_HOME&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sudo gedit /etc/default/tomcat5.5&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Uncomment the JAVA_HOME line and set it to your JDK path. For Java 6 installed from the repositories, it's as so:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;JAVA_HOME=/usr/lib/jvm/java-6-sun&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;3) Fix catalina.out&lt;br /&gt;&lt;br /&gt;Unfortunately, it seems that Tomcat's log file is set to be a pipe, but Tomcat can't seem to start with it. We'll recreate it as a regular file with the same security settings:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cd /var/log/tomcat5.5/&lt;br /&gt;sudo rm catalina.out&lt;br /&gt;sudo touch catalina.out&lt;br /&gt;sudo chown tomcat55:nogroup catalina.out&lt;br /&gt;sudo chmod uo-wrx catalina.out&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Tomcat should work now as a daemon. Start it like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sudo /etc/init.d/tomcat5.5 start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And point your browser at http://localhost:8180/&lt;br /&gt;&lt;br /&gt;Hooray!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-1922019986962085803?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/1922019986962085803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=1922019986962085803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/1922019986962085803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/1922019986962085803'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2007/07/feisty-tomcat55-howto.html' title='Feisty + Tomcat5.5 HowTo'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-6187182525599821757</id><published>2007-07-11T11:31:00.000-04:00</published><updated>2010-11-23T15:51:27.586-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Been Running Ubuntu</title><content type='html'>Since Novell drank the Microsoft Kool-Aid, we've been replacing our SuSE servers and desktops here at work with Ubuntu.  Overall, it's been a very pleasant experience.  I got Ubuntu 6.10 Edgy running on my work laptop and desktop, and on my home desktop as well.  I then upgraded all three to 7.04 Feisty with no problems on any box except my 64-bit desktop, and that seemed to only be a problem with some X fonts. &lt;br /&gt;&lt;br /&gt;I then had the hard drive crash on my home desktop, so I reinstalled 6.10 and immediately upgraded it to 7.04.  (I was too lazy to download the 7.04 install CD.)&lt;br /&gt;&lt;br /&gt;The only minor annoyance I had with upgrading to 7.04 the first time was that I clicked Go and went to sleep, only to find the next morning that it had stopped awaiting confirmation to something about 10 minutes in.  The 2nd 6.10-&gt;7.04 upgrade didn't do that, so I'm guessing it was from something that I had installed.  But if you're upgrading, you might want to babysit it, and not assume it can run unattended.  (YMMV.)&lt;br /&gt;&lt;br /&gt;Comparing Ubuntu with all other distros I've used (Gentoo, SuSE, Red Hat, and Slackware way back when), this is very sweet.  I had been limping along with wireless on my laptop under SuSE.  Under 6.10, I followed some info from the forums, and it just worked.  (Admittedly, 7.04 has seen a minor step backwards in wireless, but it still works, and I just haven't taken the time to ask/troubleshoot it yet.)&lt;br /&gt;&lt;br /&gt;Synaptic is much nicer than Yast.  Not sure how to explain it, but it's just a much more comfortable experience.  Gnome is also very nice.  I was expecting to try to figure out how to get back to fluxbox, but after a few hotkey tweaks, I'm enjoying Gnome pretty well, and prefer it over KDE, which I used briefly when I installed SuSE.&lt;br /&gt;&lt;br /&gt;Bottom line on Ubuntu: I wouldn't go back.  Much nicer experience than I was having with SuSE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-6187182525599821757?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/6187182525599821757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=6187182525599821757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6187182525599821757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/6187182525599821757'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2007/07/been-running-ubuntu.html' title='Been Running Ubuntu'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-115574898991796158</id><published>2006-08-16T13:21:00.000-04:00</published><updated>2010-11-23T15:51:45.025-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Background Threads in Tomcat</title><content type='html'>I have a task that I want to run once a minute.  I have it coded as a command-line app, but getting that app to run as a Windows service is getting to be a pain.  And, we also have an instance of Tomcat running on that server, so I started looking at how to get it to run within Tomcat.&lt;br /&gt;&lt;br /&gt;This made me a bit nervous at first, as Tomcat does a lot of threaded stuff on its own, and I'd really rather not step on its toes, but after a bit of searching, I found that kicking off your own threads is a fine thing to do in Tomcat, but with a couple of caveats.&lt;br /&gt;&lt;br /&gt;First, Tomcat lets apps ("contexts" in Tomcat lingo) be hotswapped, i.e. restarted or removed and replaced with new code, without stopping the VM.  This means that you need to wire up your thread to stop when the app (sorry, "context") is stopped.  You can write a servlet to watch over your thread (that can actually be the thread itself, too), and have Tomcat instantiate it, by configuring it in web.xml with "&amp;lt;load-on-startup /&amp;gt;" included.&lt;br /&gt;&lt;br /&gt;The servlet itself will extend HttpServlet (of course), and implement Runnable (if it's to have the thread code in it as well, which is handy.  Then, when the destroy() method is called on your servlet, you tell your thread to stop itself (i.e. via a call to Thread.interrupt(), perhaps), as the context is going away.&lt;br /&gt;&lt;br /&gt;I found a code sample at &lt;a href="http://classes.eclab.byu.edu/462/demos/PrimeSearcher.java"&gt;http://classes.eclab.byu.edu/462/demos/PrimeSearcher.java&lt;/a&gt; that helped, although that sample is coded to call Thread.stop(), which is now deprecated.&lt;br /&gt;&lt;br /&gt;Anyway, I now have simple thread doing background processing, nicely cooperating with Tomcat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-115574898991796158?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/115574898991796158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=115574898991796158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115574898991796158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115574898991796158'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/08/background-threads-in-tomcat.html' title='Background Threads in Tomcat'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-115557584526145923</id><published>2006-08-14T13:16:00.000-04:00</published><updated>2010-11-23T15:52:49.154-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlserver'/><title type='text'>SQL Server Default Values (or "Why Open Source Is (Still) Better")</title><content type='html'>In getting our Java app to run on Windows, I'm forced to use SQL Server as a database.  (Against my will, I might add.)  I have an external application that will be adding rows to a table via ODBC, and I'm thinking it'd be nice to have SQL Server automatically generate a date value for when the row was written.  In PostgreSQL, it'd be a default value in the DDL (I think; I've never needed it yet), but I wasn't sure what it'd be in SQL Server, so I tried timestamp.&lt;br /&gt;&lt;br /&gt;That didn't look right to me, as the value in Enterprise Mangler displayed as '&amp;lt;binary&amp;gt;', rather than the actual date.  Okay, let's try datetime with a default value.  Well, that complained about something odd.  I googled and found that timestamp *is* what I want, display problems notwithstanding.&lt;br /&gt;&lt;br /&gt;Which leads me to today's punchline: when I switched from datetime w/default to timestamp, and tried to save my changes, EM complained about a default value not being appropriate for that datatype.  Why, on earth, did EM not clear the default value when I switched datatypes?!&lt;br /&gt;&lt;br /&gt;Okay, maybe I'm reading too much into this, but this is a problem you just don't see in open source programs.  In the O/S world, the first decent coder to hit that problem would have pulled down the source, fixed the problem, and submitted a patch.  The next version of the program would be fixed, perhaps in less than a month, depending on the release cycle.  Heck, I was itching to do it, myself, except, whaddya know, I can't get at the code.&lt;br /&gt;&lt;br /&gt;But I'll wager that this problem will never get fixed.  It's not "important enough" (i.e. to the marketing team) to make it into a bug list, unless it annoys a SQL Server developer enough to make it happen "while he's doing other things" (i.e. without permission).&lt;br /&gt;&lt;br /&gt;Harumph.  When will I be free of this nonsense?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-115557584526145923?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/115557584526145923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=115557584526145923' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115557584526145923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115557584526145923'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/08/sql-server-default-values-or-why-open.html' title='SQL Server Default Values (or &quot;Why Open Source Is (Still) Better&quot;)'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-115532629715002484</id><published>2006-08-11T15:56:00.000-04:00</published><updated>2006-08-11T15:58:17.160-04:00</updated><title type='text'>Windows Services and Network Drives</title><content type='html'>Rather than turn this into a Windows rant (which it easily could become), I'll just skip to the punchline.  After a few hours of trying to figure out why my File.exists() and File.isDirectory() calls don't work, now that I've moved the code into Tomcat, running as a service on Windows 2003 Server, I discovered that network drives are not available to services.&lt;br /&gt;&lt;br /&gt;More specifically, I got the impression that network drives are mapped by a user for that user, and as such, a service, which doesn't have a user (?), doesn't get the drives that any (other) user specifies.  More generally, it's another way that Windows is borken.  (Oops, I wasn't going to rant.)&lt;br /&gt;&lt;br /&gt;So I got to go back to my client and get him to move the app (whose data I was getting over their net) to the local machine, or figure out how to at least push the files to the local machine.  Feh.  (rant, rant, rant...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-115532629715002484?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/115532629715002484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=115532629715002484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115532629715002484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115532629715002484'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/08/windows-services-and-network-drives.html' title='Windows Services and Network Drives'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-115453950483508317</id><published>2006-08-02T13:24:00.000-04:00</published><updated>2006-08-02T13:25:04.846-04:00</updated><title type='text'>Duplicate Methods in Python</title><content type='html'>Stumbled across a little gotcha in Python.  Python, when it loads a source file, executes the code as a command.  For instance, assume the following code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Foo:&lt;br /&gt; def method1( self ):&lt;br /&gt;  pass&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It sees the &lt;i&gt;class&lt;/i&gt; statement as a command, with two lines of text following as parameters.  Similarly, it sees the &lt;i&gt;def&lt;/i&gt; statement as a (sub)command with one line as a parameter.  The &lt;i&gt;def&lt;/i&gt; 'command' adds (or replaces) the method &lt;i&gt;method1&lt;/i&gt; in the current scope, in this case, class Foo.&lt;br /&gt;&lt;br /&gt;Which leads me to my gotcha.  The following code is valid, but probably not what you want:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Foo:&lt;br /&gt; def method1( self ):&lt;br /&gt;  print 'Yes'&lt;br /&gt; def method1( self ):&lt;br /&gt;  pass&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In this case, the first def statement will work, adding a method1 that prints to the class.  The second one will work, too, replacing the existing method1 with one that does nothing.&lt;br /&gt;&lt;br /&gt;Unfortunately for me, I had added some stubs to the bottom of my source file, then forgot that they were there, and added the real method higher up, and wondered why the method apparently wasn't being executed.  Debugging a bit showed me that it was getting called by the calling code, but the call wasn't arriving in the method itself.  The 2nd def had replaced the first with a method that did nothing.&lt;br /&gt;&lt;br /&gt;Chalk one up to experience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-115453950483508317?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/115453950483508317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=115453950483508317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115453950483508317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115453950483508317'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/08/duplicate-methods-in-python.html' title='Duplicate Methods in Python'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-115317509433346888</id><published>2006-07-17T17:52:00.000-04:00</published><updated>2006-07-17T18:32:02.890-04:00</updated><title type='text'>Postgres Speed, and Table and Index Sizes</title><content type='html'>I've gotta start paying attention to my indexes in PostgreSQL.&lt;br /&gt;&lt;br /&gt;I went to update one field across all rows in a big table I have.  I did a test update on a local copy of the db, and it ran fine; I then ran it on our shared db, and it still wasn't finished after 3 hours. And other selects were waiting for it to finish, and so on.&lt;br /&gt;&lt;br /&gt;After looking around, I noticed that the difference was that I didn't have any indexes on my local copy.  And after reading a bit, I found that updating a row makes a copy of that row, freeing up the old space for more data (although not returning it to the O/S).  Same general thing happens with index entries as well; the old entry becomes unused, and a new entry gets written.&lt;br /&gt;&lt;br /&gt;As part of the conversation on IRC, I was told about contrib/dbsize, and installed it.  I then found that my tables indexes took up 571MB from all the updating.  I reindex, and it went down to 160MB.  The table data took up 511MB; a vacuum full took that down to 190MB, but the index size went up to 338MB from the index activity.  Another reindex, and the table/index sizes are 190MB/160MB, respectively.&lt;br /&gt;&lt;br /&gt;I guess the main punchline to all this is to remove/replace the indexes on a file-wide update.  I'm not doing this in production, just during table modifications, trying to bring a new column up-to-date, but it's something to be aware of.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-115317509433346888?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/115317509433346888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=115317509433346888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115317509433346888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115317509433346888'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/07/postgres-speed-and-table-and-index.html' title='Postgres Speed, and Table and Index Sizes'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-115048905868263835</id><published>2006-06-16T16:17:00.000-04:00</published><updated>2010-11-23T15:51:45.025-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Copying a File in Java</title><content type='html'>I just wrote a little monitor program.  It watches one directory, and when it finds a file, copies it to a 2nd dir, processes it, and deletes it.  Using Java's File object, the whole thing was simple, except for the copying part.  Any reason why the standard Java libraries don't have a file copy method?&lt;br /&gt;&lt;br /&gt;With Google's help, I found &lt;a href="http://javaalmanac.com/egs/java.io/CopyFile.html"&gt;one online at Java Almanac&lt;/a&gt;, which was almost as handy, but why, pray tell, ... oh, never mind.  Now where'd I put my Ruby book...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-115048905868263835?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/115048905868263835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=115048905868263835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115048905868263835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/115048905868263835'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/06/copying-file-in-java.html' title='Copying a File in Java'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114988245540642724</id><published>2006-06-09T15:46:00.000-04:00</published><updated>2006-06-09T15:47:35.423-04:00</updated><title type='text'>Rails said: AdapterNotFound</title><content type='html'>Oh yeah, as part of my playing with Ruby on Rails, when I went to run generate, I got an error message saying ActiveRecord::AdapterNotFound.  Turned out I had put down &lt;i&gt;postgres&lt;/i&gt; instead of &lt;i&gt;postgresql&lt;/i&gt;.  I'm still not sure where I should have seen that, (rather than the tutorial text, obviously).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114988245540642724?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114988245540642724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114988245540642724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114988245540642724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114988245540642724'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/06/rails-said-adapternotfound.html' title='Rails said: AdapterNotFound'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114918919332222473</id><published>2006-06-01T15:05:00.000-04:00</published><updated>2006-06-01T15:13:14.150-04:00</updated><title type='text'>First Tiny Steps in Rails</title><content type='html'>Time to learn something about &lt;a href=""&gt;Ruby on Rails&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I started going through &lt;a href="http://wiki.rubyonrails.com/rails/pages/Tutorial"&gt;the tutorial&lt;/a&gt;, and had a minor hiccup that I thought I'd report.&lt;br /&gt;&lt;br /&gt;We use PostgreSQL, so I wanted to use that as my db.  This meant doing a &lt;code&gt;gem install postgres&lt;/code&gt; to get the correct db adapter.  Except I got many screens full of error messages.&lt;br /&gt;&lt;br /&gt;At the top of these was:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;postgres.c:18:22: error: libpq-fe.h: No such file or directory&lt;br /&gt;postgres.c:19:70: error: libpq/libpq-fs.h: No such file or directory&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;so I went looking for how to tell it where the postgres include files are.  Turns out that &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;gem install postgres -- --with-pgsql-include-dir=/usr/local/pgsql/include&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;is the simplest way, but you can also go into /usr/local/lib/ruby/gems/1.8/gems/postgres-0.7.1 and do this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ruby extconf.rb --with-pgsql-include-dir=/usr/local/pgsql/include&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114918919332222473?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114918919332222473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114918919332222473' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114918919332222473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114918919332222473'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/06/first-tiny-steps-in-rails.html' title='First Tiny Steps in Rails'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114849582925471511</id><published>2006-05-24T14:26:00.000-04:00</published><updated>2006-05-24T14:37:09.340-04:00</updated><title type='text'>Learning Ruby</title><content type='html'>So last week, and over the weekend, I've been playing around with Ruby.  I'd like to learn a bit about Rails, having been given a very brief overview of &lt;i&gt;rake&lt;/i&gt;, and having heard all of the buzz.&lt;br /&gt;&lt;br /&gt;Well, I went away with Wife for the weekend (she had this conference/retreat thing to go to), an while I took my laptop, I didn't want to pay extra for a net connection in my hotel room.  Yeah, I'm cheap.  So I went looking for stuff to download to play/learn with.  Alas, it seems that the Rails docs are either non-free PDFs or online in Wiki form, and not having time enough to &lt;i&gt;wget&lt;/i&gt; what I needed, I went with plan B.&lt;br /&gt;&lt;br /&gt;There are plain-Ruby PDFs out there, most notably &lt;a href="http://poignantguide.net/ruby/"&gt;Why's Poignant Guide to Ruby&lt;/a&gt;.  The Poignant Guide reads like Douglas Adams having a fever dream, but the Ruby content is good, and seems quite appropriate for beginning programmers, moreso than just beginning Rubyists, but overall is a good read.  (At present, I'm on p. 93, picking out the gems (yes, pun intended)).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114849582925471511?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114849582925471511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114849582925471511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114849582925471511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114849582925471511'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/05/learning-ruby.html' title='Learning Ruby'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114840160570910367</id><published>2006-05-23T12:16:00.000-04:00</published><updated>2006-05-23T12:26:45.796-04:00</updated><title type='text'>Time for a Name Change</title><content type='html'>Well, as posts have been fairly sporadic here since I started this blog, I decided to change my focus a bit, and with that comes a name change.  This is now "Dave's Code Blog".&lt;br /&gt;&lt;br /&gt;I started it when I was thinking that I'd be diving into Java more deeply than I had done in the past, (about a year and a half ago).  After doing primarily Java coding over that time, I've found a couple of things out.&lt;br /&gt;&lt;br /&gt;First, Java's a fine language.  I mean that without sarcasm.  It's fine for what we're doing with it here at work, and as long as you keep it simple, it does its job.  As I mentioned a while back, the whole idea of Better, Faster, Lighter is a really good one, and has served us well.  Even "lighter" tools like Hibernate were too heavy for what we're doing, and we left them by the wayside.&lt;br /&gt;&lt;br /&gt;Second, my heart's not in Java.  Not for fun.  While it's fine to be employed doing Java work, and while it pays the bills nicely, my heart wants to be using a dynamic language.  Like Python, which I know and love, or Ruby, which I started to explore last week, (and will be writing about more in the days to come).&lt;br /&gt;&lt;br /&gt;Hence the name change.  Ignore the "javadave" in the blog url, this will be where I log the fun things that I find in my coding.&lt;br /&gt;&lt;br /&gt;And yes, my heart is still very much in Linux, in case you were wondering.  Delightfully enough, Linux has faded into the background for me of late, being something that I just take for granted.  No real surprises, no real frustrations, just enjoying the O/S Good Life.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114840160570910367?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114840160570910367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114840160570910367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114840160570910367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114840160570910367'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/05/time-for-name-change.html' title='Time for a Name Change'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114598524079722157</id><published>2006-04-25T13:07:00.000-04:00</published><updated>2006-04-25T13:14:00.846-04:00</updated><title type='text'>Keeping track of versions of internal libraries</title><content type='html'>We've got several applications, each in several versions.  We've got several internal libraries, with their own versions.  Because it was starting to get a bit harder to keep track of what version of an application requires what version of each library, we now have a solution.&lt;br /&gt;&lt;br /&gt;Each library now has a class called Version.  This class has one static void method called version_n_n_n() that does nothing, with the 'n's reflecting the version of the library.  In the applications, a method early in the call chain (i.e. the constructor of an MVC controller) makes the calls.&lt;br /&gt;&lt;br /&gt;When the library version gets bumped, we create a new branch in Subversion, and the method gets renamed.  Any code that depends on a newer version of the library also gets updated to call the new method.&lt;br /&gt;&lt;br /&gt;The big benefit here is that anyone who hasn't pulled down the new library versions, but gets the latest app code, gets immediate and obvious compile errors, and knows to get the updated libraries.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114598524079722157?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114598524079722157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114598524079722157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114598524079722157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114598524079722157'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/04/keeping-track-of-versions-of-internal.html' title='Keeping track of versions of internal libraries'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114442569446669459</id><published>2006-04-07T12:00:00.000-04:00</published><updated>2006-04-07T12:01:34.480-04:00</updated><title type='text'>Setting up log4j</title><content type='html'>I just got told by Boss that we need to make our logging more official.  I can buy that.  I suggest log4j as a de facto standard.  He can buy that, and I'm off and running.&lt;br /&gt;&lt;br /&gt;So I wander over to the log4j site, use SuSE's yast to install it, and pull up a source file with a few println() calls, to try it out on.  I install the docs and the API javadocs, and pull up the docs front page.  The first link is "short manual", which sounds promising.&lt;br /&gt;&lt;br /&gt;Here's where the story bogs down, and I slip into rant mode.&lt;br /&gt;&lt;br /&gt;I'll start with the punchline.  I needed to add to my app's startup code:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;BasicConfigurator.configure( new ConsoleAppender( new PatternLayout( "%d{ISO8601} %c%n%p: %m%n" ) ) );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In each source file, I needed to add the following member variable:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;private static Logger logger = Logger.getLogger( MyClass.class );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And in place of each println() call, I needed to add the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;logger.debug( "your message here" );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Actually, the call to logger.debug() could have been a call to logger.info(), logger.warn(), etc., depending on the nature of the message.&lt;br /&gt;&lt;br /&gt;How long did it take you to read that?  30 seconds?  Given that code, you now can go into the API docs and lookup PatternLayout, and see what that string means, or look up Logger and see what methods you call for what log levels.  And while I still haven't mentioned much about what an Appender is, or how you control what log levels get output, (I'm not sure myself yet), you now have working logging, using log4j.  Darn close to being as easy as those println() calls you're replacing.&lt;br /&gt;&lt;br /&gt;We now return to the rant: How long did it take me to code this?  About 20 minutes.  The so-called "short manual", in my small Firefox font, takes up more than 22 full-screen pages.  I glanced at it, saw bits and pieces of what I needed, poked around the API docs for a while, realized I needed to read short-man a bit more carefully, and gradually figured out what those three simple lines of code would be, to give log4j a whirl.&lt;br /&gt;&lt;br /&gt;Why on earth did the so-called "short manual" not start off with three lines of code?!  Why did somebody assume (not necessarily the short manual author, but rather the person who put the link to it at the top of the doc page) assume that I'd want to read 22+ small-fonted pages just to get started with log4j?&lt;br /&gt;&lt;br /&gt;There was a moment, let me assure you, when, had I not suggested its use, and had I not been tasked with improving our logging, I would have said "println()'s are good enough", and stopped reading.&lt;br /&gt;&lt;br /&gt;The key here is that I was in evaluation mode, having not yet bought into its use.  3 lines of code stuck in my app did convince me, once I divined what they were; handing them to me early would have been greatly appreciated, and sold me much quicker.  One would assume others might glance around, see 22+ pages, and say without further ado, "println()'s are good enough", which would be a shame.&lt;br /&gt;&lt;br /&gt;Later, I'm pretty sure I will want to know more about log4j, and the short manual will be quite useful.  But at this moment, I just wanted to see what it'll do, and what I found was a bad way to show me that.&lt;br /&gt;&lt;br /&gt;Okay, I've calmed down a bit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114442569446669459?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114442569446669459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114442569446669459' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114442569446669459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114442569446669459'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/04/setting-up-log4j.html' title='Setting up log4j'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-114426188541638202</id><published>2006-04-05T14:25:00.000-04:00</published><updated>2006-04-05T14:31:25.446-04:00</updated><title type='text'>Changing Gentoo's CHOST from i386 to i686</title><content type='html'>I'm running Gentoo, kept pretty much up-to-date.  I wanted to run distcc, to let my faster box help my slower box out on long compiles. This let me to want to change my CHOST variable on the slower box from i386-pc-linux-gnu to i686-pc-linux-gnu, to match my faster box.  I got the impression at some point that I could have installed gcc as a cross-compiler, but changing CHOST sounded "easier" (or would at least let me end up with a less complicated config).&lt;br /&gt;&lt;br /&gt;So I searched the forums, and found people talking about how to make such a change.  Opinions fell into three camps: a) DON'T DO IT!, b) you can, but it's hard and not for the faint of heart, and c) I did it, no sweat.  Having finished the process, apparently successfully, I'm writing up what it took.  If you don't want to read the whole (quite long) thing, the summary is that I think I fall into (b).  It wasn't that hard, but it was time consuming, and took a bit of troubleshooting.  My full experience follows:&lt;br /&gt;&lt;br /&gt;To start off with, I did what I would heartily suggest to you: BACK UP YOUR WORLD!  Assume that your machine will end up fragged, and act accordingly.  Actually, it probably won't mess with your data, but then actually, you should have a backup plan already in place. (There's two kinds of people: those who backup, and those who have never lost a hard drive.)  There.  I said it.&lt;br /&gt;&lt;br /&gt;Before you start, there is &lt;a href="http://forums.gentoo.org/viewtopic-t-230783.html"&gt;a good thread to read&lt;/a&gt; on the forums.  In particular, the three-post series in the middle of the page by amne, danielrendell and Bob P give a pretty clear idea of what it should take, and what I decided to do.  To spell it out, my plan was to combine suggestions, and do this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;change CHOST&lt;br /&gt;emerge glibc binutils gcc&lt;br /&gt;emerge glibc binutils gcc&lt;br /&gt;emerge -e system&lt;br /&gt;emerge -e system&lt;br /&gt;emerge -e world&lt;br /&gt;emerge -e world&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So off I went, to /etc/make.conf, and changed CHOST from i386 to i686. I kicked off my first emerge of the build tools.  This ran fine.  I kicked off my second tool emerge, and got an error running emerge, saying that Python couldn't find libstdc++.so.6.  I "fixed" this by creating a symlink:&lt;br /&gt;&lt;br /&gt;ln -s /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/libstdc++.so.6 /usr/lib&lt;br /&gt;&lt;br /&gt;Rerunning the 2nd tool emerge gave me a configure error on the glibc emerge, which referred me to config.log, which I found in /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads. It said 'gcc-config error: Could not run/locate "gcc"'.  So off I go, into debug mode.&lt;br /&gt;&lt;br /&gt;The first thing I found was that PATH still had /usr/i386/gcc-bin/3.4.5 in it.  (Keep in mind that when I say i386 or i686 from here on out, I probably mean i386-pc-linux-gnu or its i686 version).  Looking in /etc, found i386 in profile.env, which tells you that it is generated by env-update.  I ran env-update, but i386 was still there.&lt;br /&gt;&lt;br /&gt;I grepped, and found i386 in several files in /etc/env.d/gcc, which led me to search for some way to reconfigure things, which led me to run: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;gcc-config -P i686-pc-linux-gnu-3.4.5&lt;br /&gt;source /etc/profile&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This fixed PATH quite nicely, and the 2nd tools emerge worked.&lt;br /&gt;&lt;br /&gt;On to the first system emerge.  Started fine, but stopped at groff, with a message of:&lt;br /&gt;&lt;br /&gt;'gcc-config error: Could not run/locate "i386-pc-linux-gnu-gcc"'&lt;br /&gt;&lt;br /&gt;I went through a couple of cycles of trial-and-error: I removed /var/tmp/portage/groff* and reran; still had error.  I checked /etc, no references to i386 anywhere.&lt;br /&gt;&lt;br /&gt;I checked my environment, and found a couple of i386 mentions, in BASH_VERSINFO, HOSTTYPE and MACHTYPE.  I bit of digging (and Googling) turned up the fact that MACHTYPE is a bash reserved variable.  Did a solo emerge on bash, which fixed MACHTYPE, but a retry on groff still failed, even after removing /var/tmp/portage/groff* again.&lt;br /&gt;&lt;br /&gt;I dug deeper, and found the Makefile in /var/tmp/portage/groff* with the i386 in it.  I saw that imake was creating this, and used equery to find out where imake was coming from (assuming it was part of make, and that rebuilding make might fix things).  No dice, 'equery belongs imake' reported x11-base/xorg-x11.&lt;br /&gt;&lt;br /&gt;So now I'm confused.  I also did an equery on groff, and found that it depends on X as well.  Ah, but doing an 'equery uses groff' says that groff has an X use flag.  Now we're getting somewhere.  I created /etc/portage/package.use, and added this line to it: 'sys-apps/groff -X'.  This tells emerge to remove the 'X' use flag just for groff. Ran emerge just on groff, and this time it worked.  &lt;br /&gt;&lt;br /&gt;Reran 1st system emerge, and it worked.  Ran the 2nd system emerge, and it worked, too.&lt;br /&gt;&lt;br /&gt;On to the first world emerge.  Started fine, but gave me an md5 error on one of the docbook zip files.  Removed that zipfile and emerged just docbook, but noticed that it was emerging a different version. Ah, the problem was on an old slot.  Unmerged the entire old version, and started the 1st world emerge again.&lt;br /&gt;&lt;br /&gt;This time, it stopped again, but past the docbook problem of the last try.  But after a good bit of poking around, I couldn't see any messages indicating why.  I had been writing messages out to one output file, and had seen to strangeness with the order that some messages would come out in, and decided to split up stdout and stderr.  Did so, restarted 1st world emerge, and it worked just fine.&lt;br /&gt;&lt;br /&gt;Given that the 1st one worked, I decided to setup distcc for the 2nd. Started 2nd world emerge, which worked fine until I got down to xephem, which gave an odd ld message: 'cannot find -llilxml'.  I couldn't track it down, so I just tried rerunning xephem.  That worked fine.  Reran 2nd world emerge, which worked fine.&lt;br /&gt;&lt;br /&gt;Took out the line in /etc/portage/package.use for groff (by removing the whole file, since that was the only line in it on my box), and re-emerged groff, successfully this time.&lt;br /&gt;&lt;br /&gt;Whew!  The world emerges took quite some time (days, on my 400mHz slow-box), but I ended up with a fully rebuilt system, and one running distcc, with a i686 CHOST.&lt;br /&gt;&lt;br /&gt;All in all, it wasn't too much work, and I got much more familiar with slots, USE flags and equery, all of which are way cool and knowledge of them is quite helpful when maintaining a Gentoo box.  If I had to do it again, I'd be willing to, but be aware that it took up a good bit of my spare time for a week or two to accomplish, I've been running Gentoo for a few years, and I am a developer myself, making poking through these problems less intimidating.  YMMV.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-114426188541638202?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/114426188541638202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=114426188541638202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114426188541638202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/114426188541638202'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/04/changing-gentoos-chost-from-i386-to.html' title='Changing Gentoo&apos;s CHOST from i386 to i686'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-113925123201882558</id><published>2006-02-06T13:38:00.000-05:00</published><updated>2006-02-06T13:40:32.033-05:00</updated><title type='text'>Circular FK References</title><content type='html'>Circular foreign key references are evil.  And they sneak in without being obvious, until you decide to do something big like reload a table.&lt;br /&gt;&lt;br /&gt;In our case, a sale line points to stock, a stock item points to the order it came in on.  So far, so good.  Both FKs are nullable, as a sale line might not have been assigned to stock yet, and the stock item might be independent of an order still online.&lt;br /&gt;&lt;br /&gt;But then the order line was referring to a sale that that line was ordered for.  It was nullable, too, as not all orders are for written sales.  Therefore, all three rows can be created w/o difficulty, then linked up, making it impossible to disconnect.&lt;br /&gt;&lt;br /&gt;In our case, we solved it by reversing the direction of the third link.  Now, the sale line refers to the order line that will satisfy that sale, if any.  The links are then Sale-&gt;Stock-&gt;Order and Sale-&gt;Order, and no loop exists.  Life is good once again.&lt;br /&gt;&lt;br /&gt;But it snuck in there.  Perhaps it would be amusing to write something to detect such loops, just in case...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-113925123201882558?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/113925123201882558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=113925123201882558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/113925123201882558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/113925123201882558'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/02/circular-fk-references.html' title='Circular FK References'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-113882260265472596</id><published>2006-02-01T14:28:00.000-05:00</published><updated>2006-02-01T14:36:42.710-05:00</updated><title type='text'>Why I Hate Frameworks</title><content type='html'>A coworker sent me &lt;a href="http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12"&gt;a link to a very funny article&lt;/a&gt; and a rather nice ensuing discussion about the problems with frameworks.&lt;br /&gt;&lt;br /&gt;Where I'm working now, we're pared down to a fairly simple level.  Our presentation code is a port of a homegrown library; our database code (that I've mentioned in an earlier post) is homegrown and lightweight.  We have one toe in Spring, pretty much just to handle dispatching of requests; I'm not planning to, but I could probably rewrite the part that we're using in a couple of days.&lt;br /&gt;&lt;br /&gt;And we're happy, productive coders.  Makes me feel good, as early on in our switch to Java, I lobbied hard for doing just what we needed, while having the option to go to J2EE/EJB/insert your buzzword later, if/when we need to.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-113882260265472596?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/113882260265472596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=113882260265472596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/113882260265472596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/113882260265472596'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/02/why-i-hate-frameworks.html' title='Why I Hate Frameworks'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-113803640298724525</id><published>2006-01-23T12:12:00.000-05:00</published><updated>2006-01-23T12:13:23.003-05:00</updated><title type='text'>How Not To Write a While Loop</title><content type='html'>I was running a few long processes recently, and was getting tired of watching it in &lt;i&gt;top&lt;/i&gt;.  I wanted to run something that would tell me when it quit.  I went looking, and found &lt;i&gt;wait&lt;/i&gt;, but that only works on processes that are children of the current shell, which wouldn't work in my case.&lt;br /&gt;&lt;br /&gt;So I figured I'd just write a &lt;i&gt;bash&lt;/i&gt; one-liner.  I tried &lt;code&gt;while 1&lt;/code&gt; as my base loop, but that didn't work.  I thought (incorrectly) that I had tried &lt;code&gt;while true&lt;/code&gt; already, and found that it didn't work (I hadn't), and got this flash of, well, non-genius:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;while `yes`&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Think about it.  (Don't run it yourself, especially without reading the rest of this post!)  &lt;i&gt;yes&lt;/i&gt; outputs "y\n" in an endless loop.  Wrapping a command in backticks runs that command, and puts its output inline for whatever command it's a part of.  Do you see the disaster looming?&lt;br /&gt;&lt;br /&gt;When I ran the loop, it started by running yes, saving its (infinite) output.  This filled available memory.  It then filled available swap.  My memory docklet reported "MEM 96% SWP 99%", right before the system stopped responding completely.  As a testament to the solidity of Linux, the non-responsive stuff only lasted a little while, after which the system responded to all of the Ctrl-C and "close window" clicks I had been sending it, and all of the offending processes (and a few non-offending ones) disappeared.  No system crash.&lt;br /&gt;&lt;br /&gt;Anyway, lesson learned, and I ended up writing my one-liner as follows:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;while test -e /proc/nnnnn; do sleep 5; done; echo ^G&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;which waits for the process to go away, then beeps.  Made much more sense than whatever I originally had in mind.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-113803640298724525?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/113803640298724525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=113803640298724525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/113803640298724525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/113803640298724525'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2006/01/how-not-to-write-while-loop.html' title='How Not To Write a While Loop'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112991809540772910</id><published>2005-10-21T13:54:00.000-04:00</published><updated>2005-10-21T14:08:15.446-04:00</updated><title type='text'>Setting Priorities</title><content type='html'>Joel (on Software) Spolsky has &lt;a href="http://www.joelonsoftware.com/articles/SetYourPriorities.html"&gt;a new article&lt;/a&gt; that's really a winner.  It's a combination of why he does shrinkwrap software, how to set priorities (in life, in general), and a way to pick what to put in the next revision of your software.  &lt;br /&gt;&lt;br /&gt;Good stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112991809540772910?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112991809540772910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112991809540772910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112991809540772910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112991809540772910'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/10/setting-priorities.html' title='Setting Priorities'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112974890948959742</id><published>2005-10-19T15:06:00.000-04:00</published><updated>2005-10-19T15:08:29.496-04:00</updated><title type='text'>How To Do DB Testing (Part III, Mock Database)</title><content type='html'>We decided to use Dia to draw the ERD, and to use tedia2sql.pl (available at tigris.org) to pull the data out of the .dia file and generate DDL.  In the case of a new table, I'll cut the new DDL out of the generated file and paste it into psql to actually create the table, then run a database diff utility that I wrote (that I already posted to this blog) to make sure what's in the DB is what's in the ERD.  (That way, either I or Boss can make quick changes right to the dev DB, and I can make sure they get back to the ERD when things slow down.)&lt;br /&gt;&lt;br /&gt;Another good thing about tedia2sql is that, since it's F/OSS, our resident Perl guru could (and did) modify it to spit out text that our internal tool needs, and that another tool (that I wrote) could generate Java classes off of the data model.  Kind of like a poor man's Hibernate, perhaps.  Once we had working data objects, it was a simple extension to make each of those objects implement a generated interface, and then generate mock objects that don't actually talk to the database, but rather expect to receive one of those Vectors I mentioned earlier.&lt;br /&gt;&lt;br /&gt;So now any change to the database automatically updates the real Java objects, and the mock objects that implement the same interface, and a class factory to get a new one as needed.  From there, writing Junit tests are the snap you'd expect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112974890948959742?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112974890948959742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112974890948959742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112974890948959742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112974890948959742'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/10/how-to-do-db-testing-part-iii-mock.html' title='How To Do DB Testing (Part III, Mock Database)'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112964608472450677</id><published>2005-10-18T10:33:00.000-04:00</published><updated>2005-10-18T10:34:44.733-04:00</updated><title type='text'>How To Do DB Testing (Part II, Bulk Analyze)</title><content type='html'>So with all of the SQL expressions contained in query manager subclasses, the next step was to collect and run all of the queries at once.  This had two big advantages.&lt;br /&gt;&lt;br /&gt;First, all of the SQL could be exercised.  Probably the biggest headache in writing SQL is that there's no real way to "compile" it, even to get a syntax sanity check, (without going into stored procedures and other DB-specific stuff).  Our way, we have a hierarchy of classes that contain all of the SQL strings, and a TestAllQueries JUnit class that calls each method on each query manager class.  Running one test runs all of the queries in the system.  (It ignores the results; that's for other tests.)&lt;br /&gt;&lt;br /&gt;Second, with a tiny tweak in how the methods are called, instead of running the query we can 'EXPLAIN ANALYZE' it, and run the output into a text file for further examination.  One run, and I can see what queries are doing table scans, and what index that one query is using.  Quite handy.&lt;br /&gt;&lt;br /&gt;And with all of the application code not knowing anything about JDBC, but rather using an Iterator, we can put together a mock database fairly easily, just by instantiating and throwing HashMaps into a Vector, and returning the iterator() from it.  Acquiring the database from a factory means that each db-using class is now easily testable without having to setup a separate database and worry about the attending headaches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112964608472450677?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112964608472450677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112964608472450677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112964608472450677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112964608472450677'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/10/how-to-do-db-testing-part-ii-bulk.html' title='How To Do DB Testing (Part II, Bulk Analyze)'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112956464991922374</id><published>2005-10-17T11:56:00.000-04:00</published><updated>2005-10-17T11:58:47.996-04:00</updated><title type='text'>How To Do DB Testing (Part I, General Ideas)</title><content type='html'>Not that I expect this to be a tome of wisdom or anything, but I thought I might put into writing some of the wins we've had lately in being able to test our DB code.  First, some background.&lt;br /&gt;&lt;br /&gt;I got to design most of the DB layer of a web app.  To prototype, I threw together a simple JDBC wrapper class to manage a connection and perform queries.  This worked well for starters, but soon the number of queries got unmanageable.  So we split out the connection stuff into a base class, and split the queries themselves into various derived classes.  This is nice, as it means we can find all of the queries for the whole system in one easily spotted set of source file, and those source files have &lt;b&gt;nothing&lt;/b&gt; else in them.&lt;br /&gt;&lt;br /&gt;The other thing we did that works really well is to have the query manager class act like an Iterator.  The big win here is that next() returns a HashMap&amp;lt;String,String&amp;gt; that contains the data from each row, and as a result, nobody anywhere in the whole system deals with JDBC classes outside of the query manager.&lt;br /&gt;&lt;br /&gt;Here's the skeleton:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class QueryManager&lt;br /&gt;{&lt;br /&gt;   protected Iterator&amp;lt;HashMap&amp;lt;String,String&amp;gt;&amp;gt; executeQuery( String sql ) { ... }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class SpecificQueryManager extends QueryManager&lt;br /&gt;{&lt;br /&gt;   public Iterator&amp;lt;HashMap&amp;lt;String,String&amp;gt;&amp;gt; getPeople() { executeQuery( "select * from people where ..." ); }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112956464991922374?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112956464991922374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112956464991922374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112956464991922374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112956464991922374'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/10/how-to-do-db-testing-part-i-general.html' title='How To Do DB Testing (Part I, General Ideas)'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112930368713361481</id><published>2005-10-14T11:25:00.000-04:00</published><updated>2005-10-14T11:28:07.140-04:00</updated><title type='text'>Blogspot.com Stats</title><content type='html'>It's nice to get feedback on what you write in a blog. I mentioned getting comments; it's nice, too, to be able to look at your server logs and see who's reading what, and where they came from, and so on. But as my blogs are primarily hosted on Blogspot.com, and given that they don't share their server logs (harumph), what's a poor geek to do?&lt;br /&gt;&lt;br /&gt;Well, images to the rescue. Turns out, you can put a link in your blog template to an image file that you host on your own server, and any time anyone in an actual browser (i.e. not a webcrawling 'bot) views your page, your image gets loaded, and you can see what page the reader was on at the time. Don't know why I didn't think of that sooner.&lt;br /&gt;&lt;br /&gt;Now, if they'd just share my own stats with me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112930368713361481?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112930368713361481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112930368713361481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112930368713361481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112930368713361481'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/10/blogspotcom-stats.html' title='Blogspot.com Stats'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112836080937559396</id><published>2005-10-03T13:32:00.000-04:00</published><updated>2005-10-03T13:33:29.383-04:00</updated><title type='text'>Tomcat Deploy on Restart</title><content type='html'>It seems that Tomcat has a deployment problem.  If you stop Tomcat, copy a new .war file to ./webapps, and start Tomcat, it won't pick up the new file and deploy it.  I'm not certain about this, but it also seems that even if the file is placed there right when Tomcat finishes startup, it might not be picked up.&lt;br /&gt;&lt;br /&gt;In my case, I was doing a full build and restart after I grabbed new files from CVS.  A coworker suggested that the best way to do this would be to grab new, rebuild, deploy, let Tomcat catch up, and then restart Tomcat (especially if there are changes that would require a restart, such as a new JNI shared/dynamic library).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112836080937559396?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112836080937559396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112836080937559396' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112836080937559396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112836080937559396'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/10/tomcat-deploy-on-restart.html' title='Tomcat Deploy on Restart'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112549260952525751</id><published>2005-08-31T08:45:00.000-04:00</published><updated>2005-08-31T08:50:09.533-04:00</updated><title type='text'>More on File Handles</title><content type='html'>In response to my "Too many open files in system" problem, I got the following email (posted here with permission, provided it's anonymous):&lt;br /&gt;&lt;br /&gt;On our 2.6.9 appliance box we have been suffering the same problem running our application software. I tracked the issue down to the use of ps(1) in a system where /proc is changing quite often. It appears that repeated use of ps can cause the /proc/sys/fs/file-nr count to go up quite rapidly. In our case it was hitting its 200 k limit in just a few days!&lt;br /&gt;&lt;br /&gt;The sort of command we were executing often was: count=`ps aux | grep "service" | grep -v grep | grep -v defunct | wc -l`&lt;br /&gt;&lt;br /&gt;Things seem to be improved by doing the ps aux to a file, rather than a pipe. the problem seems worse the more output ps produces.&lt;br /&gt;&lt;br /&gt;Note that the kernel doesnt increment file-nr too often - there is latency for performance reasons - so it tends to jump up in multiples of 25. When experimenting you have to be patient and wait a while to see if running a command repeatedly is causing a leak.&lt;br /&gt;&lt;br /&gt;The problem is that ps itself doesnt appear to be leaking fds directly - it looks like its a "virtual" leak in the kernel, perhaps caused by ps's interaction with /proc in a system that has processes being created and killed very often.&lt;br /&gt;&lt;br /&gt;We have worked round this issue by reducing our use of ps to a minimum. Now our application software only leaks a few hundred handles a day, rather than thousands a hour!&lt;br /&gt;&lt;br /&gt;I have spent many hours on the net and havent found any kernel or ps patches for this. We will be upgrading to a later kernel at some point - hopefully that will fix the issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112549260952525751?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112549260952525751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112549260952525751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112549260952525751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112549260952525751'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/08/more-on-file-handles.html' title='More on File Handles'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112499538638390492</id><published>2005-08-25T14:42:00.000-04:00</published><updated>2005-10-06T11:53:05.540-04:00</updated><title type='text'>Executing Python Files</title><content type='html'>This is a pesky little thing I just ran across.  I was setting up some Python code on my Linux box, pulling it out of CVS on &lt;a href="http://sf.net"&gt;SourceForge&lt;/a&gt;, and did the obligatory &lt;i&gt;chmod&lt;/i&gt; to make one of my tests runnable.  But no matter what I tried, I couldn't run the darn thing.&lt;br /&gt;&lt;br /&gt;Turns out, it has DOS-style line endings, (i.e. CRLF, instead of the CR that Unix/Linux likes).  Once I used dos2unix to switch that, it worked fine.  Apparently, the first-line hash-bang that tells the shell where to find the executable had bash all confused, and unable to find Python.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112499538638390492?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112499538638390492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112499538638390492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112499538638390492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112499538638390492'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/08/executing-python-files.html' title='Executing Python Files'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112490643629407162</id><published>2005-08-24T13:56:00.000-04:00</published><updated>2005-08-24T14:00:36.300-04:00</updated><title type='text'>Denying the Worms</title><content type='html'>I run &lt;a href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt; on my home box.  As a result, I get the regular set of script kiddies coming in to see if they can break in.  Checking for awstats.pl, phpBB, and the like.&lt;br /&gt;&lt;br /&gt;But along with those, I've been getting regular requests for '/' from people on my subnet.  It looks like a milder version of the logs we used to get when Code Red was at its peak.  The distinguishing characteristic in the logs is that the user agent (browser) is blank.&lt;br /&gt;&lt;br /&gt;Well, my root doc is 60k+, and having it hit up to a couple dozen times a day by worms is just a nuisance.  So I started poking around in Apache to figure out how to refuse them.  It wound up being a tiny bit trickier than I expected; here's what I did:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;IfModule mod_setenvif.c&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;    BrowserMatch "^$" agent-deny&lt;br /&gt;    ...&lt;br /&gt;&amp;lt;/IfModule&amp;gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&amp;lt;Directory /whatever&amp;gt;&lt;br /&gt;    &amp;lt;IfModule mod_access.c&amp;gt;&lt;br /&gt;        Order Allow,Deny&lt;br /&gt;        Allow from all&lt;br /&gt;        Deny from env=agent-deny&lt;br /&gt;    &amp;lt;/IfModule&amp;gt;&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Getting to that point held a pitfall, though.  In the logs, the user agent was displayed as "-".  So my first shot at a BrowserMatch string was "-", but that matched anything with a dash, i.e. everything.  I then tried "^-$" and "^-", but then nothing matched.  On &lt;a href="http://freenode.net/"&gt;Freenode's&lt;/a&gt; #apache channel, &lt;i&gt;bare-foot&lt;/i&gt; suggested that since the dash is displayed in place of an empty string, that perhaps "^$" would work, and it did.&lt;br /&gt;&lt;br /&gt;Prior to getting on irc, I was trying to figure out how to display environment variables, and did manage to change my LogFormat to include "%{agent-deny}e", which indicated that my variable wasn't being set.  I then changed the string to match my browser, and saw that it was being set, narrowing my problem down to the regex.&lt;br /&gt;&lt;br /&gt;Anyway, now all the bots get is a 295-byte 403 response, and my world is a little bit nicer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112490643629407162?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112490643629407162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112490643629407162' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112490643629407162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112490643629407162'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/08/denying-worms.html' title='Denying the Worms'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112292942612329038</id><published>2005-08-01T16:49:00.000-04:00</published><updated>2005-08-01T16:50:26.143-04:00</updated><title type='text'>Java Generics</title><content type='html'>Well, I got all of us in the office moved up to Eclipse 3.1, and have been fairly happy with it so far: a bit faster to start up, filters on the properties pages, etc.  And support for JDK 5.0.&lt;br /&gt;&lt;br /&gt;I've been interested in playing with generics since I heard Java was getting them.  I had messed around with C++ generics, and liked them there, so once I got Eclipse running, I went to work correcting the type warnings that popped up in all of the Iterators and HashMaps we're using.&lt;br /&gt;&lt;br /&gt;So I fixed everything in three of our smaller projects, and noticed that the remaining two had 1350+ warnings remaining.  Hoo boy, what to do.  I mentioned it to Boss, who leaned toward letting our junior guy, Junior, fix them at his leisure.  So far, so good.&lt;br /&gt;&lt;br /&gt;Then I looked at the code again.  It was ugly.  &amp;lt; and &amp;gt; everywhere, hideously long names, and after wandering through a few dozen source files, I had found nothing that made me think "hey, glad I put that there, or I wouldn't have found *THAT* bug".  So I started thinking about ways to make it cleaner.&lt;br /&gt;&lt;br /&gt;I Googled, and found a mention of subclassing, i.e. HashMap, which worked fine (we use HashMap&amp;lt;String,String&amp;gt; a *LOT*), and the code became a lot less ugly, and made further changes a lot easier to make (I called the new class HashMapSS; pretty easy change to that from HashMap).  I played with that a bit, then took another look.&lt;br /&gt;&lt;br /&gt;I got down to about 1300 warnings, and asked myself: What does it buy us to fix all of these?  Initially, I was telling Junior and two other coworkers about generics, and just got blank stares.  "Increase coding time and make the code ugly?  For what?"  With these new classes, we're just down to a minor increase in coding time, but again, for what?&lt;br /&gt;&lt;br /&gt;In our case, we're not running into problems that adding these checks would have caught earlier.  ClassCastExceptions and the like.  As I'm the office code Nazi, I'm the one who would be most eager to code this way, and I'm sitting on the fence.  Everyone else has turned off the warnings and continued merrily along.&lt;br /&gt;&lt;br /&gt;I'll probably continue to code with the warnings on, and see how it goes, just because, but I'm not as excited about generics as I had expected to be.  Perhaps the Python I'm doing in my spare time is rubbing off.  Throw a few test cases at it, and all this static typing is more of a burden than an assist.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112292942612329038?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112292942612329038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112292942612329038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112292942612329038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112292942612329038'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/08/java-generics.html' title='Java Generics'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112196450864070472</id><published>2005-07-21T12:36:00.000-04:00</published><updated>2005-07-21T12:48:28.666-04:00</updated><title type='text'>Apache Problem</title><content type='html'>I'm reviving my blog on my home box.  I'm using Blosxom, which throws index.html files into subdirectories of the main blog.  I'm using Apache, which you can tell to look for index.html if the client requests a directory.  So far, so good.&lt;br /&gt;&lt;br /&gt;I set it all up at home.  My server's machine name is 'moose'.  (You'll see why this matters in a moment.)  I test it out; it all works.  I go to work, and try it out.  The main page works, but when I click on a subdir link, it pulls up a different page, namely that of &lt;a href="http://www.mooseworld.com/"&gt;Mooseworld.com&lt;/a&gt;.  What the heck?!&lt;br /&gt;&lt;br /&gt;Okay, right away I notice the moose connection.  When I put 'moose' into Firefox's URL, it does an autocomplete thing, and I'm guessing that some DNS magic sends such a term to Mooseworld.com.  But why does such a thing happen?&lt;br /&gt;&lt;br /&gt;I search my access_log, and find that any request for a plain directory (i.e. "/foodir") returns a 301.  A 301 is a redirect.  Seems that Apache was redirecting to a directory with a trailing slash (i.e. "/foodir/"), which would then match its pattern for trying the default index (index.html, in my case).  Only it was sending back a full URL, in my case "http://moose/foodir/".&lt;br /&gt;&lt;br /&gt;I looked around a bit, and found that apache2.conf had a ServerName directive that was set to "moose", and when I changed it to reflect the real server name, things worked.&lt;br /&gt;&lt;br /&gt;I'm guessing that there should be a way (perhaps with mod_rewrite?) to not require a 301 return and subsequent 2nd page request for this to work, but that'll have to wait until I convert my blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112196450864070472?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112196450864070472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112196450864070472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112196450864070472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112196450864070472'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/07/apache-problem.html' title='Apache Problem'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112187358746535385</id><published>2005-07-20T11:32:00.000-04:00</published><updated>2005-07-20T11:33:07.473-04:00</updated><title type='text'>"Nobody Cared" Problem</title><content type='html'>I recently upgraded to a 2.6.11 kernel, and was getting the delightful "nobody cared" message shortly after booting up my laptop. This was preventing my combo NIC/serial PCMCIA card from working, (in particular, the NIC doesn't come up; I don't care about the serial card part). I've taken ACPI out of the kernel; several posts on the Gentoo forums pointed to ACPI as a possible culprit.&lt;br /&gt;&lt;br /&gt;Under 2.4.x, the card appeared to run on IRQ 3; under 2.6.11, it was trying to go to IRQ 11. I started out trying to figure out how to get it back on IRQ 3, where it worked just fine.&lt;br /&gt;&lt;br /&gt;I tried an edit to /etc/conf.d/pcmcia of 'PCIC_OPTS="irq_list=3,4,7"'. This put eth0 on IRQ3, but left ttyS1 on IRQ11. I also tried excluding IRQ 11 by adding "exclude irq 11" to my /etc/pcmcia/config.opts, which resulted in dmesg output that said that the NIC was at "io 0x300, irq 3", but below that "ttyS1 at I/O 0x2f8 (irq = 11) is a 16550A". And, I tried the "pci=routeirq" kernel boot option, to no avail.&lt;br /&gt;&lt;br /&gt;I posted the above info to the Gentoo forums, and got a reply back from diastelo suggesting that I disable support for the serial device in the kernel. I had tried removing the 'serial' script from the boot runlevel, but that made no difference. But removing serial PCMCIA support from the kernel did the trick, and the NIC has worked fine ever since.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112187358746535385?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112187358746535385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112187358746535385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112187358746535385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112187358746535385'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/07/nobody-cared-problem.html' title='&quot;Nobody Cared&quot; Problem'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-112109766556674489</id><published>2005-07-11T11:59:00.000-04:00</published><updated>2005-07-11T12:01:05.573-04:00</updated><title type='text'>Out of disk space</title><content type='html'>Time for a bit of embarrassment.&lt;br /&gt;&lt;br /&gt;I was coding merrily away in my new Eclipse 3.1, and got an error saving a source file.  This is instant cause for alarm; if it has problems saving, that's really, really bad.  I missed the "More Info" button on the first dialog, and ran to a shell prompt to see if the file was really corrupt.&lt;br /&gt;&lt;br /&gt;Shortly, though, I did something to generate a "disk full" message from the command line.  Harumph!  Last time I looked, I had 3 or 4GB free.&lt;br /&gt;&lt;br /&gt;(I later went back to Eclipse, got the dialog again, and clicked "More Info" to get the "out of disk space" message.  For short messages like that, IMO Eclipse should just display the message, and do away with the "More Info" button.)&lt;br /&gt;&lt;br /&gt;So, let's go find the offending file.  &lt;i&gt;du&lt;/i&gt; is your friend, and showed that my home dir housed the culprit.  But looking closer, it didn't show where.  All of the files and subdirs that it showed were reasonably sized, and added up to about 4GB less than the total.&lt;br /&gt;&lt;br /&gt;Well, it turns out that &lt;i&gt;du&lt;/i&gt; doesn't show files starting with a period, just like &lt;i&gt;ls&lt;/i&gt;.  And like &lt;i&gt;ls&lt;/i&gt;, it has a "-a" switch to turn on display of those dot files.  Grrr!&lt;br /&gt;&lt;br /&gt;The problem was runaway messages coming out of ALSA, being put into .X.err.  Something odd about a file pointer being out of sync.  Yes, I should have saved the message to troubleshoot, but instead, I just restarted and have been watching ever since for .X.err to be recreated.  So far, it hasn't been.  (I also should have started out by restarting alsasound, rather than sacrificing 72 days of uptime, but oh well.)&lt;br /&gt;&lt;br /&gt;As an aside, I added a line to my crontab: &lt;i&gt;0 7 * * *  test -f /home/me/.X.err &amp;&amp; echo "It's back!"&lt;/i&gt;  This way, I'll be alerted (via email) when it returns.  Hopefully, it doesn't grow to 4GB in less than 24 hours.&lt;br /&gt;&lt;br /&gt;Sigh.  Now then, where was I?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-112109766556674489?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/112109766556674489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=112109766556674489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112109766556674489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/112109766556674489'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/07/out-of-disk-space.html' title='Out of disk space'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111825817575501593</id><published>2005-06-08T15:15:00.000-04:00</published><updated>2005-06-08T15:16:15.760-04:00</updated><title type='text'>More on file-nr, file-max</title><content type='html'>Not to be satisfied with not understanding my "Too many open files in system" problem, I started digging into the Linux 2.6.8 kernel source code.&lt;br /&gt;&lt;br /&gt;kernel/sysctl.c defines the /proc/sys/fs files.  There's fs_table, an array of ctl_table structs, that defines file-nr and file-max, and establishes that they're pointers to the files_stat structure, i.e. files_stat holds the data that's displayed when you 'cat file-nr'.  file-nr is R/O, file-max is R/W.&lt;br /&gt;&lt;br /&gt;fs/file_table.c (and include/linux/fs.h) defines files_stat.  As you'd expect, it's a struct that holds nr_files, nr_free_files and max_files members.  max_files is what gets changed when you alter /proc/sys/fs/file-max.&lt;br /&gt;&lt;br /&gt;As described in Documentation/filesystems/proc.txt, nr_free_files is always zero as of the 2.6 kernel.  max_files starts out at 10% of memory, but as mentioned, can be changed via /proc/sys/fs/file-max.  Examples exist of altering startup scripts to do this at boot time, overriding the default where needed.&lt;br /&gt;&lt;br /&gt;fs/file_table.c has get_empty_filp() that does the magic check to see if nr_files &gt; max_files, and if so (and you're not root), deny you the new file.  Failing this way puts an info message "VFS: file-max limit &lt;max-files&gt; reached" into the logs.&lt;br /&gt;&lt;br /&gt;fs/file_table.c is the only place that alters nr_files.  It gets incremented in filp_ctor() and decremented in filp_dtor.  filp_ctor/filp_dtor, in turn, get set as function pointers in fs/dcache.c when the "filp" kmem cache (named filp_cachep) gets created.  filp_cachep, in turn, is also only referenced in fs/file_table.c, by get_empty_filp() and file_free().&lt;br /&gt;&lt;br /&gt;get_empty_filp() and file_free() call kmem_cache_alloc() and kmem_cache_free(), respectively.  These functions live in mm/slab.c.  &lt;br /&gt;&lt;br /&gt;file_free() gets called largely only by put_filp(), also in fs/file_table.c.  get_empty_filp() and put_filp() get called by a variety of places, including fs/open.c, fs/pipe.c, mm/shmem.c and net/socket.c.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111825817575501593?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111825817575501593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111825817575501593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111825817575501593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111825817575501593'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/06/more-on-file-nr-file-max.html' title='More on file-nr, file-max'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111772490937840388</id><published>2005-06-02T11:07:00.000-04:00</published><updated>2005-06-02T11:08:29.403-04:00</updated><title type='text'>"Too many open files in system"</title><content type='html'>We got this message on one of our servers recently.  I went to our sysadmin guy, who "fixed" it by raising the limit in /proc/sys/fs/file-max.  So far, so good.  Then we started looking at why we were running out, as that server's been fine for quite a while.&lt;br /&gt;&lt;br /&gt;/proc/sys/fs/file-nr reports the number of file descriptors allocated by the system.  We had over 200,000 descriptors allocated.  /usr/bin/lsof lists open files per process, but showed less than 4000 in use.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.netadmintools.com/art295.html"&gt;I also found an article&lt;/a&gt; that explains this file in better detail.  It mentioned that there'll usually be a difference between file-nr's and lsof's counts, but it implies that lsof's should be higher, since lsof shows net connections, pipes, maps, etc.&lt;br /&gt;&lt;br /&gt;I started shutting down processes, in hopes that one was holding leaked descriptors, but nothing helped.  We finally rebooted, and file-nr's allocated count came back nice and small, less than lsof's count, as expected.&lt;br /&gt;&lt;br /&gt;If anyone has an explanation for this, I'd love to hear it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111772490937840388?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111772490937840388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111772490937840388' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111772490937840388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111772490937840388'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/06/too-many-open-files-in-system.html' title='&quot;Too many open files in system&quot;'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111765790985943243</id><published>2005-06-01T16:31:00.000-04:00</published><updated>2005-06-01T16:31:49.863-04:00</updated><title type='text'>"Could not open relation" in PostgreSQL</title><content type='html'>A coworker was getting "ERROR:  could not open relation with OID nnnnnnn" in PostgreSQL.  I poked around, and indeed, the query he was issuing was trying to use an index that I had dropped the day before.  Shutting down psql and restarting it fixed it.&lt;br /&gt;&lt;br /&gt;It seemed odd that psql would apparently cache a query plan, rather than letting the server handle it.  Unless the problem was in the connection, and not psql, and recycling psql just recycled the connection, which was probably the case, now that I think about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111765790985943243?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111765790985943243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111765790985943243' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111765790985943243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111765790985943243'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/06/could-not-open-relation-in-postgresql.html' title='&quot;Could not open relation&quot; in PostgreSQL'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111661060102602438</id><published>2005-05-20T13:23:00.000-04:00</published><updated>2005-05-20T13:36:41.033-04:00</updated><title type='text'>Getting the diff between two Postgres databases</title><content type='html'>These days, I'm pretty much the de facto DBA at our company.  We're using PostgreSQL, which I've also been enjoying.&lt;br /&gt;&lt;br /&gt;I keep a diagram (in Dia) with our ERD, and generate the DDL using a utility called tedia2sql.pl that we've modifed a slight bit for our own evil purposes.  But from time to time, I've needed to get in quick and alter the database, and wanted a way to make sure that the changes I made (that Boss makes, and who am I to tell him not to) make it back into the ERD.&lt;br /&gt;&lt;br /&gt;I went searching for a diff utility, and didn't find one, so I rolled my own.  Pretty simple, in fact.  What I did was use the generated DDL to create an empty database on my own box, then use pg_dump to get PG to give me the DDL out of that empty one, and out of the development database.  From there, diff tells me what I need to know.&lt;br /&gt;&lt;br /&gt;I even automated it:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;dropdb   -h localhost dbfoo&lt;br /&gt;createdb -h localhost dbfoo&lt;br /&gt;psql     -h localhost -f generated-erd.sql dbfoo&lt;br /&gt;pg_dump -s -h localhost dbfoo &gt; localhost-schema.sql &lt;br /&gt;pg_dump -s -h devbox    dbfoo &gt; devbox-schema.sql &lt;br /&gt;diff devbox-schema.sql localhost-schema.sql &gt; diff.txt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Simple, fairly quick, and keeps me in sync.  I can then keep the .dia and .sql files in CVS, and get diffs between versions that way as well.  The mnemonic I use in reading diff.txt is that 'c' indicates a change (obviously) between the two schemas, 'a' means add to devbox, and 'd' means add to the ERD.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111661060102602438?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111661060102602438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111661060102602438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111661060102602438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111661060102602438'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/05/getting-diff-between-two-postgres.html' title='Getting the diff between two Postgres databases'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111340134768486867</id><published>2005-04-13T09:57:00.000-04:00</published><updated>2005-04-13T10:09:07.686-04:00</updated><title type='text'>Eclipse, KDE and X</title><content type='html'>I'm didn't bother digging deep enough in this to find a solution, but here's the problem I was seeing:&lt;br /&gt;&lt;br /&gt;Over time, I would run out of memory.  Swap space would fill up, my box would crawl, and I'd have to restart things.  To be precise, the first time it happened, I started shutting things down, assuming that I'd get my memory back.  Turns out, I shut down all my apps, and still I was mostly hosed.  I looked at 'top', and my X process was taking up close to 1GB of physical and swap space.  Logging out and back in took care of it.&lt;br /&gt;&lt;br /&gt;When I first started my new job, this wasn't an issue, but I wasn't aware of what I was doing differently.  I suspected Eclipse, but wasn't sure.  I went through a few cycles of this, each taking between a few days and a week or so.  Then I went a couple of weeks with no real problems, and started thinking about what I was doing.  The biggest change I had made was doing CVS work from the command line, rather than from within Eclipse.&lt;br /&gt;&lt;br /&gt;So I went back to Eclipse, and started poking around in the CVS perspective.  Sure enough, when I did a file compare, my X process would grow by 5MB, and never shrink back.  I sat there and chewed up 150MB in about 20 minutes of back-and-forth clicking.  It seemed like a resource leak moreso than a memory leak, since it wasn't the Eclipse process that grew.&lt;br /&gt;&lt;br /&gt;Others in the office were seeing this as well, so I sent out an email.  One coworker sent back that he wasn't having this problem, despite doing all his CVSing from within Eclipse.  The common denominator between those of us who were seeing this problem was that we were all using KDE and running Eclipse.  (Others using KDE but not Eclipse didn't seem to have such problems either.)&lt;br /&gt;&lt;br /&gt;The coworker who wasn't having problems was using windowmaker for his window manager.  I sat and watched him go through all of the gyrations I did, but X just sat there.&lt;br /&gt;&lt;br /&gt;So I switched to Fluxbox.  (I use that at home, and love the lightweightness of it.)  Since then, I'm back to doing about half my CVSing in Eclipse, (and half on the cmdline), and my memory use has been fairly stable.&lt;br /&gt;&lt;br /&gt;I suspect that Eclipse and KDE have bugs that hold hands in this instance.  Again, I haven't really investigated this, or searched Eclipse or KDE forums, or anything, but wanted to at least record my findings before I get back to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111340134768486867?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111340134768486867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111340134768486867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111340134768486867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111340134768486867'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/04/eclipse-kde-and-x.html' title='Eclipse, KDE and X'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111213009735374776</id><published>2005-03-29T16:00:00.000-05:00</published><updated>2005-03-29T16:01:37.356-05:00</updated><title type='text'>Turning On Remote X Access</title><content type='html'>By default, KDE (on SuSE, anyway) turns off remote Xserver access.  This means that you can't run an X app on another box (say, hopper) and have the display window show up on your own.&lt;br /&gt;&lt;br /&gt;To enable this, edit:&lt;br /&gt;&lt;br /&gt;/opt/kde3/share/config/kdm/Xservers&lt;br /&gt;&lt;br /&gt;and change at least the first line to not have the "-nolisten tcp" option, then log out of X (back to kdm).&lt;br /&gt;&lt;br /&gt;You'll still need to point the remote box to yours for display, i.e. "export DISPLAY=yourbox.foo.com:0.0" before running your app.&lt;br /&gt;&lt;br /&gt;This is pretty simple, so you may wonder why I'm mentioning it.  Seems that there's a file /etc/X11/xinit/xserverrc with a line in it that mentions a variable called $DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN.  This is set in /etc/sysconfig/displaymanager, which is sourced right above it.  So I set this var in /etc/sysconfig/displaymanager, and it had no effect.  I eventually grepped for "-nolisten tcp", which appeared to be the culprit, and found /etc/X11/xdm/Xservers, but changing that did nothing, either.  Nor did the file /etc/opt/kde/share/config/kdm/Xservers, which was just a symlink back to /etc/X11/xdm/Xservers.&lt;br /&gt;&lt;br /&gt;As always, Google was my friend, and I found a post that pointed me to the right file, so I'm posting this, in case it might be of some use to a fellow traveler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111213009735374776?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111213009735374776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111213009735374776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111213009735374776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111213009735374776'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/03/turning-on-remote-x-access.html' title='Turning On Remote X Access'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-111040197098390292</id><published>2005-03-09T15:58:00.000-05:00</published><updated>2005-03-09T15:59:30.986-05:00</updated><title type='text'>Eclipse Not Finding My TestCase</title><content type='html'>I wrestled with Eclipse yesterday, regarding a JUnit TestCase.  I had always just added a class derived from TestCase, implemented my test methods, and Eclipse has always just run it.  I have a Run task that runs all test cases in the project, and I've never had to do anything special.  Until today.  (Well, sort of.)&lt;br /&gt;&lt;br /&gt;Today, I added a new TestCase-derived class.  And because I try to write (at least) one test method for each method in the tested class, I copied my actual methods over to the test class, and renamed the methods to start with 'test'.  (Yes, I know I should have tested first.  Sorry.)  I then added an implementation, and ran it.  And it passed.&lt;br /&gt;&lt;br /&gt;Hmm.  My tests usually don't run right the first time, and frequently I sabotage them to make sure they don't, so I know they're being run.  I check Eclipse's run window, and sure enough, they're not being run.  I go into the Run dialog, and I can't even specify the class in the single-test option.&lt;br /&gt;&lt;br /&gt;After much wrestling and wrangling, it turns out that my flaw was in copying the methods over.  Seems I forgot to take the parms out.  Seems that Eclipse saw no void methods w/no parms starting w/'test', and assumed that this wasn't a TestCase.  And wouldn't even show it.&lt;br /&gt;&lt;br /&gt;Now, if it sounds like I'm a little miffed at Eclipse, I suppose I am.  But what *should* Eclipse have done?  Ideally, I suppose a failure could have come up, saying "cannot run anything in this TestCase".  Or at least show the class in the Run-single mode, and complain when I try to save it that there aren't any methods with the required signature.&lt;br /&gt;&lt;br /&gt;Anyway, now I know.  And I'll go back to writing the test cases first.  I promise.  &amp;lt;sulk&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-111040197098390292?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/111040197098390292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=111040197098390292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111040197098390292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/111040197098390292'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/03/eclipse-not-finding-my-testcase.html' title='Eclipse Not Finding My TestCase'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110936469995474055</id><published>2005-02-25T15:50:00.000-05:00</published><updated>2005-02-25T15:51:39.956-05:00</updated><title type='text'>SSH Tunnelling</title><content type='html'>I just setup a SSH tunnel from my box to a distant server.  It worked fine, with one minor problem.&lt;br /&gt;&lt;br /&gt;When I first tried the tunnel, I would get timeouts on the client, and this message on the server session:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;channel 3: open failed: connect failed: Connection timed out&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;What I didn't realize is that in the command &lt;code&gt;ssh -TCN -L 1234:baz.bar.com:2345 foo@baz.bar.com&lt;/code&gt;, the first 'baz.bar.com' is relative to the host machine, not the client.  As a result, the command connected to the server, but the port forwarding didn't work because the server didn't know about baz.bar.com.  Using &lt;code&gt;ssh -TCN -L 1234:localhost:2345 foo@bar.com&lt;/code&gt; did the trick, since the server did know about localhost relative to itself, and the client process connected immediately.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110936469995474055?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110936469995474055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110936469995474055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110936469995474055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110936469995474055'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/ssh-tunnelling.html' title='SSH Tunnelling'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110875383238686277</id><published>2005-02-18T14:10:00.000-05:00</published><updated>2005-02-18T14:10:32.390-05:00</updated><title type='text'>Gentoo Reload, Part 2</title><content type='html'>My Gentoo reload continues fairly well, with a minor hiccup.&lt;br /&gt;&lt;br /&gt;I mentioned that the network didn't come back up after my first reboot into the installed system.  I found an old post (c. 2002) that mentioned removing certain kernel options; this is outdated info, as removing those options gave an error message saying, in essence, "put them back in".&lt;br /&gt;&lt;br /&gt;The actual error message was "cardmgr[nnnnn]: no pcmcia driver in /proc/devices".  Loading the 'ds' module (&lt;i&gt;modprobe ds&lt;/i&gt;) took care of that, and gave me messages in the system log (/var/log/messages or /var/log/everything/current, depending on which logger you're using) complaining about what module wasn't found.  In my case, I had to turn on 3c574_cs and serial_cs, and it worked fine.  The only annoyance was that because I had been using genkernel, (which compiles many, many modules), each recompile took several hours.  (In my case, several 10-minute evenings, as I made changes, then did the &lt;i&gt;make dep &amp;amp;&amp;amp; make clean bzImage ...&lt;/i&gt; dance and let it run overnight.)&lt;br /&gt;&lt;br /&gt;I'm still left with a question and a curiosity.  The question is why the difference between the install and the first boot?  (The answer is probably that the installer is a LiveCD, and the installed system is not, but I'm going to ask on the forums to know for sure.)&lt;br /&gt;&lt;br /&gt;The curiosity is the LiveCD stuff.  There's &lt;a href="http://forums.gentoo.org/viewtopic.php?t=244837&amp;highlight=livecd"&gt;this post&lt;/a&gt; that talks about rolling your own custom Gentoo LiveCD.  That just sounds way cool; I could have all my system stuff read-only on the CD, mount drives from other machines over the network for writeable files, and never touch the hard-drive on the local box.  (Not sure why I'd want to, but that's not the point, is it.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110875383238686277?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110875383238686277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110875383238686277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110875383238686277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110875383238686277'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/gentoo-reload-part-2.html' title='Gentoo Reload, Part 2'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110858511072375298</id><published>2005-02-16T15:16:00.000-05:00</published><updated>2005-02-16T15:18:30.726-05:00</updated><title type='text'>Strangest Darn Thing (PHP, Apache and a Firefox bug)</title><content type='html'>I've been running Postgres, and was told of a nifty web-based tool called phpPgAdmin that makes administering PG databases easier, so I tried to install it.&lt;br /&gt;&lt;br /&gt;Somewhere early on in my attempts to verify my install, I started seeing this problem when I would try to access the app (i.e. http://localhost/phpPgAdmin/index.php).  It would try to make me download the index.php page, and if I clicked okay on the dialog (that said "you have chosen to open ..."), it would save the page to my homedir.  Not what I wanted.&lt;br /&gt;&lt;br /&gt;So I fiddled, and I futzed, and I tried just about every config combo I could think of.  Nothing worked.  I reinstalled PHP.  Nope.  I copied index.php to dave.php, and that worked fine, but the original index.php didn't.  (Permissions were identical between dave.php and index.php.)&lt;br /&gt;&lt;br /&gt;I Googled several times, and finally decided to put in "you have chosen to open" as part of my search term.  This took me to a page that gave me the idea to try replacing the current index.php with a very simple one, (basically just a Hello, World page).  Nope, still asked me to download, and when I saved it, it gave me ... the old page?!  Now wait a minute!  Okay, let's restart Apache.  Try again ... still the old page!  Now come on...&lt;br /&gt;&lt;br /&gt;Okay, let's shut down Apache.  Same thing: "you have chosen to open ..."!  So Firefox wasn't even going to the server for this.  Restart Firefox, try again.  Same thing.  Yup, somebody's wedged.&lt;br /&gt;&lt;br /&gt;I finally, rather than save the file, tried to get Firefox to open it.  It sat there, paused; I clicked Cancel and Retry, and it finally said something about not being able to contact the server.&lt;br /&gt;&lt;br /&gt;Now, then.  Let's start Apache, and try again.  Now it works.&lt;br /&gt;&lt;br /&gt;Best I can tell, Firefox must've gotten wedged caching this file way early on.  Not sure if Apache was complicitous or not, (and PHP and phpPgAdmin seem innocent enough).  Grrr.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110858511072375298?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110858511072375298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110858511072375298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110858511072375298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110858511072375298'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/strangest-darn-thing-php-apache-and.html' title='Strangest Darn Thing (PHP, Apache and a Firefox bug)'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110848083256502642</id><published>2005-02-15T10:15:00.000-05:00</published><updated>2006-05-06T00:02:55.330-04:00</updated><title type='text'>Email From A Coworker</title><content type='html'>&lt;pre&gt;&lt;br /&gt;Subject: obligatory linux gloating&lt;br /&gt;&lt;br /&gt;Uptime on xxxxxx&lt;br /&gt;&lt;br /&gt;10:17am  up 648 days,  1:07,  2 users,  load average: 1.91, 1.72, 1.40&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Go ahead, LAX, &lt;a href="http://www.techworld.com/opsys/news/index.cfm?NewsID=2275"&gt;boot every month or so&lt;/a&gt;.  We're here, when you're ready.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110848083256502642?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110848083256502642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110848083256502642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110848083256502642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110848083256502642'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/email-from-coworker.html' title='Email From A Coworker'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110779442792894448</id><published>2005-02-07T11:38:00.000-05:00</published><updated>2005-02-07T11:40:27.930-05:00</updated><title type='text'>Upgrading SuSE</title><content type='html'>This is old news from me at this point, as I performed this upgrade a while back, and just forgot to blog it, but I'm mentioning it, as it continues to nibble at my hind parts from time to time.&lt;br /&gt;&lt;br /&gt;I upgraded my SuSE install.  Apparently, I went from 9.1 Server to 9.2 Workstation, or somesuch, and it removed a bunch of stuff.  Like PostgreSQL and Ant, among other things.  And when I went back to install those two things off the 9.1 disks, it thought I wanted to downgrade everything.  Harumph.&lt;br /&gt;&lt;br /&gt;It would have been nice to have had YaST mention that I was doing this.  Techically, it said that it was removing outdated packages, but during an upgrade, that's what's supposed to happen, IMO.  I didn't make the connection that those particular packages wouldn't be reinstalled, and it wasn't until much later, when I couldn't even find PostgreSQL in the package list, that I realized I had switched products.  (In my defense, Boss just handed me the disks and said "here, dude, upgrade your box".)&lt;br /&gt;&lt;br /&gt;I "fixed" things by pointing YaST at a full online 9.2 mirror, at which point it had the full list of packages to choose from.&lt;br /&gt;&lt;br /&gt;Then today, I reinstalled ant.  Okay, fine.  But from within Eclipse, ant found javah just fine; from the command line, it didn't.  Solved it by installing SuSE's ant-nodeps package.  Eclipse includes everything ant needs, apparently, and doesn't expose it to the command line version.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110779442792894448?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110779442792894448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110779442792894448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110779442792894448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110779442792894448'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/upgrading-suse.html' title='Upgrading SuSE'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110737885151201382</id><published>2005-02-02T16:13:00.000-05:00</published><updated>2005-02-02T16:14:11.513-05:00</updated><title type='text'>Postgres and bigint</title><content type='html'>We're putting together a database design.  In this design, we decided to specify all of our primary keys as &lt;code&gt;bigint&lt;/code&gt;, as we're going to make them unique across the system, and we'll (hopefully) have more than 2^32 rows system-wide.&lt;br /&gt;&lt;br /&gt;Somewhat unrelated to this, Boss came up with a question about foreign keys, wondering what the performance would be on them if we wanted to do ON DELETE CASCADE between two large tables.  So I went to investigate.&lt;br /&gt;&lt;br /&gt;My first try, to delete a row on an ON DELETE RESTRICT table that still had fk referrers, went quite fast.  Seems I picked a key that was at the top of both tables.  Fortunately, I thought to try a key at the bottom of both, and sure enough, it was doing a table scan.&lt;br /&gt;&lt;br /&gt;I checked my indexes, and added one, on the fk column.  Seems like it would be reasonable to have the db add one as part of the fk constraint, but maybe not.&lt;br /&gt;&lt;br /&gt;But even with indexes, it still did a full table scan.  I poked around, and found that even a pk search was doing a table scan.  After a good deal more poking, I Googled, and found that indexing bigints is buggy under PostgreSQL 7.mumble (i.e. the indexes won't get used, ever), but that under 8.0 works fine.  Fortunately, one of our newer servers was already running 8.0, so I tried it, and voila, worked fine.&lt;br /&gt;&lt;br /&gt;So now I'm moving my box up to 8.0 as well.&lt;br /&gt;&lt;br /&gt;(Minor note: I didn't track down the actual source of the problem, but was just satisfied with moving up to 8.0.  Just so you know.)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110737885151201382?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110737885151201382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110737885151201382' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110737885151201382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110737885151201382'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/postgres-and-bigint.html' title='Postgres and bigint'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110727167075525923</id><published>2005-02-01T10:28:00.000-05:00</published><updated>2005-02-01T10:32:26.710-05:00</updated><title type='text'>Gentoo Reload</title><content type='html'>Just for grins, I decided to reload my old laptop with Gentoo.&lt;br /&gt;&lt;br /&gt;For those following along at home, I had put (and praised) SuSE 9.1 on this laptop, but it didn't detect my PCMCIA NIC, and the video card itself had been fritzing, making X less than usable, and displaying the root console with huge borders (i.e. using only 1/4 of the screen).  I'm now wanting to run the laptop essentially as a server, with VNC handing the display, and letting another box do the actual I/O.&lt;br /&gt;&lt;br /&gt;So I downloaded the universal CD via BitTorrent (in part to be able to seed it when I was finished), and popped it in.  It detected all my stuff, including the PCMCIA NIC, and had no graphics problems (although it didn't run X, either).  All went swimmingly, until I rebooted, at which point it didn't find PCMCIA, and the root console was small again.  At present, I'm not all that interested in an extended troubleshooting session, especially as the install CD worked flawlessly.&lt;br /&gt;&lt;br /&gt;But it also makes me curious what they use for the installer, and whether or not I could just use that.  I glanced at Knoppix, as I have this vague feeling they do something similar, but I'm thinking that I'll go play in the Gentoo forums for a while and see if I can get any pointers.&lt;br /&gt;&lt;br /&gt;More as it unfolds.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110727167075525923?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110727167075525923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110727167075525923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110727167075525923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110727167075525923'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/gentoo-reload.html' title='Gentoo Reload'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110727041449168349</id><published>2005-02-01T10:06:00.000-05:00</published><updated>2005-02-01T10:06:54.493-05:00</updated><title type='text'>String vs StringBuffer</title><content type='html'>On a lark, while a particularly long data load was going on, I wrote some code to try out timing the differences between doing string concatenation with a StringBuffer, versus just writing out String math.  The different in timing was surprising.&lt;br /&gt;&lt;br /&gt;Of course, no entry like this would be complete without quoting Hoare and Knuth, that &lt;a href="http://c2.com/cgi/wiki?PrematureOptimization"&gt;Premature optimization&lt;/a&gt; is the root of all evil.  If String math is clearer, it should be used until there is a clear reason to do otherwise, IMNSHO.  There, I said it.&lt;br /&gt;&lt;br /&gt;Having said it, I wrote this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;String bigLongString = "cranky ";&lt;br /&gt;bigLongString += "poodle ";&lt;br /&gt;for ( int i = 0; i &lt; 100; ++i )&lt;br /&gt;	bigLongString += "frank ";&lt;br /&gt;bigLongString += 25;&lt;br /&gt;bigLongString += " times.  Hoorah!";&lt;br /&gt;return bigLongString;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and ran it 10,000 times.  On my machine, it took around 14.2 seconds to run.  I changed it thusly:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;StringBuffer sb = new StringBuffer();&lt;br /&gt;sb.append( "cranky " );&lt;br /&gt;sb.append( "poodle " );&lt;br /&gt;for ( int i = 0; i &lt; 100; ++i )&lt;br /&gt;	sb.append( "frank " );&lt;br /&gt;sb.append( 25 );&lt;br /&gt;sb.append( " times.  Hoorah!" );&lt;br /&gt;return sb.toString();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and it took around 0.92 seconds to run 10,000 times.  I changed it again to reuse the same StringBuffer (via &lt;code&gt;sb.delete( 0, sb.length() );&lt;/code&gt;), and it took around 0.5 seconds to run 10,000 times.&lt;br /&gt;&lt;br /&gt;That's a pretty stark difference in times, and pretty surprising, too, that reusing the StringBuffer would halve the execution time again as well.&lt;br /&gt;&lt;br /&gt;(For the curious, "Cranky Poodle" is a parody of "Yankee Doodle", as can be found in the book &lt;a href="http://www.theredballoon.com/takemebathtub.html"&gt;Take Me Out of the Bathtub&lt;/a&gt;, by Alan Katz, and is a hilarious book.)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110727041449168349?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110727041449168349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110727041449168349' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110727041449168349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110727041449168349'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/02/string-vs-stringbuffer.html' title='String vs StringBuffer'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110674920145161805</id><published>2005-01-26T09:15:00.000-05:00</published><updated>2005-01-26T09:20:01.453-05:00</updated><title type='text'>Generating Code</title><content type='html'>In conjunction with tedia2sql, I also wrote some Python code to take those custom files that our hacked version of tedia2sql generates, and use them to generate Java data objects.  In this case, the data objects have getters and setters, and 'getFooAsString()' getters, and are derived from a base class that has insert, update and delete methods to call our internal database layer (that sits on top of PostgreSQL).  That's a mouthful, but the upshot is that I enter the stuff into Dia, save the diagram, run one script, and can start writing database client code.&lt;br /&gt;&lt;br /&gt;Automating away tedious stuff is awesome.  (Or put another way: it's great to be lazy.)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110674920145161805?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110674920145161805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110674920145161805' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110674920145161805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110674920145161805'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/01/generating-code.html' title='Generating Code'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110674891272974934</id><published>2005-01-26T09:06:00.000-05:00</published><updated>2005-01-26T09:15:12.730-05:00</updated><title type='text'>tedia2sql</title><content type='html'>We're up to designing our database.  We're porting an existing database from Filepro (?) to PostgreSQL, and wanted to have a diagram of our ERD.  After a brief bit of poking around, we found &lt;a href="http://tedia2sql.tigris.org/"&gt;tedia2sql&lt;/a&gt;, a Perl program that takes a diagram out of &lt;a href="http://www.gnome.org/projects/dia/"&gt;Dia&lt;/a&gt; and generates DDL for you.  It's Open Source, of course, so we were able to have one of our crack Perl coders (i.e. not me) modify it to generate some files used by an internal program.  Just what the doctor ordered.&lt;br /&gt;&lt;br /&gt;It's interesting, too, in that it uses Dia's class diagram widgets, (which are more functional than its database widgets).  But the docs are quite clear, and it was very easy to put into Dia the objects that tedia2sql needed, and the PostgreSQL DDL worked just fine.  (tedia2sql also supports MySQL, Sybase, Oracle, DB2, and InnoDB.)  Another nice thing tedia2sql does is automatically generate join tables, if you specify a n:n relationship between two tables.  Very helpful.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110674891272974934?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110674891272974934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110674891272974934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110674891272974934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110674891272974934'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/01/tedia2sql.html' title='tedia2sql'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110512335214042479</id><published>2005-01-07T13:42:00.000-05:00</published><updated>2005-01-07T13:42:32.140-05:00</updated><title type='text'>PostgreSQL Docs</title><content type='html'>One other &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; tidbit: I'm pretty impressed with the docs.  They're fairly thorough, fairly readable, and aimed at someone without lots of pg experience.  (In fact, they're aimed at someone without much db experience.)  Good job, folks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110512335214042479?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110512335214042479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110512335214042479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110512335214042479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110512335214042479'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/01/postgresql-docs.html' title='PostgreSQL Docs'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110512332945780568</id><published>2005-01-07T13:41:00.000-05:00</published><updated>2005-01-07T13:42:09.456-05:00</updated><title type='text'>PostgreSQL Performance</title><content type='html'>Today I started poking around in &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt;, doing some performance testing.  I loaded it up with a million rows in one table, and a half-million in another, and started doing some selects to see how fast it would run.  And played around with 'explain' to see what pg thinks it should do.&lt;br /&gt;&lt;br /&gt;The first interesting thing I saw is that at some point, it'll switch from doing an index scan to do a sequential scan (i.e. a full table scan).  In my case, I'm simulating 5 years worth of data, and doing a query across a date range, and seeing results come back in several seconds.  'explain' shows that if the query is over more than a week or so, it'll do a full table scan rather than use the index.&lt;br /&gt;&lt;br /&gt;So I look at my data, and realize that I'm generating the dates randomly.  In reality, the dates will be in physical order on the disk in roughly date order (i.e. written as they're created).  So I redid my data, reran the explain, and now even a full year range uses the index.  Neat stuff.&lt;br /&gt;&lt;br /&gt;Digging deeper, I find that 'analyze' generates statistics on each field in each table, and put them in the pg_stats table.  One of the columns is called 'correlation', which indicates if like data can be expected to be found close together or not.  Changing the load order on the table changed the correlation value from almost 0 to almost 1, meaning the pg figured if it needed rows with similar values from that table, it could expect to find them close together on disk, meaning that an index scan would deal with data that in most cases would already be in memory.&lt;br /&gt;&lt;br /&gt;So when my dates were random, correlation was 0, meaning that if (for example) the table had 15000 pages on disk, and I wanted 15000 rows (which pg could also estimate), then it would be reading all of the pages anyway, and would choose a sequential scan.  When correlation is 1, 15000 rows might live in 500 pages, meaning reading the index and those 500 pages would be much quicker than a table scan, so the index scan would be chosen.  (Hope this makes sense.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110512332945780568?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110512332945780568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110512332945780568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110512332945780568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110512332945780568'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/01/postgresql-performance.html' title='PostgreSQL Performance'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110496154515601928</id><published>2005-01-05T16:44:00.001-05:00</published><updated>2005-01-05T16:45:45.156-05:00</updated><title type='text'>Google Likes Me</title><content type='html'>As part of my khubd thing here, I googled for khubd, found 19,800 pages, with my recent blog entry at the top!  I wondered if Google put it at the top knowing that it was mine, but I searched from a coworker's machine, and got me at the top as well.  Now, this blog has very few readers at present (at least, judging by what I see on bloglines.com), so I'm wondering if I'm getting some kind of karma from being on blogspot, or something.  Anyway, I find this quite curious.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110496154515601928?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110496154515601928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110496154515601928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110496154515601928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110496154515601928'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/01/google-likes-me.html' title='Google Likes Me'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110496147320272043</id><published>2005-01-05T16:44:00.000-05:00</published><updated>2005-01-05T16:44:33.203-05:00</updated><title type='text'>khubd, Round 2</title><content type='html'>Plugged in MP3 player, khubd hung again.  Googled for a while, and found nothing that jumped out at me to try.  A couple of people reported having this problem, and confirmed its association with plugging in a USB device.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110496147320272043?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110496147320272043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110496147320272043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110496147320272043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110496147320272043'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2005/01/khubd-round-2.html' title='khubd, Round 2'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110425174410035685</id><published>2004-12-28T11:33:00.000-05:00</published><updated>2004-12-28T11:35:44.100-05:00</updated><title type='text'>Servlet Mini-Annoyance</title><content type='html'>Was just putting together a test servlet, and was trying to get some values from a form.  Spent about 30 minutes trying to figure out what I was doing wrong; in the end, I was calling getAttribute() when I should have been calling getParameter().  I still don't know what attributes are; in my case, they're coming up empty (i.e. getAttributeNames() returns an empty enumeration).  Ah well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110425174410035685?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110425174410035685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110425174410035685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110425174410035685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110425174410035685'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/servlet-mini-annoyance.html' title='Servlet Mini-Annoyance'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110356033804078729</id><published>2004-12-20T11:31:00.000-05:00</published><updated>2004-12-20T11:32:18.040-05:00</updated><title type='text'>Moving NB Project to Eclipse</title><content type='html'>Having accomplished the task of getting my build.xml to work under NetBeans, I need to go the other way, and get the same thing working under Eclipse.  So I copy the NB folder over, and try to create an Eclipse project from it.&lt;br /&gt;&lt;br /&gt;First thing Eclipse does is try to create src/com/foo/Hello packages, and gives errors on all files.  That's not what I want.  I try to delete the files from the project.  Whoops, that actually deletes the files.  I copy them back over.&lt;br /&gt;&lt;br /&gt;Let's try importing.  Hmm.  That complains that it's trying to import into the same place that it's importing from.  Let's create a new project.  Okay, that imports okay, but doesn't place the files into a ./src folder.  Scrap that idea.&lt;br /&gt;&lt;br /&gt;Let's copy the project from scratch again.  Still gives me the src/com/foo/Hello packages.  Maybe we can move things around.  I create a ./src source folder.  It warns me about the overlap, but then fixes the packages, and puts things where I want them.  But there are compile errors.  Ah, just things missing from the classpath.  Fixed that, and life is good.  I can run my JUnit tests, and I can run build.xml.&lt;br /&gt;&lt;br /&gt;Much easier going from NB to Eclipse than vice versa, for this particular test, at least.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110356033804078729?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110356033804078729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110356033804078729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110356033804078729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110356033804078729'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/moving-nb-project-to-eclipse.html' title='Moving NB Project to Eclipse'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110330994146785996</id><published>2004-12-17T13:58:00.000-05:00</published><updated>2004-12-17T13:59:01.466-05:00</updated><title type='text'>First Look at NetBeans 4.0 Final Release</title><content type='html'>Back to NetBeans.  I have a project with a custom Ant script that I want to get working under NetBeans.  I do the New/FreeForm Project thing, and get to the part that asks for the source folder.  I specify 'com/foo/hello', and it loads both .java and .class files (at present, I leave both in the same place, which is probably bad practice, but works fine under Eclipse, and Ant doesn't mind either).  Loading both seems bad, so I delete the .class files, then open a source file.  It marks an 'implements' line as being an error, even though the interface I'm implementing is in the same package (and same directory).  Something's wrong; I remove the project.&lt;br /&gt;&lt;br /&gt;2nd attempt: specify the top-level path as the source folder.  This time, no source files show up, and I can't find anywhere to add or import an existing file.  It won't let me add the existing package, (which makes sense, as it already exists, but I was hoping it'd see it and use it, or something).  I remove the project.&lt;br /&gt;&lt;br /&gt;3rd attempt: RTFM.  The docs say to specify the top part of the path, which in this case is './com'.  Huh?  How counterintuitive is that?!  Okay, I'll play along.  I figure I'll come back to the classpath thing, and just click Finish.  Nothing happens.  Ah, on the status bar it's giving me an error message: "java.lang.reflect.InvocationTargetException".  Cancel, try again, same thing.  Restart, it won't even go past the project location page.  Restart, try again, now it works.  Odd.&lt;br /&gt;&lt;br /&gt;Well, sort of works, as the project list shows a 'com' folder, with 'foo.hello' and 'foo.hello.client'; I would have expected to see 'com.foo.hello' under the project name ("HelloWorld", in this case).  I expand 'foo.hello', and see both my .java files and my .class files.  Also not what I expected; maybe under the Files tab, but not on the Project tab.  I delete the .class files.&lt;br /&gt;&lt;br /&gt;Then I run the build, (i.e. run the 'main' target of my build.xml, which builds the whole thing).  It complains about not finding the 'cc' task; it's in a jar in ~/.ant/lib.  Ant from the cmdline finds it fine, but this is okay.  Adding the jar to my project classpath does nothing; ah, it wants it under the additional classpath under Options/Ant Settings.  Makes sense.  The project compiles, and deploys.  Of course, the .class files are back as part of my project.  Hrm.&lt;br /&gt;&lt;br /&gt;Sidebar: In trying to add cpptasks.jar to the Ant buildpath, NB's "Add JAR File" dialog didn't pick up my ~/.ant dir, making me type it in by hand.  And not just ".ant" and hit Enter, either, as that closes the dialog; I had to navigate to "~" and type ".ant/lib/cpptasks.jar".  Kind of defeats the purpose of having a dialog.&lt;br /&gt;&lt;br /&gt;Next odd thing: Hover over a .java filename under the Project tab, and it says 'Invalid package declaration: "com.foo.hello"'.  Probably because it's separated 'com' and 'foo.hello' as two separate things.  Probably wants me to have a ./src dir, and com/foo/hello under that.  Let's see ... okay, that project gives me a ./src dir, with com.foo.hello and .client packages underneath.  Grr.  Making me do things your way isn't very friendly.&lt;br /&gt;&lt;br /&gt;So I need to alter build.xml to get at my source in ./src.  Fixed my javac task, so now things compile okay.  Fixed my javah task, but now javah gives java.lang.reflect.InvocationTargetException.  Well, actually it also said it couldn't find my class; silly me, I pointed it at ./src, while it wanted ./build.  So why on earth does it say "Error starting javah", when javah started fine, but just couldn't find the classfile?!&lt;br /&gt;&lt;br /&gt;Okay, now my build.xml runs fine.  Interestingly, an empty build (i.e. I just ran it, so there's nothing to do) runs in 2 seconds under NB and 6 seconds from the command line.  I guess NB is using the existing JVM.  Repeated clean builds take 6-10 seconds in NB, while cmdline takes 15-16 seconds.  (Of course, Eclipse recompiles .java behind the scenes, which is what I usually want to build...)&lt;br /&gt;&lt;br /&gt;Bottom line is that I got NB to work, but I'm barely whelmed.  The next task will be to work in it for a few days and see if it grows on me.  My boss is attracted to it, and we both would like to make an informed decision about it, or at least verify that one project can be developed by folks split between IDE's.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110330994146785996?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110330994146785996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110330994146785996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110330994146785996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110330994146785996'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/first-look-at-netbeans-40-final.html' title='First Look at NetBeans 4.0 Final Release'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110329781915073782</id><published>2004-12-17T10:36:00.000-05:00</published><updated>2004-12-17T10:36:59.150-05:00</updated><title type='text'>.desktop Files and KMenuEdit</title><content type='html'>In an attempt to properly evaluate the IDE that we'll be using, I pulled down the final release of NetBeans 4.0, and installed it.  I then went to load it, which in my case meant going to the KDE menu (on my SuSE box).  I found the menu item for NetBeans, but assumed that it was still pointing to my old install, 4.0b2.&lt;br /&gt;&lt;br /&gt;So I went to SuSE's Control Center, and tried to remember where they put the config tool for changing the menu.  It's hidden under the 2nd or 3rd tab under Panels (which only makes sense if you really strain hard; in this area, Windows has it nice, just right-click on the menu item to edit it).  Anyway, I then click the Edit K Menu button, which brings up KMenuEdit.&lt;br /&gt;&lt;br /&gt;Only KMenuEdit doesn't show any entries under Development/IDE, which is where I have both NetBeans and Eclipse.  Both show up on the KMenu, but neither do under KMenuEdit.  I search the KDE bug database, and it appears that this is a SuSE bug, already fixed in a later version.  (Mighty nice to be able to search a product's bug database.)&lt;br /&gt;&lt;br /&gt;So where does KDE store this info?  Apparently in .desktop files.  I found netbeans.desktop in /usr/share/applications, updated to reflect the newly installed app.  I'm guessing that the installer took care of that, pleasantly enough.  The Eclipse one, that I added manually, was in ~/.local/share/applications/Eclipse.desktop.&lt;br /&gt;&lt;br /&gt;So, it turned out that I needn't have gone to this trouble, but I figured I'd post this in case others have this difficulty, or are new to KDE and are curious.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110329781915073782?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110329781915073782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110329781915073782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110329781915073782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110329781915073782'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/desktop-files-and-kmenuedit.html' title='.desktop Files and KMenuEdit'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110323092208689137</id><published>2004-12-16T16:01:00.000-05:00</published><updated>2004-12-16T16:02:02.086-05:00</updated><title type='text'>ssh Without a Password</title><content type='html'>Okay, I have access to another box.  I can ssh into it, but it requires a password, so I copy id_dsa.pub to server, put it in a .ssh dir, rename it to authorized_keys, but ssh still requires password; &lt;code&gt;ssh -vvv&lt;/code&gt; says:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;debug1: Offering public key: /home/djaquay/.ssh/id_dsa&lt;br /&gt;debug3: send_pubkey_test&lt;br /&gt;debug2: we sent a publickey packet, wait for reply&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;then a delay, then:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;debug2: we did not send a packet, disable method&lt;br /&gt;debug3: authmethod_lookup password&lt;br /&gt;debug3: remaining preferred: ,password&lt;br /&gt;debug3: authmethod_is_enabled password&lt;br /&gt;debug1: Next authentication method: password&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I'm not sure what that "debug2: we did not send a packet" means, especially as the earlier debug2 says "we sent", (past tense).  I've verified the authorized_keys in ~/.ssh, and it looks fine.  I vaguely remember something like this happening a while back, but don't recall how i solved it (should have blogged it then; will blog it now).&lt;br /&gt;&lt;br /&gt;I changed sshd_config on host to only use protocol 2, and uncommented the 'PubkeyAuthentication yes' and 'AuthorizedKeysFile .ssh/authorized_keys' lines, to no avail.&lt;br /&gt;&lt;br /&gt;Odd thing: doing '/etc/init.d/sshd restart' doesn't drop my current connection; ah, it forks the process for each connection, so it restarts the main process, making new connections off the restarted one.  I drop my own connection after doing each restart.&lt;br /&gt;&lt;br /&gt;Talked to my network guy after suspecting that my box didn't have a proper name or DNS entry; he fixed that, and now there's no delay before being asked for my password.&lt;br /&gt;&lt;br /&gt;Finally broke down and Googled for that "we did not send a packet" message, and voila (as they say in France), up turned a message on the SecurityFocus forum saying that my .ssh directory and authorized_keys file must both not be group or world writeable; both were, and once fixed, no password was required.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110323092208689137?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110323092208689137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110323092208689137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110323092208689137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110323092208689137'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/ssh-without-password.html' title='ssh Without a Password'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110321009365577256</id><published>2004-12-16T10:13:00.000-05:00</published><updated>2004-12-16T10:14:53.656-05:00</updated><title type='text'>System.setOut()</title><content type='html'>&lt;a href="http://www.churchillobjects.com/c/12005.html"&gt;This post&lt;/a&gt; talks about using System.setOut() to change where System.out sends its output.  Useful, as the article mentions, when you don't really want everything going to stdout.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110321009365577256?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110321009365577256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110321009365577256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110321009365577256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110321009365577256'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/systemsetout.html' title='System.setOut()'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110320680334599983</id><published>2004-12-16T08:47:00.000-05:00</published><updated>2004-12-16T09:20:03.346-05:00</updated><title type='text'>Bootchart and Visualization</title><content type='html'>From &lt;a href="http://www.slashdot.org"&gt;Slashdot&lt;/a&gt; recently comes this article on &lt;a href="http://linux.slashdot.org/article.pl?sid=04/12/15/1848220"&gt;Linux boot performance visualization&lt;/a&gt;.  In addition to being somewhat interested in boot time optimization, I was quite intrigued by the images that &lt;a href="http://bootchart.sf.net"&gt;bootchart&lt;/a&gt; puts out.&lt;br /&gt;&lt;br /&gt;I'm fascinated by the power of visualization, especially as it relates (or possibly might relate) to coding.  From simple stuff like editors that collapse method bodies to the use of UML and beyond, it's something that I just have this gut feel could really be powerful in comprehending a system and making informed, meaningful changes to it.&lt;br /&gt;&lt;br /&gt;(OTOH, I could also just be fascinated by small, shiny objects...)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110320680334599983?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110320680334599983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110320680334599983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110320680334599983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110320680334599983'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/bootchart-and-visualization.html' title='Bootchart and Visualization'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110269866534967610</id><published>2004-12-10T13:05:00.000-05:00</published><updated>2004-12-10T12:11:05.350-05:00</updated><title type='text'>Eclipse and the Mouse Scroll Wheel</title><content type='html'>In getting back accustomed to using Eclipse, I was playing around with the mouse wheel.  Seems that when I scroll with it, the page moves by half of the page height, which is counter to how just about every other app uses the scroll wheel.  I Googled for a solution, but found none, and went to the Eclipse IRC channel on Freenode and got an answer.&lt;br /&gt;&lt;br /&gt;Seems that Eclipse on Linux uses GTK+, and the version of GTK+ I have (2.2.4) is what's making Eclipse do that.  Apparently it's not something that Eclipse controls, and that has been fixed in more recent versions of GTK+.  Oh well, guess I won't be using the scroll wheel for now.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110269866534967610?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110269866534967610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110269866534967610' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110269866534967610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110269866534967610'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/eclipse-and-mouse-scroll-wheel.html' title='Eclipse and the Mouse Scroll Wheel'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110269832200466765</id><published>2004-12-10T11:01:00.000-05:00</published><updated>2004-12-10T12:05:22.003-05:00</updated><title type='text'>Loads of Fun</title><content type='html'>Well, I've been busy, and haven't posted as things have been going fairly swimmingly.  So let's see, what have I done?&lt;br /&gt;&lt;br /&gt;I got a test servlet and test JSP page running under Tomcat, and a simple object coded, using Eclipse.  (Eclipse is way cool, BTW.  More on that later.)&lt;br /&gt;&lt;br /&gt;I got Spring's MVC running and forwarding a request to that JSP as a view.  Spring is way cool as well.&lt;br /&gt;&lt;br /&gt;I also got Spring to expose that simple object via SOAP, using Axis.  One little oddity there: I had setup Spring to handle requests to Axis under a ./axis path; Axis puts a default page at that location with links to request the WSDL files, but the links assume that you're running under a ./services path.  I tried them out first thing, and they broke, leading me to think something more serious was wrong.  I switched my web.xml servlet-mapping to put the Axis servlet under ./services, and all was well.&lt;br /&gt;&lt;br /&gt;I then got an object talking to PostgreSQL via their JDBC drivers.  Actually, jdbc.postgres.org was down, but I managed to get fairly current drivers from someone off of the IRC channel on Freenode.&lt;br /&gt;&lt;br /&gt;Lastly, I got some data objects coded up for my sample database, using JNI to make calls into a company-internal library that we have.  It's been a while since I've done any C coding, but it brought back some mostly-good memories.  (Although I'm not giving up Java to go back, that's for sure.)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110269832200466765?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110269832200466765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110269832200466765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110269832200466765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110269832200466765'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/loads-of-fun.html' title='Loads of Fun'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110211112417160834</id><published>2004-12-03T16:57:00.000-05:00</published><updated>2004-12-03T16:58:44.173-05:00</updated><title type='text'>khubd in "uninterruptible sleep"</title><content type='html'>Curious thing.  My load average is hovering around 1.0, but nothing is taking up any CPU time.  Makes sense, sort of, as the load average is (I believe) the average number of processes active, and not a measure of CPU usage.  So I look at &lt;i&gt;top&lt;/i&gt;, and see that no processes are in run state.&lt;br /&gt;&lt;br /&gt;But there is one, khubd, that's in &lt;i&gt;D&lt;/i&gt; state.  The &lt;i&gt;top&lt;/i&gt; manual reports that this is "uninterruptable sleep".  I Google (of course) for &lt;i&gt;khubd&lt;/i&gt;, and find that it's a kernel thread, and a suggestion that removing &lt;i&gt;usbcore&lt;/i&gt; will kill it.  Curiously enough, I'm not able to automount my USB MP3 player (it worked on my old machine, last week, but not on this one).  Probably not a coincidence.&lt;br /&gt;&lt;br /&gt;So I go to unload &lt;i&gt;usbcore&lt;/i&gt;.  &lt;i&gt;usbcore&lt;/i&gt; is used by three other modules: &lt;i&gt;usb_storage&lt;/i&gt;, &lt;i&gt;usbserial&lt;/i&gt;, and &lt;i&gt;uhci_hcd&lt;/i&gt;.  I remove &lt;i&gt;usbserial&lt;/i&gt;; no problem.  I &lt;i&gt;rmmod uhci_hcd&lt;/i&gt;, and now I have two processes in &lt;i&gt;D&lt;/i&gt; mode, the new one being &lt;i&gt;rmmod&lt;/i&gt;.  Can't &lt;i&gt;kill&lt;/i&gt; or &lt;i&gt;kill -9 rmmod&lt;/i&gt;; the kernel is serious about the uninterruptible thing.  Hrm.  Time to reboot?&lt;br /&gt;&lt;br /&gt;Bounced my machine, &lt;i&gt;khubd&lt;/i&gt; came back, but is now in &lt;i&gt;S&lt;/i&gt; mode, or just sleeping.  I suppose the next thing to try is plugging in my MP3 player again, and see if that's what wedged &lt;i&gt;khubd&lt;/i&gt;.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110211112417160834?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110211112417160834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110211112417160834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110211112417160834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110211112417160834'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/khubd-in-uninterruptible-sleep.html' title='khubd in &quot;uninterruptible sleep&quot;'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110202452883168405</id><published>2004-12-02T16:42:00.000-05:00</published><updated>2004-12-02T16:55:28.830-05:00</updated><title type='text'>Moving up to Firefox</title><content type='html'>I've been using Mozilla for a while now.  Probably since version 1.1, IIRC.  I've been interested in Firefox since it was announced, but not interested enough to give it a try.  Well, coming into a new job, I decided to try it out.  Peer pressure, and all that.&lt;br /&gt;&lt;br /&gt;I love it.&lt;br /&gt;&lt;br /&gt;I had been thinking all along that it really wouldn't be that much of a change from Mozilla, but I was wrong.  It's got much nicer fonts, for starters.  Much easier on the eyes.&lt;br /&gt;&lt;br /&gt;The search bar is really cool; Ctrl-K takes you to a search field that defaults to searching Google, but has several other search engines as well, including Amazon and eBay.  And you can add more.  There are hundreds (!) of search engine plugins that you can get from Mozilla.org.  I added Wikipedia and SourceForge; you can get CDDB or IMDB, Creative Commons, and a huge number of specialty sites.  Nifty.&lt;br /&gt;&lt;br /&gt;It's a small download, too.  Less than 5MB.  It does this by not having many of the standard plugins like Flash and Shockwave, but it makes getting them a snap, if you want to.  (I don't.  At least not yet.)&lt;br /&gt;&lt;br /&gt;Of course, it still has tabbed browsing and popup blocking, but now popups are blocked by default, which is nice.  The preferences are leaner as well, and better organized.  Much more like OS X than Windows.  (Mr. Bill hasn't innovated his way back up to Apple yet, apparently.)&lt;br /&gt;&lt;br /&gt;Finding on the page is really neat; Ctrl-F opens an unobtrusive little find bar at the bottom of the page, which stays there until you close it by pressing Esc.  Beats the Ctrl-F, type-a-term, Cancel, Ctrl-G dance I used to do.&lt;br /&gt;&lt;br /&gt;Anyway, Firefox is a really nice browser, and really worth the trivial amount of time it took to install it.  I can really see why all of the early adopters have been switched to this for months, and why IE is losing percentage points so fast.  Way, way cool.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110202452883168405?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110202452883168405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110202452883168405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110202452883168405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110202452883168405'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/12/moving-up-to-firefox.html' title='Moving up to Firefox'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110174549817453623</id><published>2004-11-29T11:23:00.000-05:00</published><updated>2004-11-29T11:24:58.173-05:00</updated><title type='text'>Wrestling with Axis</title><content type='html'>More on Axis.  Started playing with the examples, and got 1 and 2 working just fine.  That .jws thing is pretty cool.&lt;br /&gt;&lt;br /&gt;Then I got to example3.  I got the MyService.java and Client.java files to compile fine, then ran AdminClient on deploy.wsdd to deploy them.  Got a "401 Unauthorized" back in an AxisFault, and went looking for how to setup admin security.  Poked around a bit, and found not much on AdminClient.  Started looking at AdminServlet, which said not much, and AxisServlet, which has a WSDL that just exposes an AdminService method, but says nothing about how to configure it on the back end.&lt;br /&gt;&lt;br /&gt;I had seen mention of server-config.wsdd, but when I looked for it, I didn't find it.  Eventually, I grepped the docs for mention of it, and found in reference.html that Axis will create it if it doesn't exist, and will add to it when you deploy things.  So I created it, and added a globalconfiguration section and an adminPassword parameter.  The 401 went away, replaced instead by a "500 Internal Server Error" and a voluminous stack trace.&lt;br /&gt;&lt;br /&gt;Looking at the exception output, it said "Invalid WSDD element 'globalConfiguration' (wanted 'deployment')", which contradicts reference.html.  Ah, (oops), it wants that globalConfiguration wrapped in a deployment tag.  (Googled and found an example server-config.wsdd, and mirrored the relevant parts of that; did I mention that I love Google?)&lt;br /&gt;&lt;br /&gt;So now my AxisFault says "Server.NoService", and "The AXIS engine could not find a target service to invoke!  targetService is null" when I run AdminClient.  Seems that if server-config.wsdd is missing, AdminService (and Version) get deployed, but if server-config.wsdd is present, only those services listed therein get deployed.  Okay, fine, how do I deploy AdminService manually?  No wsdd file ships with Axis, it seems (apart from the ones in the samples dir).&lt;br /&gt;&lt;br /&gt;I then reread the install instructions, that say that "the client" (presumably AdminClient) has a default password, so I decide to go look at the source and find out what the default password is (on the server) so I can provide it to the client; I assume that it's out of sync.  In the process, (of looking through the Axis CVS), I find a server-config.wsdd that has reasonable-looking entries for AdminService (and Version).  Plopped them into my server-config.wsdd, kicked Axis via Tomcat, and I'm back to a 401.  Grrr.&lt;br /&gt;&lt;br /&gt;After looking at the Admin.java source in CVS, I decide to at least try enabling the remote access, just in case.  Sure enough, I make that change, and life is fine; "AdminClient list" returns the blob of XML expected.  Harumph.  I'm doing this all on one box, so why didn't it see that I'm local?!&lt;br /&gt;&lt;br /&gt;Okay, back to what I had been doing.  I run the example3 deploy.wsdd, and it accepts it.  Running AxisServlet lists MyService.  Running Client says "The AXIS engine could not find a target service to invoke!  targetService is null".  This is what I got before when Axis wasn't running anything, but now, if I do a "AdminClient list", it shows MyService, with allowedMethods of "*" and a correct classname.&lt;br /&gt;&lt;br /&gt;Now, oddly enough, I went looking for the .class file under Tomcat, under WEB-INF/classes, and found an old version, that I'm guessing shipped with Axis and that I had copied over when I installed Axis under Tomcat.  So I replace that with the one I just compiled.  I undeployed, and the file remained.  So is this where the file gets deployed?  And do I have to place the .class file(s) myself, or does the deploy.wsdd and AdminClient take care of that?&lt;br /&gt;&lt;br /&gt;I removed MyService.class, undeployed, and deployed, and can find no MyService.class anywhere under tomcat/webapps.  So I copied it there.  Same error.  Un/redeployed (via AdminClient and the wsdd files).  Same error.&lt;br /&gt;&lt;br /&gt;If I go to the MyService URL, Axis says "Hi there, this is an AXIS service!", while if I go to another, invalid one, Axis says "No service is available at this URL".  So I'm guessing that Axis at least knows that it should know about the service.  But from Client, hitting either MyService or a known invalid one both generate the "targetService is null" message.  Kicked Axis, then Tomcat.  Same error.  Removed every copy of MyService.class I could find.  Same error, and yet the un/redeploy worked fine.  How *does* this work?&lt;br /&gt;&lt;br /&gt;Ran happiness page again, installed mail.jar (just for grins), and kicked Axis.  Ran AxisServlet page, and got message saying "Fault - Could not find class for the service named: samples.userguide.example3.MyService.  Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using)."  Nice of them to confirm that.&lt;br /&gt;&lt;br /&gt;Copied MyService.class file into Tomcat's webapps/axis/WEB-INF/classes/samples/userguide/example3.  Reloaded AxisServlet, and the "Fault" message went away.  Still get the "targetService is null" message, but at least I can see that I need to place the class files myself, and that I'm doing so in the right place.  Time to post to the board, methinks.&lt;br /&gt;&lt;br /&gt;Or just Google for "targetService".  Found a message from Steve Maring (thanks, Steve) saying that you can't just pull down an incomplete version of server-config.wsdd, or use deploy.wsdd in its place.  Instead, extract it from axis.jar, and modify it to include what you need.  Did so, re-enabled remote admin, kicked Axis, redeployed the example, and it worked.  All's well that ends well, I suppose, but somebody deserves a "grrrr"!&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110174549817453623?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110174549817453623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110174549817453623' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110174549817453623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110174549817453623'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/wrestling-with-axis.html' title='Wrestling with Axis'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110124726248495186</id><published>2004-11-23T16:59:00.000-05:00</published><updated>2004-11-23T17:01:02.486-05:00</updated><title type='text'>Tomcat Manager</title><content type='html'>Okay, Tomcat has a Manager (which can be discovered via RTFM) that can redeploy a webapp without bouncing the whole thing.  RTFM.  It's your friend.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110124726248495186?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110124726248495186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110124726248495186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110124726248495186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110124726248495186'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/tomcat-manager.html' title='Tomcat Manager'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110124215028503465</id><published>2004-11-23T15:35:00.000-05:00</published><updated>2004-11-23T15:35:50.286-05:00</updated><title type='text'>Spring and Axis</title><content type='html'>Started looking into &lt;a href="http://www.springframework.org/"&gt;Spring&lt;/a&gt;.  Inversion of Control (IoC) and Dependency Injection are pretty cool things.  (See &lt;a href="http://martinfowler.com/articles/injection.html"&gt;Martin Fowler's article&lt;/a&gt; for more info on that.)  Spring uses IoC/DI to remove dependencies from your objects, turning them into &lt;a href="http://c2.com/cgi/wiki?PlainOldJavaObject"&gt;POJO's&lt;/a&gt;, which in turn makes them much easier to &lt;a href="http://c2.com/cgi/wiki?TestDrivenDevelopment"&gt;test&lt;/a&gt;.  And Spring makes using web services (via JAX-RPC, anyway) a much easier task.&lt;br /&gt;&lt;br /&gt;So I'm now setting up &lt;a href="http://ws.apache.org/axis/"&gt;Axis&lt;/a&gt;.  You plop it into Tomcat, then run a test page to see if all's well.  It wasn't.  It complained: "Error: could not find class javax.activation.DataHandler from file activation.jar".  I have a few different versions of activation.jar on my box; I copied the one that came with Spring into axis/WEB-INF/lib, but Tomcat didn't see it without a restart.  (There's probably a better way to get it to see it; I'll look into that shortly...)&lt;br /&gt;&lt;br /&gt;With activation.jar in place, Axis' test page is all happy, so I tried out a couple of the samples, and got NullPointerExceptions.  Poked around on Google a bit, and it seems that Axis 1.1 doesn't play nice with JDK 1.5.  Grabbed Axis 1.2RC2, installed it, replaced it in Tomcat, added activation.jar, got the happy page working, tried the samples, and viola (as they say in France), I get proper responses.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110124215028503465?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110124215028503465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110124215028503465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110124215028503465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110124215028503465'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/spring-and-axis.html' title='Spring and Axis'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110079506073995149</id><published>2004-11-18T11:22:00.000-05:00</published><updated>2004-11-18T11:24:20.740-05:00</updated><title type='text'>SuSE and my Muvo</title><content type='html'>I had played around under Gentoo with my old USB keydrive, and got it to do a directory listing, but not read or write.  It was still on my list of things to pursue at some point.  So it was with a wee bit of trepidation that I plugged in my Creative Labs Muvo NX MP3 player into my work box, (running SuSE 9.1).  See, I really, &lt;b&gt;really&lt;/b&gt; needed my .emacs file from home to be able to work like I am accustomed to.&lt;br /&gt;&lt;br /&gt;Well, nothing to see here, folks.  I plugged it in, heard some HD chatter, and got a dialog asking me if I wanted to open a KDE app when new media is detected.  It found the drive, mounted it under /media, and popped up a file browser.  Copied off the desired files, pruned a few podcasts that I listened to on the way in to work this morning, and I'm good to go.  Even better, I can now work in Emacs like I like.&lt;br /&gt;&lt;br /&gt;I'm liking SuSE more and more.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110079506073995149?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110079506073995149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110079506073995149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110079506073995149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110079506073995149'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/suse-and-my-muvo.html' title='SuSE and my Muvo'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110071820043867387</id><published>2004-11-17T13:22:00.000-05:00</published><updated>2004-11-17T14:03:20.436-05:00</updated><title type='text'>Bruce Eckel on Thinking in a Different Language</title><content type='html'>&lt;a href="http://gatorjug.org"&gt;GatorJUG&lt;/a&gt; has (or had, I can't find the archives at the moment) a podcast of Bruce Eckel talking about programming languages.  The point he made (or at least the one I was most interested in; he talked about a couple of things) was that you think differently in different languages.&lt;br /&gt;&lt;br /&gt;One example he gave was about dynamically loading a class at runtime.  In C++, it's possible (he said), but not something you're likely to even think about doing.  In Java, it's quite easy, making it something that you'll probably run across at some point.  And while you can dynamically create classes at runtime in Java, in Python it's a very simple exercise.  Using each language gives you a different insight on solving problems, and mixing languages can be a real boon to solve a given problem, given the strengths of each.&lt;br /&gt;&lt;br /&gt;He also mentioned the type differences among C++, Java and Python, and how loosening up type restrictions greatly changes the nature of solving some problems.&lt;br /&gt;&lt;br /&gt;He also mentioned the applicability of this idea to natural langauges as well.  This is something I've been greatly curious about, and is one of the reasons I'd love to learn a 2nd language.  I'd love to see just how different expressing given ideas or thoughts are between two languages, and whether thinking in another language would change those ideas, somehow.  (Maybe next month...)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110071820043867387?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110071820043867387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110071820043867387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110071820043867387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110071820043867387'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/bruce-eckel-on-thinking-in-different.html' title='Bruce Eckel on Thinking in a Different Language'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110071571344598292</id><published>2004-11-17T13:20:00.000-05:00</published><updated>2004-11-17T13:21:53.446-05:00</updated><title type='text'>Ant, Java and SuSE Mixup</title><content type='html'>My "new", current, (temporary) work machine is an older box with 190MB RAM, which isn't quite up to the task of running Netbeans.  (NB takes up more than that by itself.)  So I've dropped back to coding in Emacs, and running the NB project Ant script (and Ant) from the command line.  (I should get a better machine by next week.)&lt;br /&gt;&lt;br /&gt;Which brings us back to the question of how to setup the taskdef classpath without using the NB dialogs.  It looks like NB wires stuff up before calling Ant during builds, but doesn't make it apparent what gets wired or to what values.&lt;br /&gt;&lt;br /&gt;I ended up using properties for the XDoclet jars, chaining them together into another property for the classpath required for a single taskdef, and putting that property into the taskdef's classpath attribute.&lt;br /&gt;&lt;br /&gt;Then it wouldn't compile.  My setup was thus: Java 1.4.2 was already installed on the machine, I then installed 1.5 manually (i.e. not via SuSE's mechanism, as they didn't have 1.5, at least in YaST), and then installed Ant via YaST.  The Ant script (in /usr/bin/ant), for some reason, was assuming that I was using a 1.3 JDK, and when run, ant said "Unable to locate tools.jar. Expected to find it in /usr/lib/SunJava2-1.4.2/lib/tools.jar".  Took me a while, but I found the line in /usr/bin/ant that referred to 1.3, changed it to 1.5, then looked at the setJava script, and created the proper .conf file in /etc/java.  And voila, no runs, no drips, no errors.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110071571344598292?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110071571344598292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110071571344598292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110071571344598292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110071571344598292'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/ant-java-and-suse-mixup.html' title='Ant, Java and SuSE Mixup'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110019563314056661</id><published>2004-11-11T13:51:00.000-05:00</published><updated>2004-11-11T12:53:53.140-05:00</updated><title type='text'>More on Ant Paths</title><content type='html'>Tried running build.xml from the command line, and got errors regarding XDoclet.  Makes sense; I mentioned earlier that I added the XDoclet jars in the Additional Classpath entry under Ant settings in Netbeans, which means that they're not listed in the build.xml itself.  Gotta change that.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110019563314056661?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110019563314056661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110019563314056661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110019563314056661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110019563314056661'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/more-on-ant-paths.html' title='More on Ant Paths'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110019538327700109</id><published>2004-11-11T13:46:00.000-05:00</published><updated>2004-11-11T12:49:43.276-05:00</updated><title type='text'>Odd XDoclet Error</title><content type='html'>Tried to get XDoclet to generate a .wsdl file; got error saying something about an ambiguous subtask definition for &lt;code&gt;deploymentdescriptor&lt;/code&gt;.  Couldn't figure out what to do about it, and Googling revealed nothing useful.  I had two targets, one each for wseedoclet and ejbdoclet.  I combined them, and it worked.&lt;br /&gt;&lt;br /&gt;I decided to blog this, so I moved wseedoclet back to its own target to get it to generate the error message again, and it worked.  Go figure.  Even after doing a clean and build, etc.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110019538327700109?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110019538327700109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110019538327700109' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110019538327700109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110019538327700109'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/odd-xdoclet-error.html' title='Odd XDoclet Error'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-110004079789366749</id><published>2004-11-09T17:47:00.000-05:00</published><updated>2004-11-09T17:53:17.893-05:00</updated><title type='text'>Netbeans, Ant and XDoclet</title><content type='html'>Today, I played around with getting NetBeans 4.0 Beta 2, Ant 1.6.2 and XDoclet 1.2.2 to talk together and play nice.  (NB 4.2b2 comes w/Ant 1.6.2 built in; XDoclet is separate.)  The goal was to get JBoss into the mix as well, but that'll probably have to wait until tomorrow.&lt;br /&gt;&lt;br /&gt;I created a simple project (Hello, from the Mastering EJB 2.0 book).  NB shows the build.xml file under the Files tab (and not on the Project tab, where I was first looking for it).  build.xml expands to show all targets; most of the targets live under nbproject/build-impl.xml, and several are empty and can be overridden in build.xml.  (The overridables are listed in a comment.)&lt;br /&gt;&lt;br /&gt;For background, Ant build files set up chains of dependent targets.  NB's default is &lt;code&gt;default&lt;/code&gt;, which depends on &lt;code&gt;dist&lt;/code&gt; and &lt;code&gt;javadoc&lt;/code&gt;.  &lt;code&gt;dist&lt;/code&gt; in turn depends on &lt;code&gt;init&lt;/code&gt;, &lt;code&gt;compile&lt;/code&gt;, &lt;code&gt;pre-dist&lt;/code&gt;, &lt;code&gt;do-dist&lt;/code&gt; and &lt;code&gt;post-dist&lt;/code&gt;, which it most likely runs in that order; each of these depend on others, and so on.&lt;br /&gt;&lt;br /&gt;So I added various tags to my simple bean file.  At the class level, I added an &lt;code&gt;@ejb.bean&lt;/code&gt; tag, with name and type attrs.  jndi-name and local-jndi-name attrs also look useful.  I also added an &lt;code&gt;@ejb.interface-method&lt;/code&gt; tag to my one business method.&lt;br /&gt;&lt;br /&gt;In build.xml, I added an &lt;code&gt;ejbdoclet&lt;/code&gt; target, with an embedded task of the same name, depending on &lt;code&gt;init&lt;/code&gt;.  The &lt;code&gt;destdir&lt;/code&gt; attr looked most useful, and I added an &lt;code&gt;excludedtags&lt;/code&gt; and &lt;code&gt;verbose&lt;/code&gt; attr as well.  I then added &lt;code&gt;remoteinterface&lt;/code&gt;, &lt;code&gt;localinterface&lt;/code&gt;, &lt;code&gt;homeinterface&lt;/code&gt; and &lt;code&gt;localhomeinterface&lt;/code&gt; elements (all empty), and a &lt;code&gt;fileset&lt;/code&gt; that listed my one source file, explicitly.&lt;br /&gt;&lt;br /&gt;I'm pretty sure there's a better way to list my source files.  I tried &lt;code&gt;**/*.java&lt;/code&gt;, but with my destdir putting the generated files into my source dir (which may be a problem), compiling a 2nd time gives me interfaces for my interfaces, which is wrong.  So for the moment, I'm listing each file separately, and will be looking for a better way.  Like having a "generated" directory that's separate, or something.  Suggestions welcome.&lt;br /&gt;&lt;br /&gt;Then I troubleshot it.  First off, it couldn't find the &lt;code&gt;ejbdoclet&lt;/code&gt; task.  Played around with the compile classpath, to no avail.  Found that I could add an Ant &lt;code&gt;classpath&lt;/code&gt; element under the taskdef, but that felt unwieldy, especially as I had 5-6 jars eventually to add.  Was about to separate it out as an Ant typedef, then thought that since Ant is a proper part of NB, there should be a config option.  There was, under Tools/Options, Building, Ant Settings, Additional Classpath.  Added several files there (xdoclet, xdoclet-ejb-module, xjavadoc, commons-logging and -collections, and jboss-j2ee.jar), and life was good.&lt;br /&gt;&lt;br /&gt;I was also getting empty bean interfaces.  Seems I forgot to put the @ejb.interface-method on the method, but adding the tag fixed that.&lt;br /&gt;&lt;br /&gt;One thing made it slightly harder than it should have been.  I had intended to start out with a very simple stateless session bean, and mimic xdoclet's sample.  It turns out that xdoclet's sample stateless session bean was a sample of how *NOT* to let xdoclet generate the interfaces for you.  Bad choice on my part.  Ah well.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-110004079789366749?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/110004079789366749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=110004079789366749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110004079789366749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/110004079789366749'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/netbeans-ant-and-xdoclet.html' title='Netbeans, Ant and XDoclet'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-109953543257060667</id><published>2004-11-03T21:10:00.000-05:00</published><updated>2004-11-03T21:30:32.570-05:00</updated><title type='text'>Shared Library Woes</title><content type='html'>Pulled down Sun's J2EE SDK, and ran the installer, which couldn't find &lt;code&gt;libstdc++-libc6.2-2.so.3&lt;/code&gt;.  Found what I thought was the Gentoo package, but all were masked.  Set ~x86 in ACCEPT_KEYWORDS in /etc/make.conf, emerged, and tried the installer again; no luck.  Googled, and found that the file is part of the libstdc++2.10-glibc2.2 package; did emerge search, but didn't find it.  &lt;code&gt;qpkg -f libstdc++-libc6.2-2.so.3&lt;/code&gt; turned up nothing.  Googled again, found libstdc++2.10-glibc2.2 in a .deb file on packages.debian.org.&lt;br /&gt;&lt;br /&gt;Okay, now how do I pry apart a .deb file on a Gentoo system?  Wikipedia knew; it's an &lt;code&gt;ar&lt;/code&gt; file, that contains .tar.gz files.  No sweat, extracted the file, the installer didn't find it; remembered to run ldconfig; didn't find it; looked for the file; didn't find it.  what!?&lt;br /&gt;&lt;br /&gt;Re-extracted it, looked closer, and saw that it's just a link; extracted the link target, copied that as the link name, ran ldconfig, ran the installer, found it; whew.&lt;br /&gt;&lt;br /&gt;I couldn't imagine that Gentoo didn't have this somewhere, so went back and searched the forums.  Didn't find it.  Googled for it, saying 'libstdc++-libc6.2-2.so.3 site:gentoo.org'.  Found it, it's in lib_compat.  emerged that, and life's good.  &lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-109953543257060667?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/109953543257060667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=109953543257060667' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109953543257060667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109953543257060667'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/shared-library-woes.html' title='Shared Library Woes'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-109943445653542792</id><published>2004-11-02T17:02:00.000-05:00</published><updated>2004-11-02T17:27:36.536-05:00</updated><title type='text'>PostgreSQL == Good</title><content type='html'>Despite having finished the emerging that I thought might have been causing problems, Eclipse continues to crash (I will pursue this later).&lt;br /&gt;&lt;br /&gt;I worked through the PostgreSQL tutorial and docs, and got things running on my machine.  I'm liking PostgreSQL as well; table inheritance looks like a neat thing.  I'm sure there are times when I wish I'd had this.  And I assume you can do things like abstract base tables as well, which I certainly wish I could have had elsewhere.&lt;br /&gt;&lt;br /&gt;emerging libgnomecanvas stopped with a complaint about not finding index.sgml.  Again, I searched the Gentoo forums; finding a message saying to re-emerge gtk-doc; no luck.  A followup said to try &lt;code&gt;USE="-doc" emerge&lt;/code&gt;, which worked.  Same thing happened with libgnome and libgnomeui, same solution.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-109943445653542792?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/109943445653542792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=109943445653542792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109943445653542792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109943445653542792'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/postgresql-good.html' title='PostgreSQL == Good'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-109941806001474487</id><published>2004-11-02T13:47:00.000-05:00</published><updated>2004-11-02T12:54:20.013-05:00</updated><title type='text'>Missing gconf-2.0.pc during emerge</title><content type='html'>During an emerge of gnome-vfs, got error message of 'Library dependencies ... not met'.  Turned out that gconf-2.0.pc was missing.  Searched Gentoo forums, and found a suggestion to copy in existing gconf-2.0.pc; didn't exactly like that, as I wasn't sure how appropriate it was for my system.&lt;br /&gt;&lt;br /&gt;So I untarred /usr/portage/distfiles/GConf-2.6.2.tar.bz2, and ran ./configure, which created a gconf-2.0.pc; copied that to /usr/lib/pkgconfig, and re-emerged gnome-vfs.  No luck, got report that header file was missing.  I examined gconf-2.0.pc, did a locate for missing header file, and hence saw what needed to be fixed in gconf-2.0.pc, (prefix was pointing to /usr/local, and should have pointed to /usr).  Re-emerged gnome-vfs, which worked fine this time.&lt;br /&gt;&lt;br /&gt;Still not sure why a) the wrong value was generated by configure, and b) the file wasn't placed where it should have been.  But it works, and I can continue.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-109941806001474487?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/109941806001474487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=109941806001474487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109941806001474487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109941806001474487'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/missing-gconf-20pc-during-emerge.html' title='Missing gconf-2.0.pc during emerge'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-109935087559962795</id><published>2004-11-01T18:05:00.000-05:00</published><updated>2004-11-01T18:14:35.600-05:00</updated><title type='text'>Started in on Netbeans; Eclipse Trouble</title><content type='html'>Got Netbeans 3.6 running, and started playing with it.  Worked through the QuickStart and Using guide.  It looks fine, but feels a little sluggish compared to what I remember Eclipse being.  But A) I'm also doing emerges (compiles) at the same time, and B) I'm probably not on as fast a box as I was when I used Eclipse.  I pulled down Eclipse 3.0.1, and will compare apples to apples tomorrow.&lt;br /&gt;&lt;br /&gt;I do like Netbeans' Import Management Tool.  Nice amount of control over how you specify and manage your imports.  And I wish I'd had a GUI editor when I was doing that Swing stuff.&lt;br /&gt;&lt;br /&gt;As a footnote, Eclipse was crashing on me, but again, I was mid-compile, and the .so's that Eclipse listed on the dump were on both sides of my compile, so I'll wait until I'm not messing with stuff before trying to troubleshoot.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-109935087559962795?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/109935087559962795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=109935087559962795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109935087559962795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109935087559962795'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/11/started-in-on-netbeans-eclipse-trouble.html' title='Started in on Netbeans; Eclipse Trouble'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-109927559196461281</id><published>2004-10-31T20:58:00.000-05:00</published><updated>2004-10-31T21:19:51.963-05:00</updated><title type='text'>Getting D-Link DWL-520 Wireless Working</title><content type='html'>Spent an hour or two yesterday getting my D-Link DWL-520 wireless NIC working under Gentoo.  I found a Howto at &lt;a href="http://home.columbus.rr.com/andrewbarr/linux/dwl520e1.html"&gt;this site&lt;/a&gt;, which worked great, except it didn't mention what iwconfig commands I needed, saying only that "[t]he sequencing of commands will vary by network".  Googling for "dwl-520 iwconfig" took me to the hostap mailing list, and the following commands:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ifconfig wlan0 up&lt;br /&gt;iwconfig wlan0 mode managed&lt;br /&gt;iwconfig wlan0 essid "your-essid-here"&lt;br /&gt;ifconfig wlan0 192.168.1.100&lt;br /&gt;ifconfig wlan0 up&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;... and now I'm online.  Whee!&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-109927559196461281?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/109927559196461281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=109927559196461281' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109927559196461281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109927559196461281'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/10/getting-d-link-dwl-520-wireless.html' title='Getting D-Link DWL-520 Wireless Working'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8955755.post-109926773496936162</id><published>2004-10-31T19:05:00.000-05:00</published><updated>2004-10-31T19:08:54.970-05:00</updated><title type='text'>First Post!</title><content type='html'>First post!  Oh, wait, this is &lt;b&gt;my&lt;/b&gt; blog.&lt;br /&gt;&lt;br /&gt;Anyway, I'm getting back to the Java world, and wanted to have a place to put all of my Java (and possibly Linux) experience.  I figure I'll keep this for my techie work stuff, and my &lt;a href="http://djaquay.blogspot.com"&gt;other blog&lt;/a&gt; for all of my wisdom. (!?)&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8955755-109926773496936162?l=javadave.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javadave.blogspot.com/feeds/109926773496936162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8955755&amp;postID=109926773496936162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109926773496936162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8955755/posts/default/109926773496936162'/><link rel='alternate' type='text/html' href='http://javadave.blogspot.com/2004/10/first-post.html' title='First Post!'/><author><name>djaquay</name><uri>http://www.blogger.com/profile/08701649145513988342</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_YXQB5XMwqfE/SragmKC9XqI/AAAAAAAAAAM/XSCvuatLVSs/S220/kidthumb.png'/></author><thr:total>0</thr:total></entry></feed>
