August 23rd, 2007

I hate maggots!

Last night, when I was taking the trash out, I noticed that the trash can in the garage was making a lot of noise. As I went to pull the drawstrings on the trash bag, I saw little worms crawling around the outer edge of the bag. Upon further inspection, I noticed that there were hundreds more crawling around inside the bag. Then I realized what they were: MAGGOTS!

So, I went about trying to kill them. I had a can of Lysol Disinfectant Spray with me, so I tried that first. I sprayed it all over the top of the trash bag, and sprayed a good bit into the trash bag, as well. At that point, I noticed that there were some crawling around on the floor, too. So, I sprayed them as well. But, that didn’t phase them one bit. They kept right on crawling. I carefully grabbed the trash bag and ran it outside to the curb (good thing it was trash night!). Then, I scanned the garage for anything that might kill bugs.

The next poison I saw was a spray bottle of Lysol All-Purpose Cleaner. I assumed that it was stronger stuff than the aerosol spray can I had just used, so I decided to try it on the bugs. I could almost hear them laughing, as they kept on crawling, sometimes walking directly through big puddles of it, when they could have easily gone around. They just didn’t care. By this time, there were about 20 of them crawling around on the floor (that I could see). I had to use something specifically designed to kill bugs.

So, I ran inside and grabbed a can of RAID. The can we had handy did not say anything about maggots or flies on the label, but I hoped it might work better than nothing. So I sprayed it all over the floor, wherever I saw maggots. I made bigger puddles wherever there were several of them close together. They didn’t seem to mind, and just kept going about their business. By now, I’d seen them crawling under a nearby pile of wood, and more seemed to be crawling out, than were crawling in. Either way, this showed me that they were not only resilient little bastards, but that they were probably already well established in every nearby dark place/crevice. I was freaking out, now, because they seemed to be multiplying, right before my eyes. I could see probably 40 of them, at that point.

Next, I called Lacey, and asked her to look up how to kill maggots. She read about a lot of things that DON’T work, and then found some things that supposedly had worked for some people:

- Products containing permethrin

- Boiling water

- Bleach

I looked around the garage, some more, and found a can of pesticide, in a powder form. A quick glance at the ingredients confirmed that it did have the chemical I was hoping for: permethrin! So I started shaking the powder everywhere I could see the maggots, and also tried to make a barrier around the area that I had been treating thus far, to try and contain them. Somehow, it did not come as much of a surprise when they kept right on crawling, through pools and piles of 4 different poisons.

This was really testing my sanity. I kept worrying that they were on my shoes, or might have grabbed onto the bottom of my pants legs. The barrier didn’t work at all. They were branching out in every direction, at this point. Everywhere I looked, I saw maggots. I could probably see close to 100 of them, at this point, and I knew that there were lots more that I couldn’t see. Oh yeah, I forgot to mention, they were nearly invisible. Their coloring was a perfect match to my concrete garage floor. Without their constant wiggling, I might not have even noticed them. I felt helpless and defeated. But I still had one trick to try: bleach.

I grabbed a huge bottle of bleach, that just happened to be within arm’s reach, and started pouring it on them. I was a little worried about the fact that I was mixing so many harmful chemicals together, but I was much more concerned about killing these evil maggots. They kept right on crawling, though! UGH! Lacey had said something about bleach taking a half hour to kill them, though, so I tried to be patient. The maggots were continuing to expand, and to hide underneath every box, piece of wood, etc. I tried to move a few things out of the way, so I could pour bleach in more places, but I’m pretty sure that every time I moved something, it just helped them spread (because they were already crawling on everything).

Uh-oh, the bleach-pesticide-pesticide-cleaner-disinfectant mix was now working its way across the garage. Apparently the garage slightly slopes so that liquid runs towards the outside driveway. But we’ve got all kinds of bikes, scooters, helmets, jumpropes, baseball bats, etc. stored in the garage, some of it in cardboard boxes. I scrambled to move everything cardboard out of the way, but I was a bit too late. So I had to empty the contents of the wet cardboard boxes, before their contents got wet. Empty them where, though? Wherever I could. Stacked on top of toolboxes, bikes, shelves, plastic tubs, etc. Just had to hurry. I didn’t want this poison mixture getting all over my kids’ stuff.

