Monthly Archives: October 2007

Fixing Binary File Corruption from Ant Copies

So there I was, poking around in some java / j2ee code, trying to learn how it all works. I did some testing on a Linux server and realized, something is broken. It seemed something was corrupting ALL the Jar files in WEB-INF/lib/.

A co-worker guessed that the token filtering Ant was doing might be the culprit. He was right. It seems Ant has issues with detecting whether files are binary or not, given that it uses a Reader class which runs the files through a character decoder. This is specifically a problem on Unix systems since they commonly use UTF8 character set, and in that case Ant hasn’t a clue if its looking at UTF8 text or binary data.

So, I used a trick suggested in the Ant docs:

Another trick is to change the LANG environment variable from something like “us.utf8” to “us”.

On the Linux box, this meant we had a default character set of en_US.UTF-8 and it needed to be en_US. In this case we already had a bash shell script that runs ant, so adding a line export LANG=en_US to that script before Ant ran solved the problem.


Tabbing to HTML Form Elements in Mac Web Browsers

So, I’m a MacOS newbie, just switched over from Windoze / Linux. I figured, it’s cool, things “just work”, and it’s got a Un*x/BSD core. What else is there? Hehe, the interface has definitely been a challenge.

So, the first huge problem that drove me nutz was that in Firefox, I couldn’t tab to checkboxes, some buttons, multi-select boxes, etc. I asked around, but found others with the same problem.

Google to the rescue! I found this summary of how to fix the problem:

Network Directory Services

Network directory services are core to Internet functionality. The Domain Name System (DNS) provides a global (and/or local) directory of hosts and services. Lightweight Directory Access Protocol (LDAP) servers can provide some of the same information as DNS (or be used to back DNS), but are more frequently used to create network user databases, store user group information, providing centralized account information and password storage.

I recently completed an upgrade of these two core services on a network I manage. We had been running outdated (but functional) BIND v8 and OpenLDAP v2.0 instances for of DNS and LDAP servers. Also, throw a Windows Server 2003 into the mix, which, as an Active Directory domain controller has to run its own DNS and LDAP (AD is tweaked LDAP) servers.

Continue reading Network Directory Services