About   Forum   Wiki   Home  

       
    Managed Chaos      
   
Naresh Jain’s Weblog on Object thinking, Patterns, Open Source, Agile and Adventure Sports

 
`
 
Tags
Recent Comments
Quick Search
Recent Entries
Categories
Archives
December 2006
M T W T F S S
« Nov   Jan »
 123
45678910
11121314151617
18192021222324
25262728293031
Add to Technorati Favorites

Syndicate This Blog
Entries (RSS)
Comments (RSS)

Archive for December, 2006

Cannot instantiate DocumentBuilderFactory in JDK 5

Saturday, December 30th, 2006

Few months back I moved to JDK 5. After this move, recently, I tried running some Acceptance tests using an old fitnesse.jar, which was compiled using JDK 1.4. And guess what? I get the following exception :

javax.xml.parsers.FactoryConfigurationError:
Provider com.sun.org.apache.xerces.internal.jaxp.
DocumentBuilderFactoryImpl could not be instantiated: java.lang.NullPointerException
[java] at javax.xml.parsers.DocumentBuilderFactory.newInstance
(DocumentBuilderFactory.java:104)
[java] at fitnesse.util.XmlUtil.<clinit>
[java] at fitnesse.wiki.WikiPageProperties.loadFromXmlStream
[java] at fitnesse.wiki.FileSystemPage.attemptToReadPropertiesFile
[java] at fitnesse.wiki.FileSystemPage.loadAttributes
[java] at fitnesse.wiki.FileSystemPage.makePageData
[java] at fitnesse.wiki.CachingPage.getData
[java] at fitnesse.responders.run.FitClientResponder.readyToSend
[java] at fitnesse.responders.run.PuppetResponse.readyToSend
[java] at fitnesse.FitNesseExpediter.sendResponse
[java] at fitnesse.FitNesseExpediter.start
[java] at fitnesse.FitNesseServer.serve
[java] at fitnesse.FitNesseServer.serve
[java] at fitnesse.socketservice.SocketService$ServerRunner.run
[java] at java.lang.Thread.run(Thread.java:595)

If I use JDK 1.4, everything works fine. But there seems to be some backward compatibility issues with JDK 1.5.

After trying different things for a while, I came across a site that stated that “The J2SE 1.4 platform included the ‘Crimson‘ reference implementation for JAXP 1.1. The J2SE 5 platform includes a reference implementation for JAXP 1.3 based on the Apache ‘Xerces‘ library.”

In JDK 1.4, xerces and xalan are embedded in the JDK. In JDK 1.5 too, but the packages are under com/sun (so com.sun.org.apache….).

So you would think all this should be transparent to developers. But no.

To verify the above statement, I opened up the DocumentBuilderFactory in JDK 1.5 and I found


public static DocumentBuilderFactory newInstance() {
try {
return (DocumentBuilderFactory) FactoryFinder.find(
/* The default property name according to the JAXP spec */
"javax.xml.parsers.DocumentBuilderFactory",
/* The fallback implementation class name */
"com.sun.org.apache.xerces.internal.jaxp.
DocumentBuilderFactoryImpl");
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError(e.getException(),
e.getMessage());
}

}
while the JDK 1.4‘s DocumentBuilderFactory class had:


public static DocumentBuilderFactory newInstance()
throws FactoryConfigurationError
{
try {
return (DocumentBuilderFactory) FactoryFinder.find(
/* The default property name according to the JAXP spec */
"javax.xml.parsers.DocumentBuilderFactory",
/* The fallback implementation class name */
"org.apache.crimson.jaxp.
DocumentBuilderFactoryImpl");
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError (e.getException(),
e.getMessage());
}
}

After all this research I still don‘t know what is the exact problem. But I have a solution.

Solution: Luckily adding the xerces.jar to the classpath solved the problem.

Would appreciate if someone would let me know the answer.

Call for Participation: Agile 2007

Thursday, December 14th, 2006

August 13 - 17, Washington, DC, Marriott Renaissance Hotel
http://www.agile2007.org
Deadline: January 26, 2007

Agile software development focuses on delivering business value early and often in the project lifetime with the ability to incorporate emergent requirements. It accentuates the use of rich, informal communication channels and frequent delivery of running, tested systems, while attending to the human aspect of software development.

Agile 2007 is the premier conference for people who are using, or wish to use, agile development principles to improve software development. The agile community will gather at Agile 2007 to share techniques and technologies, research and experience, and innovations for the managerial and technical sides of agile software development.

Agile 2007 seeks proposals for a wide range of topics including:

  • developing,
  • testing,
  • individuals and teams,
  • customers, planning,
  • leadership,
  • learning,
  • innovation,
  • process and process improvement,
  • organizational change,
  • project management,
  • retrospectives,
  • remote collaboration, and offshoring.

We invite submissions covering all aspects of agile methods in the following categories:

  • Tutorials
  • Research Papers
  • Experience Reports
  • Discovery Sessions
  • Educators‘ Symposium Presentations
  • Hands-on sessions
  • Beginners Track Presentations
  • Talking Heads
  • Research-in- Progress Workshop Presentations
  • Vendor Talks

Detailed calls for proposals for all submission types are available at http://www.agile2007.org. Proposals will be peer-reviewed and a selection will be made to create a highly relevant conference program for beginners to experts in the area of agile methods.

Important Deadlines:

  • January 26, 2007: Deadline for all submissions (except Research-in-Progress Workshop and Vendor Talks)
  • March 1, 2007: Vendor Talk submissions due
  • April 2, 2007: Notification of acceptance for submissions
  • April 20, 2007: Submissions for Research-in- Progress Workshop due
  • May 14, 2007: Camera-ready manuscripts due for Research Papers, Experience Reports and Educators Symposium Papers
  • May 25, 2007: Notification of acceptance for Research-in- Progress Workshop
  • June 22, 2007: Camera-ready manuscripts due for Research-in- Progress papers
  • August 13–17, 2007: Conference

Beta version of Lattu released

Monday, December 11th, 2006

I just released the first beta version of Lattu.

Lattu is a framework for testing Eclipse RCP Applications. It can run both Unit and Functional tests. Essentially, it is an Eclipse Plugin which provides Fitnesse extension to run unit and acceptance tests. It uses JUnit for unit testing and Abbot for GUI tests.

More details: http://lattu.sourceforge.net

Good bye Word documentation

Sunday, December 10th, 2006

If you are in the software industry and if you have ever gone through the pain of creating software documents, either for other developers to refer to or for your users, then stay with me. I‘ll share my experience creating really useful documents using a screen recording tool called CamStudio. It has liberated me from all the pains of documentation. Creating documents is no longer painful, it is fun. It retains the real value of documentation .i.e. communication and knowledge sharing.

I‘m not the first person doing this. There are lots of people who have already used this technique.

What is CamStudio?
CamStudio is a Free Streaming Video Desktop Recording Software. In other words it is a screen capture tool. It allows you to record all screen and audio activity on your computer. It can create AVI videos or Streaming Flash videos (SWFs). And the best part is CamStudio is Open source. It comes with a GPL.
More details: http://www.camstudio.org or http://sourceforge.net/projects/camstudio

How software teams can use this tool?

  • You can use it to create any form of demonstration videos for your software

    • Installation Guide
    • Developer Guide
    • Trouble shooting document
    • FAQs
    • And so on . . .
  • You can capture recurring problem with a tool your team is using. And may be record known work arounds.
  • You can create video tutorials about recommended ways of development on the team. For Example

    • How to do logging?
    • How to do exception handling?
    • Other standards and patterns followed on the team
  • You can record a pairing session on the following and share it with the team

    • Refactoring sessions
    • TDD sessions
  • You can capture a whole session where the developer/s is pairing with Analyst/Customer to write automated acceptance tests. It is difficult to capture the thought process in an acceptance test. This tool will help you capture content rich discussion between the customer and the developers.
  • QAs can use this tool to report bug to developers
  • Customers can use this tool to create supporting info for a user story. They can record a business work flow. (esp. if they are using an existing system), and share it with the team.
  • You can use it to create video-based information products you can sell. Like “TDD for Dummies” or “Refactoring to Patterns overnight” ;)

Other cool things

  • You can add high-quality, anti-aliased (no jagged edges) screen captions to your recordings in seconds and with the unique Video Annotation feature you can even personalize your videos by including a webcam movie of yourself “picture-in-picture“ over your desktop.
  • You can choose to use custom cursors
  • You can choose to record the whole screen or just a section of it
  • You can reduce or increase the quality of the recording depending on if you want smaller videos (for emailing to people, for instance) or you can have “best quality” ones for burning onto CD/DVD

Using this form of rich communication tool over stupid word documents can save a lot of pain and frustrations. On my current team we are trying to get away from all kinds of word documents by just using this tool.

In most cases, we don‘t have to do anything special. Just let the tool record what you are doing. You can use this tool to records hours of videos and it will not show any difference on your system‘s performance.

Note:

  • Please don‘t use this tool to create video documents and throw it over the wall. These documents should help you during your face-to-face conversion or capture a face-to-face conversion, instead of being a replacement for them.
  • The problem of maintaining documents still exist with this tool. Once you create a document and if things change, you will have to update the document. In this case, it might not be as simple as just updating a few lines in the word document. It might mean re-record the whole video. One technique you can use is to break the video down into small sections [which is a recommended pattern]. It is most likely that you will just re-record one section and not the whole document.

Why computer tools get in the way of your thinking process?

Saturday, December 2nd, 2006

On multiple occasions, I have noticed myself struggling with a piece of software when I am trying to get my job done. The job could be to analyze a problem, brainstorm about something or may be even just participate in an interactive discussion.

One of my favorite examples is communicating something thru a document. This morning I sat down to write a white paper on Styles of TDD. This was my first attempt at writing a white paper on TDD. 10 mins into it, I was struggling with the flow of the paper. I realized I was paying too much attention to the style and format of the paper rather than the content of the paper. At times I forgot my thought process trying to fix those damn spelling mistakes.

Then I switched to index cards. I just started writing very high-level thoughts, one per index card. Soon I could see the whole flow of the paper. I move a few sub-topics around and got the complete flow. It felt so much faster and so much easier.

Another example that comes to my mind is, UI designing. People try to use sophisticated tools for their UI mock-ups. As soon as you throw those UI mock-ups on the screen, the audiences start paying more attention to the format, font, colors, style and other cosmetics and forget about the business flow and validations. Also, soon you realize the UI design is highly influenced by the tool rather than the user.

Instead, use a paper based UI prototyping style. When the audiences look at the paper prototype they know it‘s not real and they focus really on business flow and validations. Paper based UI prototype helps the users to separate concerns and focus on the task at hand.

Best of all, the requirements internalization phase of a user story or a use case. As soon as we see the business person explaining the business functionality we open up a computer tool trying to capture all the important info. Suddenly we shift from understanding the requirements to capturing the requirements. We stop visualizing the requirements in our head and starts struggling with getting the tool do what we want. These tools are not intuitive to most of us and generally we think differently than how the tool requires us to think.

Planning and tracking is another great example that the agile community seems to have addressed really well with index cards and story wall.

Lesson learnt: Simplicity! Focus on the task at hand and not the tool. Generally avoid any kind of so-called sophisticated computer tool. If you really have to use a tool, make sure the tool stays in background letting your normal thought process.

    Licensed under
Creative Commons License
Design by vikivix