Maven2, Eclipse Callisto with WTP and Subclipse working together
A dream has come true. With the Eclipse Callisto release the Web Tools Project (WTP) finally works as one expected it to work. It's the most comfortable environment for developing web application that I've seen so far. The only drawback has been the lack of dependency management for the ever growing number of additional jar files every serious web application requires.
When one talks about dependency management the answer is usually Maven. Maven is a great tool, but apparently it is mainly used by fans of the command line, who don't use any kind of IDE frequently, or as a build tool on the continuous integration server where CruiseControl or Luntbuild call Maven to perform the build.
But what when you literally live within Eclipse? There is the M2Eclipse plugin that works very well, but it still lacks direct support of WTP. There is a JIRA entry though that reports about the problem and at the end you will find a very valuable hint to another plugin which links the Maven2 Dependencies classpath container provided by M2Eclipse to the Web App Libraries container provided by WTP.
This plugin is provided by Adam Kruszewski and is called LibCopy. It has its own property page which looks like this:

If you happen to use it with projects stored in a Subversion repository you probably run into the same problem as did I. Version 1.0.x of the Subclipse plugin doesn't support linked resources. To solve that you have to upgrade to the version 1.1.x branch for Eclipse Callisto. I got Subclipse 1.1.4 by doing so and now I can use Eclipse and Maven2 for my web application projects in the most comfortable way.
No default route for PPTP connections
Ever wondered how you can avoid Mac OS X' PPTP client to set the default route to the remote gateway? It's a bit annoying that you loose your Internet access, if you connect to PPTP server that doesn't allow your packets through to the Internet.
Bitflux has a good description about how to tell OS X' PPTP client not to change your default route. In short:
Create the directory /etc/ppp/peers, if it doesn't already exist. Then place a file with the exact name of your PPTP connection in there. Write nodefaultroute to that file and when you fire up your PPTP connection your default route will stay untouched.
Washing machines seem to be a rare good
When I last told the story about buying a washer or how to loose a customer I believed that this were a problem of that particular store. It's almost unbelievable, but apparently it is not.
Last Friday we bought a washer at another store called Novey with several outlets throughout Panama City. They promised to deliver it on Saturday or at least Monday, but they would call us in advance. As on Monday nobody delivered nor called, we called them just to find out that they didn't delivered, because the price of the machine changed since we paid for it. What? You pay for something, they change the price and want you to pay extra before they deliver it? My wife talked furiously to the store manager and eventually got the washer delivered the next morning.
Let me explain something. The issue is not that here in Panama people want to screw you. It's more a problem of the relationship between the employees and their bosses. It seems employees fear more their own boss than a dissatisfied customer. In our case the employee responsible for the shipment simply tried to avoid a mistake and did not realize that with our payment on Friday we already closed a contract and the price change on Monday cannot affect it retroactively. The typical Panamanian boss will not fire the employee in such a case, because the employee just protected his boss' money. We, in our different culture, probably would have insulted the employee for treating our valued customer so badly and for not knowing that a contract can't changed retroactively.
My guess is that in a country like Panama lots of employee just don't get proper training and as they are paid near the minimum salary of currently about $220 a month they simply try to avoid any mistake that could anger their boss. To them it's the boss who pays them, not the customer as we tend to believe.
Moving in
Our furniture finally has arrived here in Panama. Right now the office looks almost like a warehouse, but we hope to clean up that mess in a few days. It's about time to get back to regular office work without answering relocation related phone calls and emails. One thing is to let a moving company do everything for you and pay the high price associated with that. Another thing is to do it yourself and learn quite a bit about the international freight forwarding business.
In the beginning we looked for a moving company and spoke to the friendly staff at ITO Umzuege, a German moving company located in Alamogordo, New Mexico. You might wonder why we talked to someone that far away from the Tampa Bay area. A few months ago we did a road trip to White Sands desert and came across a big sign saying ITO Umzuege. That caught my attention as I didn't expect to find a German moving company in the middle of New Mexico's desert. Later I learned that ITO helps a lot of German Air Force personnel to relocate from Germany to New Mexico and back due to the joint operations between the US and German military.
It turned out that ITO specializes in full service moving which includes everything from packing, through shipping, customs clearance and unpacking. That was more service than we wanted, so we were told to call some of the ocean freight companies they have worked with. So we called Rose Maritime for a quote about trucking and ocean freight from Tampa, Florida to Panama City, Panama. In the end we decided to go with Interworld Freight based in Miami due to the fact that they are a Latin American company with a partner in Panama. It proved to be a good choice as their their Panamanian partner Dualtec Cargo took care of all the hassle getting something out of customs usually involves.
The 40' container was first trucked from Miami to Tampa to our house and then taken back to the port of Miami the same day. It sailed for about a week to the port of Colon at Panama's Caribbean coast. There customs did their thing and after a few days it was trucked 80 km to Panama City on the other side of the isthmus.
In the end we were glad to have chosen the do-it-yourself route instead of the everything-included service provided by moving companies. It's not a big problem to pack boxes yourself and loading and unloading help is available for a small price. To give an example: we paid about $400 to load the 40' container in Tampa and about $180 to unload it in Panama City. The payment in Panama included a generous $30 for beer which the crew of 6 appreciated a lot as it was a Friday and usually Friday is the day of the big party in Latin America. $30 does not sound much, but it really buys a lot of beer here in Panama.
Buying a washer or how to loose a customer
A few days ago we ordered a new washer in one of Panama City's home improvement shops. We went to Do It Center at Multiplaza Pacific, which is one of the newer malls in the city. There we found a mid-level washer made by General Electric, paid $439 and expected the delivery this Wednesday. One important topic during our conversation with the sales clerk was that we did not want the machine on display, but a new one in its original packaging.
Somehow we expected things to happen... Yesterday the delivery guys showed up at our apartment and brought in a dirty washer without the original packaging and the accessories in a dirty bag put inside the bowel.
My wife called the store and explained to them she is rejecting the delivery as we had paid for a new machine and not a used one. The reason why I'm writing this here is the response she got. The person on the other end of the line wanted her to come in person to the store in order to change the invoice. There was no explanation as to why they want to change the invoice. Maybe they wanted to change the invoice from "new" to "used"? It was a bit weird and the fact that their phone system cuts calls after 3 minutes just contributed to the bad experience with them. In the end, after five 3 minute calls, they promised to deliver a new machine this morning.
But guess what? Nobody showed up today. So my wife called them again just to find out that can't deliver a new machine. At least they offered to give us our money back.
What went wrong? I guess they don't have much on stock. What they have in their show room is almost everything they've got and probably a lot of local customers are happy with just that. The girl on the sales floor just promised the delivery of a new machine without checking the inventory first.
Now we will buy the washer somewhere else and they've lost a customer due to their bad customer service. If they had called us the day after the sales and offered another model, probably we would have accepted it. But instead they tried to complicate our life.
I guess the best way to avoid this is to have them show you the product you just bought and not trust them to have it in the warehouse.
Update: We had to call our bank and dispute the credit card charge by Do It Center, as they were unable to refund the money to the card themselves. At least paying by credit card gives you a second chance to get your money back.Don't install Java apps from the Ubuntu repository, if you want to use Sun's JVM
Now that Ubuntu Dapper supports Sun's JVM directly, it would be nice to install things like Tomcat the same way. So let's try this:
sns@testbed:/opt$ sudo apt-get install tomcat5 Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: ant apache2-common apache2-utils fastjar gcj-4.1-base gij-4.1 java-gcj-compat libapr0 libbcel-java libcommons-beanutils-java libcommons-collections-java libcommons-collections3-java libcommons-dbcp-java libcommons-digester-java libcommons-el-java libcommons-fileupload-java libcommons-launcher-java libcommons-logging-java libcommons-modeler-java libcommons-pool-java libexpat1 libgcj-common libgcj7 libgcj7-jar libgnucrypto-java libjaxp1.2-java libjessie-java liblog4j1.2-java libmx4j-java libpcre3 libregexp-java libservlet2.3-java libservlet2.4-java libtomcat5-java libxerces2-java openssl ssl-cert Suggested packages: ant-doc apache2-doc lynx www-browser gcj-4.1 libgcj7-awt libbcel-java-doc libcommons-beanutils-java-doc libcommons-collections-java-doc libcommons-collections3-java-doc lib32gcj7-dbg jython libxerces2-java-doc ca-certificates libapache-mod-jk libapache2-mod-jk tomcat5-webapps tomcat5-admin Recommended packages: ant-optional ecj-bootstrap ecj java-compiler libgcj7-src The following NEW packages will be installed: ant apache2-common apache2-utils fastjar gcj-4.1-base gij-4.1 java-gcj-compat libapr0 libbcel-java libcommons-beanutils-java libcommons-collections-java libcommons-collections3-java libcommons-dbcp-java libcommons-digester-java libcommons-el-java libcommons-fileupload-java libcommons-launcher-java libcommons-logging-java libcommons-modeler-java libcommons-pool-java libexpat1 libgcj-common libgcj7 libgcj7-jar libgnucrypto-java libjaxp1.2-java libjessie-java liblog4j1.2-java libmx4j-java libpcre3 libregexp-java libservlet2.3-java libservlet2.4-java libtomcat5-java libxerces2-java openssl ssl-cert tomcat5 0 upgraded, 38 newly installed, 0 to remove and 7 not upgraded. Need to get 15.3MB/25.4MB of archives. After unpacking 60.5MB of additional disk space will be used. Do you want to continue [Y/n]?
If you go ahead here, you will see this next:
Adding system user `tomcat5'... Adding new user `tomcat5' (104) with group `nogroup'. Not creating home directory `/usr/share/tomcat5'. Installing /var/lib/tomcat5/webapps/ROOT/WEB-INF/web.xml. Installing /var/lib/tomcat5/conf/tomcat-users.xml. Installing /var/lib/tomcat5/conf/jk2.properties Could not start Tomcat 5 servlet engine because no Java Development Kit (JDK) was found. Please download and install JDK 1.3 or higher and set JAVA_HOME in /etc/default/tomcat5 to the JDK's installation directory.
And you will find that Sun's JVM is no longer in the PATH. Instead you will be using the GNU JVM. What you will find though is this:
sns@testbed:/usr/share/java$ ls ant-1.6.jar commons-fileupload-1.0.jar jsse.jar ant-bootstrap.jar commons-fileupload.jar libgcj-4.1.0.jar ant.jar commons-launcher-1.1.jar libgcj-4.1.jar ant-launcher.jar commons-launcher.jar log4j-1.2.12.jar bcel-5.1.jar commons-logging-1.0.4.jar log4j-1.2.jar bcel.jar commons-logging-api-1.0.4.jar mx4j-2.1.1.jar commons-beanutils-1.7.0.jar commons-logging-api.jar mx4j-impl-2.1.1.jar commons-beanutils.jar commons-logging.jar mx4j-impl.jar commons-collections-2.1.1.jar commons-modeler-1.1.jar mx4j.jar commons-collections3-3.1.jar commons-modeler.jar mx4j-jmx-2.1.1.jar commons-collections3.jar commons-pool-1.2.jar mx4j-jmx.jar commons-collections.jar commons-pool.jar regexp-1.4.jar commons-dbcp-1.2.1.jar gnu-crypto.jar regexp.jar commons-dbcp.jar javax-crypto.jar servlet-2.3.jar commons-digester-1.7.jar javax-security.jar servlet-api-2.4.jar commons-digester.jar jaxp-1.2.jar servlet-api.jar commons-el-1.0.jar jsp-api-2.0.jar xercesImpl.jar commons-el.jar jsp-api.jar xmlParserAPIs.jar
In general that's not a bad idea to make Java applications and libraries be more tightly integrated into the operating system. But as long as the distribution sooner or later will change the JVM and install potentially unwanted code this is not usable in a production environment.
Fine Italian dining in Panama
Last night we dined European style. I really have to say European style, because everything in the restaurant was made in a way that you would have believed to be in Italy or the southern part of Switzerland where they speak Italian. Spaghueteria Caffé Pomodoro is located on Via Veneto and without knowing about it you certainly would miss it. From the street it looks like a tiny restaurant, that offers nothing special, with only a few little tables crammed into what looks like a corner shop. But once you enter you will see an opening in the back that leads to a wonderful patio with spacious seating, nice decoration, a number of ventilators to make you forget the heat. Passing through that door in the back is like passing through a gate from Panama to Northern Italy.
As appetizer we had Insalata Mixta and Insalata Caprese followed by Penne Arrabiata and salmon with some pasta on the side. We drank half a liter of red wine, which is fine for the two of us, and finished with Tiramisu and a wonderful Apple pie with some vanilla ice-cream on top of it. Together with a cup of Cappuccino that was the perfect closing of our meal.
The check came up to about $56 for two persons. That's quite expensive here in this city, but on the other hand the quality served definitely was worth it. We enjoyed the fast and perfect service, the overall atmosphere and the music performed by a guitar player singing romantic songs.
The vanilla ice-cream was real ice-cream. I do say "real", because while we lived in Florida we had a hard time to find ice-cream with a good taste and a creamy feel. I don't want to offend anybody, but either it was far too sweat or it felt more like crushed ice than ice-cream.
A few days back we ate in another Italian styled restaurant and I had Insalta Caprese as well. But there they used some yellow cheese instead of Mozzarella and put ham between the tomato slices. So it wasn't exactly what you would expect from Insalata Caprese. Let's say that was more a Latin version of this Italian appetizer.
Sun Java VM on Ubuntu Linux
The newly released Ubuntu 6.06 Dapper includes support for Sun's JVM. It is available in the multiverse repository. In order to access multiverse one has to add these two lines to /etc/apt/sources.list:
deb http://pa.archive.ubuntu.com/ubuntu/ dapper multiverse deb-src http://pa.archive.ubuntu.com/ubuntu/ dapper multiverse
After sudo apt-get update one can install the Sun Java5 JDK
sudo apt-get install sun-java5-jdk
That was quite easy and painless. It definitely makes deployment of new servers easier than before.
But unfortunately when you try to install Java applications from the Ubuntu repository you will get the GNU JVM and a bunch of GNU provided jar libraries added to your system. At least for my taste I'd like to stick with Sun's JVM for production use for a while. Usually I install Tomcat manually in /opt
iSCSI support in Linux
iSCSI support amongst the different Linux distributions is currently a bit uneven.
There are two projects: linux-iscsi on sourceforge which was sponsered by Cisco and Open iSCSI which started independently and now has merged with linux-iscsi. linux-iscsi 4.x is for kernels up to 2.6.10 while Open iSCSI (that is linux-iscsi 5.x) is for kernels from 2.6.16 and newer. As the iSCSI stuff is a driver, it is highly depended on the kernel version.
The recently released Ubuntu Dapper 6.06 does not include it. But one can build a 2.6.17 kernel and use the Open iSCSI sources from Subversion and get a working system. I've tried it and it works well.
Fedora Core 5 has a modified linux-iscsi implementation working with kernel 2.6.15. I've tried it and it works well.
There is another project on sourceforge called iscsi-init which provides support for a root filesystem on iSCSI. This is what one needs in order to have diskless servers booting from the network.
Unfortunately iscsi-init relies on linux-iscsi 4.x for the 2.6.10 kernel and it looks like a stalled project. Open iSCSI does not yet support 'root filesystem' support and has not yet released something they want to label as stable.
It's past 8 pm and there is some live accordion music from down the street
What a country? It's past 8 pm and I'm still sitting in my office here in Panama City just next to the banking area. A tropical rain shower for almost an hour has stopped 30 minutes ago and I can hear some live accordion music from down the street. Unfortunately I can't see who is playing, but it's just great. And it's still not Friday afternoon when folks leave work and start partying.
Fourth day in Panama City
We are now here in Panama since Monday. As our container still has not arrived yet, we sleep in an empty apartment with just a mattress and live out of our suitcases. We are lucky though as we have several good restaurants right in front of the apartment building which is one of the high rises that make up the well-known skyline of Panama City.
We usually have breakfast at a small deli shop across the street. They offer empanadas filled with meat or chicken and heated sandwiches. Together with one or two cups of coffee with milk (half coffee, half milk) that's a good start into the day. I then head up the street about 200m to my office. As said earlier I enjoy the walking and am quite happy for the fact that I don't have to use a car to get to work.
The picture shows the new office with my temporary desk. Everything looks quite spacious with that lonely desk in there. I'm waiting for news from the shipping company whether the container has arrived at the port in Colon yesterday.
iSCSI support in Linux
Linux iSCSI by Cisco joined forces with Open iSCSI. The result is code to be compiled against kernel 2.6.16 or newer.
Yesterday I successfully installed Ubuntu Edgy and upgraded to a kernel 2.6.17 compiled over night from source retrieved via git from the Ubuntu repository. The first boot with the freshly compiled kernel went well so I proceeded to download Open iSCSI from their Subversion repository and compiled it against the 2.6.17 kernel. After completing the configuration of the NetApp FAS 250 filer I could connect to it, map the LUN as /dev/sdb, run fdisk and mkfs and mount the new file system.
Actually it was easier than I expected it to be. Today I'll be working on support for an iSCSI based root file system.
Arrived in Panama and started working in my new office
Last Sunday I've arrived well in Panama and today began working in my new office in downtown Panama City. Although I had some trouble with a box embargo American Airlines puts into effect between June and August I got my PowerMac and Cinema display with me on the airplane. At the moment I'm sitting at my temporary desk reading email and writing this blog post.
The furniture and other office equipment is still sailing somewhere on the Caribbean Sea and will hopefully arrive safely sometimes next week. Right now the office looks quite big as it is completely empty, but I expect it to be well filled with all that stuff from the 40' container. At least half of the load is destined for the office. We'll see how everything will fit in here. I want to have space for 5 or 6 persons.
To start with I got a 1 mbps Internet connection via cable modem. The service is with CableOnda which is the local cable TV provider as well. So far I have nothing to complain about and our Vonage VoIP phone service works the same way as before in the Tampa Bay area. It is not very cheap though. A similar service in the US would cost about half or even less.
Probably I will upgrade to some better type of connection soon. I got some proposals from several local telcos with interesting pricing for a dedicated fiber optics circuit starting with 2 mbps synchronous. My goal is to get some Internet access that allows to have a few servers here in the office and be able to connect via VPN from the outside as well. I don't want to convert the office into a datacenter, but it's very convenient to be able to set up a server for testing or demonstration purposes and expose it to the outside world using public IP addresses. You can't do that with consumer style Internet access.
Box embargos are so annoying
Have you ever flown to a destination with a box embargo? I don't know about other airlines, but American Airlines does not allow you to carry boxes at certain times to certain destinations. While I traveled earlier this year with a box to Panama, today they told me there was a "box embargo" in effect. Apparently you can't carry something in a box from June to August.
I got really upset about this, because my boxes had my PowerMac G5 and the 30" display in them. They asked me to take it out and put it in a regular bag. Whoa! A 30" display in a regular bag without the protection of the shipping box isn't a very bright idea. Finally some kind soul referred me to some yellow dressed guys who were selling special bags and stretch wrapped them.
But the bad surprises did not end here. After returning to another counter I was told again that they can't accept my boxes. Yikes! First I had to "convert" the box to a bag and then the bright guy on the other side of the counter is still telling me it's a box and I can't fly with it. So what...? After a bit of getting really annoyed and expressing my anger in both English and Spanish a supervisor showed up, checked something in their computer and decided to accept my two boxes - aehm bags that is. Now that I'm sitting in the plane I can see why it worked. The flight is not full :-)
Update: The best part came after we landed. One of my boxes did not made it due to TSA's screening. One should not travel with too much electronics inside the luggage. Makes one very suspicious. The box did miss the flight and hopefully will arrive later tonight. At least the AA staff here in Panama is very polite and helpful and already had me on their list.
Cheap programmers on a ship anchoring off the coast of California
When I first read this today I had to think of it as a joke, but today is not April 1st and it seems to be real. Check out this article. There is a company that wants to buy a ship, anchor it off the coast of California and hire cheap programmers from India or Eastern Europe and have them work there for US companies at low salaries like $1,800 a month.
What's the point of this? Apparently the idea is to bring those people near the clients, but avoid all those complicated visa procedures for entering the US legally. Instead of applying for H1-B visas the company just let the ship stay in international waters.
What about telecommunication? The only way to connect the ship to the Internet or even the phone system is by satellite or maybe some radio link to the coast. International waters start 12 nautical miles off the coast. That's not too far away, but of course the ship moves and most high-speed broadcasts expect a fixed antenna on the other side. Wimax might be a solution. Either way the need for some suitable telecommunication will increase the cost and probably render the whole idea useless, because the link has to be quite stable. It doesn't make sense these days to have a few hundred programmers write code in isolation.
My personal guess is that this idea will never take off. The only benefit it offers is to have cheap workers close to the client, but there is a lot of risk involved. And usually a few good developers get done more than numerous cheap coders who would accept to live on a ship anchored off the coast of California.




