.comment-link {margin-left:.6em;}

J. Daniel Ashton

www.flickr.com
This is a Flickr badge showing public photos from jdashton. Make your own badge here.
Whatever your hand finds to do, do it with all your might, —Ecclesiastes 9:10a NIV
The LORD God has told us what is right and what he demands:
"See that justice is done,
let mercy be your first concern,
and humbly obey your God." —Micah 6:8, CEV
With all your heart you must trust the LORD and not your own judgment.
Always let Him lead you, and He will clear the road for you to follow. —Proverbs 3:5,6 CEV

see also — My Homepage

My Photo
Name: Daniel Ashton
Location: Germantown, Maryland, United States


Any links with a dashed underscore probably point to Amazon.com

Monday, July 31, 2006

Towing the Line

This morning my alarm awakened me a few minutes before five o'clock. Before starting on my morning devotions I hurried downstairs to reboot my laptop. As I stood in the living room, I heard the "honk, honk" of someone's car alarm and, as usual, I ignored the first few beeps.

But the sound began to change in volume, and I looked out the window just in time to see a tow-truck hustling with remarkable alacrity out of our parking lot, a small sedan dragging along behind, its flashing headlights pointed toward the pavement. It looked exactly like a thief running away with stolen goods.

It galls me that the HOA dues I pay are used to pay for this "service." If someone is offending in their parking, then let the car be towed in broad daylight, after knocking on the neighborhood doors to see if someone made an honest mistake. Stealing away our vehicles in the dead of night is an offense against the fundamental trust we must place in each other. There must be a better way!

Sunday, July 30, 2006

Family History Referenced

At church this Sabbath I was handed a small book with a bookmark. I was advised that it mentions my family history. Sure enough, beginning on page 35 is a short section mentioning the names of two of my grandcestors. I've scanned the most relevant paragraph for your reading pleasure. This is from the book Charles S. Longacre by Nathaniel Krum.

Felix Borowski

I recently performed Borowski's Adoration at the Vienna SDA church, and again yesterday as a pinch-hit special at my home church. After the Vienna church service we ate lunch with some friends who are members there, and our host asked me about Felix Borowski.

I was mildly embarrassed at having absolutely no information on the man. This weekend I finally got around to looking him up. This Wikipedia article will give you the basics, and this search on Google will tell you even more.

I also found another of his violin solos in an interesting-looking collection. Perhaps I'll buy it someday.





Look inside this title
Violin Pieces The Whole World Plays - sheet music at www.sheetmusicplus.com
Violin Pieces The Whole World Plays Set of performance parts (includes separate pull out violin part) for violin and piano. With solo part and piano accompaniment. Series: Whole World Series, No. 5. 304 pages. Published by Amsco. (MS.AM42532)
See more info...

Sunday, July 23, 2006

Try a New EAR

Some of the frustrating weirdness I've been seeing seems to be associated with an incorrectly constructed EAR file. An EAR is a package of Application Resources intended to be deployed on an Enterprise server, in this case WebSphere Portal. One technique I'm learning here is to simply delete the existing EAR project and create a new one. This seems to resolve several validation and context problems. I should try it more often!

Tomcat Default Config Changed

I've been trying to work my way through a book on Struts. It spent a chapter (for which I'm grateful) on basic servlets and JSPs, and walked me through a quick installation of Tomcat and some sample code.

Unfortunately, the basic instructions on how to test your first servlet were, apparently, wrong. The instructions state that you can use a URL like
http://localhost:8080/myapp/servlet/chapter2.SimpleServlet
to reach your servlet. However, nothing I could do with myapp/servlet would work.

Here's the catch. In Tomcat 4.1.12 and later, the default servlet runner is called the invoker servlet, and the default path for it is disabled. In order to enable this functionality, you need to edit install_dir/conf/web.xml and remove the comment marks surrounding the invoker servlet mapping. Now that I know what to search for, it's not too hard to find this FAQ on the Tomcat site.

Having discovered this, I'm now a happier camper. The instructions in the book were not wrong: they simply didn't anticipate that invoker would be disabled in future versions of Tomcat.

Wednesday, July 19, 2006

Unexplained Error

[Sorry, another technical post]