Finally, I got things pretty well moved around, so the little poison rivers could proceed towards the exit. I figured this was also helping me to spread the poison around, so if the bleach did work after a while, it was already covering a wider area. It was getting very late, so I started picking up my cans of poison and putting them on a shelf. As I was doing that, I kept noticing more maggots in places that hadn’t been treated [enough] yet, so I poured more bleach on them.

I hated leaving the garage in this state, but I really needed to get to bed. I wished there was some way I could burn the tiny demon spawn, without destroying my car or house. Believe me, if I ever find a pile of these things outside, they’re going to burn. Revenge will be mine, someday. Unfortunately there was nothing more I could do, out there, so I closed the garage and prepared to go in for the night.

Before going inside, though, I shook my pants and checked my shoes for maggots. When I got inside, I watched the floor behind me as I walked, to make sure I didn’t see anything wiggling. I was very freaked out and paranoid, at that point, so I undressed slowly and carefully, putting my clothes and shoes into trash bags.

Then, I went up and took a hot shower. Every drop of water, running down my leg or through my hair, made me feel like maggots were crawling on me. I almost felt like taking a bath in bleach, but I wasn’t quite that far gone. If I had actually found maggots crawling on my skin, I might have gone to that extreme. That was one of the most unpleasant experiences I’ve ever, and I’m sure my words cannot express just how horrible it felt.

This morning, I’m feeling a lot better (sanity-wise), but am not touching the garage door until the pest control people come. So, I’m staying home today so I can ensure that these evil creatures get annihilated ASAP.

July 3rd, 2007

SQLException: Charset cp850/Cp850 is not supported by the JVM.

I recently had to reinstall Tomcat on my development server at work, because my previous installation was having major issues for unknown reasons. When I finished installing it, and deploying my webapps to it, I ran into this annoying character set issue (which I was not getting with the previous installation).

I could swear I’d seen this message before, and several of my co-workers thought they recognized it, too, but nobody knew what to do about it. Every time I started the tomcat service, it was spitting out these three stack traces, for every webapp, in my exception log:

Class: net.sourceforge.jtds.jdbc.ConnectionJDBC2
Method: loadCharset
SQL STATE: 2C000
SQL ERROR CODE: 0
STACKTRACE:
java.sql.SQLException: Charset cp850/Cp850 is not supported by the JVM.
[...]

Class: org.apache.catalina.valves.JDBCAccessLogValve
Method: start
EXCEPTION WRAPPER MESSAGE:
[ERROR] ContainerBase.addChild: start:
STACKTRACE:
LifecycleException:
java.sql.SQLException: Charset cp850/Cp850 is not supported by the JVM.
[...]

Class: org.apache.catalina.core.ContainerBase
Method: addChildInternal
EXCEPTION WRAPPER MESSAGE:
[ERROR] Error deploying web application archive [foo].war
STACKTRACE:
java.lang.IllegalStateException: ContainerBase.addChild: start:
LifecycleException: java.sql.SQLException:
Charset cp850/Cp850 is not supported by the JVM.
[...]

NOTE: These stack traces only show the top line and context info, to avoid cluttering up the blog post too much. [View full stack traces here]

To troubleshoot this, I first tried cleaning out all the already-compiled classes/jars from my source code tree, and rebuilding/redeploying all the webapps, but the same behavior continued. Next, I wiped out my whole source code tree, checked it all out from CVS again, and rebuilt/redeployed all the webapps. Still got the stupid cp850 exceptions.

Before, during, and after all of that rebuilding stuff, I spent hours doing web searches on various search engines, tweaking my queries, and not turning up much of anything.

At one point, it seemed like it had to be a problem with my Sybase ASE 12.5 database configuration. I didn’t like the sound of that, though, because it’s much easier to reinstall an app server and redeploy my webapps, than it is to rebuild my database and recreate the necessary test data.

