Thursday, 11 March 2004

WSAD can be "interesting"

There are things that I am learning about WSAD that are not straight forward to know. Like when Eclipse / WSAD says that an error has happened and to check the log. Where's this log? Well, you have to go Help -> About -> and that bring up a window. Then you click on "Configuration Details" Yes, they have config details in there, but there is no way that I would have found the log there except I clicked on it as I was searching around. Is this the best place for the log? Maybe not, but I can tell that it was just a "okay solution for now" which I am sure that is how a lot of sw goes.

I'm also using Struts Test Case to test, well, the struts. At first I was doing testing using mock objects, but for the sake of consistency we're going to do just (for now) cactus testing. Well, the instructions say that the only thing that you have to do is switch the base class. We all know that it is never that simple. The trouble that I had was that cactus wants to find a file called cactus.properties on the classpath (.classpath) to figure out where to send the http requests. Other options are that you can set it on the command line or using System.setProperty(), both not as nice and prone to error. Could I figure out how to put this one property file on the classpath in WSAD? Not for a bit. I tried to jar it up and put it in the lib folder. No go. So, while getting really annoyed over something very simple, I zipped it up and put it in there. Bam! It worked. If there is one thing that setting up and developing sw teaches you is to isolate problems and work them out one at a time. I can't wait till I am really good at things after lots of industry experience.
Listening to: The Civilian Project - Golden Visions


2 comments:

  1. Just cause I happened to get a very similar error today.
    You don't actually need to check the log. If you push the 'Details' button (bottom right hand side of the error message) it gives you a little more information. (Or at least it gave me enough information to avoid getting the error anymore, can't remember what it was exactly).
    I think part of the problem is that the error dialog is presented as a popup message so the automatic reaction is to read and click 'Ok' without thinking about it. I had to get the error twice before I even noticed that there was a Details button...

    ReplyDelete