I'm using Rational Software Architect to work on a Struts portlet project. There's something wrong with something, because whenever I save the struts-config.xml file, I see the message
Errors running builder "Table of Links" on project MyProject.
An error occurred while traversing resources.
I've been able to find one message thread in IBM's forums talking about this, and it does not appear to address my situation. I have applied all available fixes (up through Interim Fix 002 for Rational Software Architect 6.0.1.1, the latest available today), and I've tried every permutation I can dream up for the various forward names and paths.

So, why is this happening? More importantly, what steps can I take to debug this? Is there a log file I haven't found yet that would help to explain what specific error this builder is having?

I assume that I would see similar results in RAD (Rational Application Developer) as in RSA. Does Eclipse have functionality like this?

Sunday, July 16, 2006

Don't Forget the Form!

For the last two weeks I've been working very hard on a project at work that involves creating a portlet using Struts. This in itself should not be too difficult, as numerous examples exist. In fact, the RSA (Rational Software Architect, a superset of RAD) documentation includes tutorials on this very subject.

To my dismay, I could not reliably get them to work! I finally gave up and mangled one of the working samples to get the job done. In moments when I could not be focused on finishing that task I beat my head against the question of why the start-from-scratch (or nearly so) method was not creating a working portlet.

The specific problem I ran into is that trying to display data using a <bean:write /> tag consistently results in an RMOD (red message of death) stating
This portlet is unavailable. If the problem persists, please contact the portal administrator.
This was driving me crazy. I checked the classpath, every configuration file, repeatedly compared the files and directories between working and non-working versions.

Finally, this evening, I discovered a solution. (I won't say the solution, but it's at least a solution.) Simply ensuring that the .jsp includes a form definition, even one that's totally empty, is enough to enable the <bean:write /> functionality.

My now-working page looks like this:
<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"%>

<portletapi:init>

<html:form action="/displayFile"></html:form>

<table border="0">
<tbody>
<tr>
<th>fileSize</th>
<td><bean:write name="fileForm" property="fileSize"></td>
</tr>
<tr>
<th>fileName</th>
<td><bean:write name="fileForm" property="fileName"></td>
</tr>
</tbody>
</table>

Note the empty (but apparently mandatory) form tags. Why is this necessary? Why doesn't the wizard automatically put these tags into files it creates? Why has no one else blogged about this?

That's why I'm blogging about these things now. As a newbie I search using Google in hopes of answering these questions. Coming up with practically no results multiplies my frustration. So by at least writing about these problems as I run into them, I hope to make life easier for some other newbie who faces the same challenges. At least this time I have a suggestion for such a searcher:
Don't forget the form!

Commute Education - Week 12

Week 10 and 11 I was so totally focused on working with my hands and eyes on my laptop during my commute that I listened to nothing.

July 16, morning: (yes, Sunday)
  • O Magnum Mysterium - ??
  • Making of the Drum - ??
  • Brasscast - 7/2/06
July 16, evening:

Saturday, July 15, 2006

When the Party is Over

[OK, I've thought of several names for this post that are dramatically misleading. I apologize.]

I use iTunes to interface with my iPod and to provide background music to parts of my life, particularly the Sabbath hours. I've scanned in a few of our CDs, including several choral recordings. I can write a comment about tracks, individually or as a group, and the comment pertinent to this discussion is "Sacred, choral".

I can then use iTunes to create a playlist of all tracks with a comment that includes those words. iTunes has a Party Shuffle feature that selects tracks at random from this playlist, and so we can go through the Sabbath hours with a decent variety of sacred choral music to listen to. (By the way, iTunes has an option to shuffle by grouping, so I can make sure that all movements of a symphony or string quartet, for example, or of a requiem, are played together.)

The one feature that I most missed is this: when it's time to turn off the music, there's no way to tell iTunes to stop at the end of the current track. The only "stop" option is essentially "stop now."

Last night, I hit upon a solution! I created an empty playlist. Now, when it's time to turn off the music, I tell Party Shuffle to select tracks at random from the empty playlist. It gripes about emptiness and futility, but the intended effect is achieved. The music ends at the end of the current track.

Friday, July 14, 2006

Rough Draft of findings on some work stuff

This is one of those little things that drives a newbie crazy. I'm working in RSA (Rational Software Architect), and I create a new portlet project. After taking various actions I try to run my new portlet on one of the WebSphere Portal Test Environments. The portlet dumps a stack trace and displays the RMOD (red message of death).

Analysis of the console log yields messages about an invalid context root or invalid root context. It appears that the correct action to take is to go into the project's Properties (click on the project and press Alt-Enter) and the J2EE page. On this page you can change the Context Root and propagate the change to "links that reference the context root".

I initially suspected that the problem was something to do with the actual content of this entry: perhaps it's OK to have a context root that starts with a period, or with a capital letter, or not. However, at present all options seem to be accepted.

So, it would appear that using this properties page to make the change is a sufficient remedy for this problem.

By the way, I see the following behavior after changing the root. 1) I try to run the portlet on the server TE, and it displays nothing at all, not even the RMOD. 2) I restart the server TE, and all is well.