I thought maybe our build script wasn’t deploying the right versions of all the jars that needed to be deployed, so I slowly started copying the jars from my backup of my previous tomcat installation, and copying all the configuration files, and so forth. Eventually, my entire tomcat directory tree had been replaced with the backed-up tomcat installation, but the evil cp850 exceptions still lingered!

Now it was *really* looking like a database issue! I searched all the files on the machine for ‘cp850′ (case-insensitive search), and turned up nothing useful. When I searched the windows registry, I found one thing that was intriguing:

KEY: HKEY_LOCAL_MACHINE\
SOFTWARE\SYBASE\Server\
[MyServerName]_BS\Parameters\
VALUE NAME: Arg5
VALUE TYPE: REG_SZ
VALUE DATA: -Jcp850

I asked my co-workers to check their registries, but they had the same thing, and their servers were behaving just fine. Besides, this was just the backup server (BCKServer), not the actual SQLServer. So that was a dead end.

I poked around for a while longer, and *finally* figured out that it was the JVM that the Tomcat service was configured to use. When installing it, I had chosen the default JVM that it had selected, because it looked right.

The installer defaulted to the JVM that was installed with the Java plugin for web browsers and such:
C:\Program Files\Java\jre1.5.0_06\bin\server\jvm.dll

But I needed to use the one that was installed with the JDK I compiled with:
C:\Program Files\Java\jdk1.5.0_06\jre\bin\server\jvm.dll

I believe the reason for this is because when I downloaded the JDK, it either only came in one package, which included international support, or I happened to choose the package that included international support. For the Java plugin download, though, I must have selected the US/English-only package, because it was smaller or something.

That was a nightmare to track down, and I hope that by posting this, I can save someone else the time and trouble!

December 5th, 2006

Firebug: My new favorite Firefox extension!

I use a lot of Firefox extensions, but there’s a handful of them that I couldn’t do without. I now have another to add to that list (a list which I’ll post about here, another day): Firebug

This extension provides all sorts of useful features for web developers, and in the first 2 minutes of using it, I managed to track down a problem in a DHTML application that I’ve been working on for the past few months. I’ve been wrestling with some performance problems for the past few weeks, and have been getting increasingly frustrated as I tried one thing after another to optimize my code, but still ended up with unacceptable performance. Firebug provides a powerful Profiler feature, which clearly pinpointed the current source of my performance problems.

It’s also got a nice, big area for running arbitrary javascript code, has Watch capabilities, network performance info, realtime view of HTML, CSS, Script, or DOM, and all sorts of other features. The interface seems pretty usable and packs all sorts of power, without getting in my way when I don’t want to use it. Plus, there’s a new “Firebug lite”, which provides a small subset of the functionality (javascript console/logging) for non-Firefox browsers like IE and Opera. I haven’t tried that out yet, but I will soon.

Thanks go out to Stickman for posting about it on StickBlog this morning!

August 7th, 2006

A Handy CSS Debugging Snippet

From A Handy CSS Debugging Snippet:

* { outline: 2px dotted red }
* * { outline: 2px dotted green }
* * * { outline: 2px dotted orange }
* * * * { outline: 2px dotted blue }
* * * * * { outline: 1px solid red }
* * * * * * { outline: 1px solid green }
* * * * * * * { outline: 1px solid orange }
* * * * * * * * { outline: 1px solid blue }

This code, if placed in your stylesheet, outlines every element on the page with colored boxes. I like this because it’s simple, and I learned something from it. I had no idea that you could use an asterisk for a css selector. Then, the idea of stringing them together to represent the elements that are most deeply nested with different colored outlines. Pretty slick!

I will probably still use the many functions in the Outline menu of the Web Developer Extension for Firefox, and the Internet Explorer Developer Toolbar, for most of my everyday outlining-for-debugging needs. There are also bookmarklets out there to do this type of thing. But, this snippet deserves a spot in my toolbox, because it seems like it could could come in handy someday.

July 21st, 2006

IE javascript error: ‘null’ is null or not an object

I got this javascript error in IE 6, while trying to read about how to use the Microsoft Script Editor to debug javascript in IE:
MSDN : ‘JScript debugger Statement’