Wednesday, January 23, 2008

Spring Autowiring

I was just struggling with an error message I was getting in my application. I am using struts 2, spring and JSP basically.
In my JSP I wanted to save some properties into the name of an account:


<s:textfield name="account.name" value="%{account.name}">
</s:textfield>


The action handling the form which posts the "account.name" property above, does have a setter for the Account interface


public class SaveTransactionAction {
.
.
.
public void setAccount(Account account) {
.
.
.
}

}


Problem is, for some reason the property was not correctly set into the action, and even worst, I got an exception thrown:


2008-01-23 21:57:52,203 ERROR util.InstantiatingNullHandler (InstantiatingNullHandler.java:110) - Could not create and/or set value back on to object
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jc.mny.domain.vo.Account': Could not resolve matching constructor


As I later found out, Spring was trying to autowire the creation of the Account property for my action, but as it was an interface, it could not find the correct class to instantiate. I had two options:

  1. Change the struts configuration not to use the autowire properties from spring.
  2. Declare the creation of the bean I needed in the applicationContext.xml. This is the one I chose, just added the excerpt below into the file:

<bean id="account" class="jc.mny.domain.vo.AccountVO">
</bean>

Certified Scrum Master

Today I became, as the subject of the post suggests, a Certified Scrum Master. As stated in the Scrum Alliance web-site, "Scrum is an iterative, incremental process for developing any product or managing any work".
Just finished the training with Ken Schwaber (in the picture with me) and I've posted below some notes I took during the training.

  1. Scrum is not intended to solve your company's development problems. Actually, if you have enough problems, Scrum is most likely to expose them even more.
  2. Scrum is a framework that was built to give the team a tool to organize, measure and estimate their work and the state of the product.
  3. Scrum by itself will not increase quality or make you deliver faster code. Check item number 1.
  4. Think about people and not resources. The teams are made of people.
  5. Transparency is the keyword. Scrum gives to the product owner transparency over your project, showing exactly where you are and how much you still need to finish it.
The training was great, and all the time you could see people saying: "ahhhh, so that's how it is done"...
As I observed today, lots of people believe that Scrum might be the solution for their problems and are actually trying it at their companies. However, listening to the most experienced on it is fundamental, and as Ken suggested at the end of the training: talk to each other.
Finding out what other teams are trying, what is working and what is not is the key to success.

Thursday, January 10, 2008

Ruby First Impressions

I am now giving a try to Ruby.
It seems to be quite fast to build a web application from scratch, and Netbeans has a great support to it.

We'll see...

Saturday, January 5, 2008

Back From Wedding+Honeymoon

After being away for a long time to finish preparation for my wedding, I am back after, honeymoon, christmas and new year´s eve!

Soon to post something useful!