I'm beginning to suspect that restarting a portal server will not fix an RMOD, but it is the most likely way to fix a portlet with no body, at least for WebSphere Portal v5.0 Test Environment.

Thursday, July 13, 2006

Subclassing Portal

I've been struggling with WebSphere Portal 5, needing to provide an authenticated file download in portlet capability. Because portlets, unlike servlets, are responsible for only a portion of each web page, the portlet is not permitted to hijack the outputstream and send out a file.

This issue has been addressed in jetspeed-2, using fileserver pipelines. It may be possible in servers that implement JSR 168, using the RenderResponse implementation, but I'm not using those capabilities at this point.

As I pondered this problem, I kept coming back to the fact that Portal itself is, essentially, a big servlet. Servlets are typically implemented in Java. When you have a Java class that isn't doing exactly what you want, you subclass it, override the offending method and implement the behavior you desire.

Can this be done with WebSphere Portal? Is it possible to subclass the Portal servlet itself?

[UPDATE]

I did some more digging and found that a likely candidate is com.ibm.wps.engine.Servlet. I attempted to subclass this, but quickly discovered that key methods, such as doGet and doPost, are marked as final. Clearly this servlet was not meant to be subclassed.

Suppose that one wanted to add the ability for a portlet to return a file, leaving the portal/portlets interface otherwise unupdated. Would it work to implement a proxy for com.ibm.wps.engine.Servlet, simply calling the portal servlet from every method (instead of super)?

If such an object could actually stand in for the portal servlet, one could add a hijackOutputStream() method to be called by portlets. This method would create and provide an alternate outputStream for use by the portlet. When the doGet or doPost of the portal servlet returned, the original outputStream would be discarded (or emptied) and replaced by the alternate outputStream. (This would be easier to visualize with a diagram.)

Knowing as little as I know, this seems like a reasonable approach. However, I don't seem to have time to try it just now.

Wednesday, July 05, 2006

Quotable Quotes

This quote came to me from A Word A Day:
The man who prefers his country before any other duty shows the same spirit as the man who surrenders every right to the state. They both deny that right is superior to authority. -Lord Acton, historian (1834-1902)

Perl and Eclipse

Just a couple of notes in case you're struggling with this, as I have recently. I installed the EPIC, or E-P-I-C, version 0.3.12 plug-in under Rational Software Architect, or RSA, version 6.0.1. I believe the same results would be obtained for RAD, or Rational Application Developer.

I prefer to use Cygwin, so my initial attempts were to use the Cygwin integration in EPIC. However, I was unable to demonstrate the syntax validation feature as described on pp. 19-20 of the EPIC - User's Guide. I then tried ActivePerl, with similar results. At first I gave up on the syntax validation as being a broken feature. However, a few days later I made another attempt with the Cygwin Perl, and here's what I found.

I got somewhat better results when I included ".exe" on the end of the Perl executable path in Eclipse' preferences. In my case that means "C:\cygwin\bin\perl.exe". Several features of EPIC seem to be functional now.

However, the precise code example given on pp. 19-20 of the EPIC - User's Guide does not appear to be trapped as described. For reasons I don't yet understand (and may never), Eclipse/EPIC does not appear to trap or flag a missing semicolon. However, other syntax errors are trapped and other features of EPIC appear to be working. I'm a happier camper now.

Executive Summary: when specifying the Perl executable, be sure to include the trailing .exe even if you're using Cygwin.