<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Tlahtoa axixmiqui</title>
	<atom:link href="http://axixmiqui.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://axixmiqui.wordpress.com</link>
	<description>Andrew Hahn&#039;s Software blog</description>
	<lastBuildDate>Tue, 10 Jan 2012 18:56:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='axixmiqui.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Tlahtoa axixmiqui</title>
		<link>http://axixmiqui.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://axixmiqui.wordpress.com/osd.xml" title="Tlahtoa axixmiqui" />
	<atom:link rel='hub' href='http://axixmiqui.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Efficient GWT unit testing &#8211; MVP + google gin + AtUnit</title>
		<link>http://axixmiqui.wordpress.com/2011/11/11/efficient-gwt-unit-testing-mvp-google-gin-atunit/</link>
		<comments>http://axixmiqui.wordpress.com/2011/11/11/efficient-gwt-unit-testing-mvp-google-gin-atunit/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 05:48:37 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[mockito]]></category>
		<category><![CDATA[junit]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=123</guid>
		<description><![CDATA[For about the last year and a half I have been using a few simple patterns that make testing GWT applications very easy. None of these are anything new, in fact most have been in use for years. It always surprises me when I work with a new team that is not doing these in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=123&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For about the last year and a half I have been using a few simple patterns that make testing GWT applications very easy. None of these are anything new, in fact most have been in use for years. It always surprises me when I work with a new team that is not doing these in their UI (GWT) code, but have used all or most of them on the server side. Testing GWT apps is simple! There are just a few key things to consider from the start, and you can easily achieve (and measure) 80% test coverage.</p>
<ol>
<li>Maintain separation between the business logic and your GUI layout. I use the MVP (Model View Presenter) pattern to do this. The view is where all the UI layout, data display and eventing necessary to intercept user interaction lives. Any code that leads to a GWT.create() call will cause regular unit tests to fail, and needs to be confined to the view. The presenter is where almost all the code to unit test is. Business logic, data processing (if not done on the server), RPC, event handling, etc.</li>
<li>Use Dependency Injection (Inversion of Control) to loosely couple the GUI code and business logic. <a title="Google gin" href="http://code.google.com/p/google-gin/">Google gin</a> is pretty much the only choice here, fortunately its a great one.</li>
<li>Use a mock object library for creating stand-ins for your GUI code during unit testing. <a title="Mockito" href="http://code.google.com/p/mockito/">Mockito</a> is my favorite choice for this task, it gets the job done and gets out of the way.</li>
</ol>
<div>All of this by its self goes a long way toward easy unit testing of GWT code, but there is a simple library that really ties it all together. <a title="AtUnit" href="http://code.google.com/p/atunit/">AtUnit</a>. AtUnit allows you to reuse the DI configuration you have already built, overriding only what you need with mock objects or custom configuration.</div>
<div>To get started you need a version of AtUnit that has been patched to work with Mockito. A few patches have been provided to AtUnit for including Mockito support. Unfortunately, there has been no effort to include them. You can get a patched version from my github fork here:</div>
<div><a href="https://github.com/andrewphahn/atunit/downloads">https://github.com/andrewphahn/atunit/downloads</a></div>
<div>Also, the example code for this article can be found here:</div>
<div><a href="https://github.com/andrewphahn/testable">https://github.com/andrewphahn/testable</a></div>
<div>So, what do I mean when I say MVP? If you research it on the internet or read google&#8217;s descriptions you quickly get a picture like the diagram below. What is less clear, is what do you put in the view vs the presenter. Because testability is one of the biggest reasons to use MVP, I let that define the separation. Anything that causes a call to GWT.create() belongs in the view. Everything else is directly testable in a &#8220;JVM&#8221; unit test, and belongs in the presenter.</div>
<div><a href="http://axixmiqui.files.wordpress.com/2011/11/mvp.png"><img class="aligncenter size-medium wp-image-132" style="margin-top:5px;margin-bottom:5px;" title="MVP" src="http://axixmiqui.files.wordpress.com/2011/11/mvp.png?w=300&#038;h=155" alt="" width="300" height="155" /></a></div>
<div>In order to keep the presenter and view implementations decoupled they only reference each other through their interfaces. Injecting them using gin is the next step towards easy unit tests. Gin has two ways to configure (bind) which implementation is used for an interface. The first is through annotations on the interface its self, this provides a default configuration. The second is using the gin module. Binding in the gin module can be used to over ride that done with annotations or to configure classes that are not annotated like the event bus. These examples are all annotation driven, as there is no need for module configuration.</div>
<div>Each interface is annotated with its default implementation.</div>
<div><pre class="brush: java;">@ImplementedBy(PresenterImpl.class)
public interface Presenter {

	void attach();

}</pre></p>
</div>
<div>The implementation is the annotated to have the interfaces injected and to configure them as singletons. Here the presenter gets its view and the service injected.</div>
<div><pre class="brush: java;">@Singleton
public class PresenterImpl implements Presenter, InteractionHandler {

	protected static final String PLEASE_ENTER_AT_LEAST_FOUR_CHARACTERS = &quot;Please enter at least four characters&quot;;
	protected static final String REMOTE_PROCEDURE_CALL_FAILURE = &quot;Remote Procedure Call - Failure&quot;;
	protected static final String REMOTE_PROCEDURE_CALL = &quot;Remote Procedure Call&quot;;

	@Inject
	protected View view;

	@Inject
	protected GreetingServiceAsync greetingService;

	@Override
	public void attach() {
		view.attach();
	}

	/**
	 * Send the name from the nameField to the server and wait for a response.
	 */
	@Override
	public void sendNameToServer(String textToServer) {
		// First, we validate the input.
		if (!FieldVerifier.isValidName(textToServer)) {
			view.setErrorLabelText(PLEASE_ENTER_AT_LEAST_FOUR_CHARACTERS);
			return;
		} else {
			view.setErrorLabelText(&quot;&quot;);
		}

		// Then, we send the input to the server.
		view.setSendButtonEnabled(false);
		view.setTextToServerLabelText(textToServer);
		view.clearServerResponseLabelText();
		greetingService.greetServer(textToServer, new TextToServerCallback());
	}

	protected class TextToServerCallback implements AsyncCallback&lt;String&gt; {

		public void onFailure(Throwable caught) {
			// Show the RPC error message to the user
			view.onFailure(REMOTE_PROCEDURE_CALL_FAILURE);

		}

		public void onSuccess(String result) {
			view.onSuccess(REMOTE_PROCEDURE_CALL, result);
		}
	}
}</pre></p>
<p>Likewise the view gets a reference to the presenter through the interaction handler interface to pass user interaction back to it. The injection is done using a gin Provider to prevent an infinite loop in gin.</p>
<p><pre class="brush: java;">@Singleton
public class ViewImpl extends Composite implements View {

	private static final Binder BINDER = GWT.create(Binder.class);

	/**
	 * The message displayed to the user when the server cannot be reached or
	 * returns an error.
	 */
	private static final String SERVER_ERROR = &quot;An error occurred while &quot;
			+ &quot;attempting to contact the server. Please check your network &quot; + &quot;connection and try again.&quot;;

	@Inject
	protected Provider&lt;InteractionHandler&gt; interacrionHandlerProvider;

	@UiField
	protected TextBox nameField;

	@UiField
	protected Button sendButton;

	@UiField
	protected Label errorLabel;

	private DialogBox dialogBox;

	private Button closeButton;

	private HTML serverResponseLabel;

	private Label textToServerLabel;

	public ViewImpl() {
		super();

		initWidget(BINDER.createAndBindUi(this));

		// Focus the cursor on the name field when the app loads
		nameField.setFocus(true);
		nameField.selectAll();

		createDialog();
	}

	@UiHandler(&quot;sendButton&quot;)
	public void handleSendButtonClick(ClickEvent event) {
		interacrionHandlerProvider.get().sendNameToServer(nameField.getText());
	}

	@UiHandler(&quot;nameField&quot;)
	public void handleNameFieldEnter(KeyUpEvent event) {
		if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
			interacrionHandlerProvider.get().sendNameToServer(nameField.getText());
		}
	}

	public void createDialog() {
		dialogBox = new DialogBox();
		dialogBox.setText(&quot;Remote Procedure Call&quot;);
		dialogBox.setAnimationEnabled(true);
		closeButton = new Button(&quot;Close&quot;);
		// We can set the id of a widget by accessing its Element
		closeButton.getElement().setId(&quot;closeButton&quot;);
		textToServerLabel = new Label();
		serverResponseLabel = new HTML();
		VerticalPanel dialogVPanel = new VerticalPanel();
		dialogVPanel.addStyleName(&quot;dialogVPanel&quot;);
		dialogVPanel.add(new HTML(&quot;&lt;b&gt;Sending name to the server:&lt;/b&gt;&quot;));
		dialogVPanel.add(textToServerLabel);
		dialogVPanel.add(new HTML(&quot;&lt;br&gt;&lt;b&gt;Server replies:&lt;/b&gt;&quot;));
		dialogVPanel.add(serverResponseLabel);
		dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
		dialogVPanel.add(closeButton);
		dialogBox.setWidget(dialogVPanel);

		// Add a handler to close the DialogBox
		closeButton.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				dialogBox.hide();
				sendButton.setEnabled(true);
				sendButton.setFocus(true);
			}
		});
	}

	@Override
	public Widget asWidget() {
		return this;
	}

	@Override
	public void attach() {
		RootPanel.get().add(this);
	}

	@Override
	public void setErrorLabelText(String text) {
		errorLabel.setText(text);
	}

	@Override
	public void setSendButtonEnabled(boolean enabled) {
		sendButton.setEnabled(enabled);
	}

	@Override
	public void setTextToServerLabelText(String textToServer) {
		textToServerLabel.setText(textToServer);
	}

	@Override
	public void onFailure(String string) {
		dialogBox.setText(string);
		serverResponseLabel.addStyleName(&quot;serverResponseLabelError&quot;);
		serverResponseLabel.setHTML(SERVER_ERROR);
		dialogBox.center();
		closeButton.setFocus(true);
	}

	@Override
	public void onSuccess(String text, String result) {
		dialogBox.setText(text);
		serverResponseLabel.removeStyleName(&quot;serverResponseLabelError&quot;);
		serverResponseLabel.setHTML(result);
		dialogBox.center();
		closeButton.setFocus(true);
	}

	@Override
	public void clearServerResponseLabelText() {
		serverResponseLabel.setText(&quot;&quot;);
	}
}</pre></p>
<p>Now for the testing magic! For the same reason you can replace the view implementation with something else at test time (decoupled by interfaces), you can replace the gin implementation with a guice one. Gin is full of GWT.create() calls, but Guice is a java library and works beautifully in unit tests. <em>Because the gin annotations are really guice annotations, simply starting a guice module instead of a gin one works with no other modifications</em>.</p>
<p>The most efficient way to start a guice module in a unit test and combine it with the power of Mockito is AtUnit. To setup a test where the presenter is created for you and injected with either the configuration defined in the annotations or mockito objects all you have to do is add a few simple annotations.</p>
<p><pre class="brush: java;">@RunWith(AtUnit.class)
@Container(Container.Option.GUICE)
@MockFramework(MockFramework.Option.MOCKITO)
public class PresenterTest extends Assert implements Module {

	private static final String IT_WORKED = &quot;It worked&quot;;

	private static final String HELLO_WORLD = &quot;Hello World&quot;;

	/**
	 * Inject the class to be tested. Using the Impl gives access to methods not
	 * on the presenter interface w/o casting.
	 */
	@Inject
	@Unit
	PresenterImpl presenter;

	/**
	 * Override the annotation configuration in the code to inject a mock
	 * instance.
	 */
	@Mock
	View view;

	/**
	 * Override the default gin call to GWT.create() to inject a mock instance.
	 */
	@Mock
	GreetingServiceAsync greetingService;

	@Override
	public void configure(Binder binder) {
		// Nothing extra to configure. All injection configuration is already
		// done by annotations in the code or the @Mock annotations above
	}

	/**
	 * Verify the Presenter.attach() delegates to the view.
	 */
	@Test
	public void testAttach() {
		presenter.attach();

		verify(view).attach();
	}

	@Test
	public void testSendToServer() {
		presenter.sendNameToServer(HELLO_WORLD);

		verify(view).setErrorLabelText(&quot;&quot;);
		verify(view).setSendButtonEnabled(false);
		verify(view).setTextToServerLabelText(HELLO_WORLD);
		verify(view).clearServerResponseLabelText();
		verify(greetingService).greetServer(Mockito.eq(HELLO_WORLD), Mockito.any(TextToServerCallback.class));
	}

	@Test
	public void testSendToServerInvalidText() {
		presenter.sendNameToServer(&quot;123&quot;);
		verify(view).setErrorLabelText(PresenterImpl.PLEASE_ENTER_AT_LEAST_FOUR_CHARACTERS);
	}

	@Test
	public void testCallbackOnSuccess() {
		TextToServerCallback callback = presenter.new TextToServerCallback();
		callback.onSuccess(IT_WORKED);

		verify(view).onSuccess(PresenterImpl.REMOTE_PROCEDURE_CALL, IT_WORKED);
	}

	@Test
	public void testCallbackOnFailure() {
		TextToServerCallback callback = presenter.new TextToServerCallback();
		callback.onFailure(new Exception());

		verify(view).onFailure(PresenterImpl.REMOTE_PROCEDURE_CALL_FAILURE);
	}
}</pre></p>
</div>
<div>As always, a little forethought about the project structure pays big dividends in testability. Download or clone the sample code and eclipse project from github and explore it for yourself.</div>
<div> <a href="https://github.com/andrewphahn/testable">https://github.com/andrewphahn/testable</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=123&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2011/11/11/efficient-gwt-unit-testing-mvp-google-gin-atunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://axixmiqui.files.wordpress.com/2011/11/mvp.png?w=300" medium="image">
			<media:title type="html">MVP</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring: Handling incoming JMS messages asynchronously</title>
		<link>http://axixmiqui.wordpress.com/2009/09/02/spring-handling-incoming-jms-messages-asynchronously/</link>
		<comments>http://axixmiqui.wordpress.com/2009/09/02/spring-handling-incoming-jms-messages-asynchronously/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 00:47:07 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[activemq]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jms]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=113</guid>
		<description><![CDATA[Handling incoming JMS messages in an asynchronous manner requires, implementing a MessageListener, creating a connection, starting a thread, handling connection loss and thread death, etc&#8230; Spring&#8217;s MessageListenerContainers provide a &#8220;Message Driven Pojo&#8221; framework that handles all that for you except implementing the MessageListener. To take advantage of this you first need to create JMS connection [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=113&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Handling incoming JMS messages in an asynchronous manner requires, implementing a MessageListener, creating a connection, starting a thread, handling connection loss and thread death, etc&#8230;<br />
Spring&#8217;s MessageListenerContainers provide a &#8220;Message Driven Pojo&#8221; framework that handles all that for you except implementing the MessageListener. </p>
<p>To take advantage of this you first need to create JMS connection factory and Destination:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;connectionPool&quot;
		class=&quot;org.springframework.jms.connection.SingleConnectionFactory&quot;&gt;
		&lt;property name=&quot;targetConnectionFactory&quot;&gt;
			&lt;bean class=&quot;org.apache.activemq.ActiveMQConnectionFactory&quot;&gt;
				&lt;property name=&quot;brokerURL&quot; value=&quot;tcp://localhost&quot;/&gt;
			&lt;/bean&gt;
		&lt;/property&gt;
	&lt;/bean&gt;

	&lt;bean id=&quot;messageDestination&quot; class=&quot;org.apache.activemq.command.ActiveMQQueue&quot;&gt;
		&lt;constructor-arg value=&quot;MY.INCOMING&quot; /&gt;
	&lt;/bean&gt;
</pre></p>
<p>Then implement the MessageListener interface:<br />
<pre class="brush: java;">
@Component(&quot;IncomingMsgProcessor&quot;)
public class IncomingMsgProcessor implements MessageListener {
    @Override
    public void onMessage(Message message)
    {
         //Your message handling code here
    }
}
</pre></p>
<p>And finally inject an instance into the MessageListenerContainer:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;incommingMessageListenerContainer&quot;
		class=&quot;org.springframework.jms.listener.DefaultMessageListenerContainer&quot;&gt;
		&lt;property name=&quot;connectionFactory&quot; ref=&quot;connectionPool&quot; /&gt;
		&lt;property name=&quot;destination&quot; ref=&quot;messageDestination&quot; /&gt;
		&lt;property name=&quot;messageListener&quot; ref=&quot;IncomingMsgProcessor&quot; /&gt;
		&lt;!--
			Retry connection every 10 seconds.
		--&gt;
		&lt;property name=&quot;recoveryInterval&quot; value=&quot;10000&quot; /&gt;
	&lt;/bean&gt;
</pre></p>
<p><code>org.springframework.jms.listener.DefaultMessageListenerContainer</code> gives a nice set of features, but spring offers other implementations if more (or less) is needed. If your message listener needs access to the JMS session you can implement <code>SessionAwareMessageListener</code> which has a method that take the message and session <code>onMessage(Message message, Session session)</code> instead.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=113&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2009/09/02/spring-handling-incoming-jms-messages-asynchronously/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring: Injecting JAXB (Un)Marshaller</title>
		<link>http://axixmiqui.wordpress.com/2009/09/01/spring-injecting-jaxb-unmarshaller/</link>
		<comments>http://axixmiqui.wordpress.com/2009/09/01/spring-injecting-jaxb-unmarshaller/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 03:30:44 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jaxb]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=109</guid>
		<description><![CDATA[Create a JAXB context passing an array of root element classes: Create prototypes for the marshallers/unmarshallers Wrap these in pool targets: And create pools for reusing marshallers/unmarshallers: This will create one context that will be used to create up to 25 marshallers/unmarshallers. Each will be created on demand until there are 25 in use simultaneously, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=109&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Create a JAXB context passing an array of root element classes:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;jaxbContext&quot; class=&quot;javax.xml.bind.JAXBContext&quot;
		factory-method=&quot;newInstance&quot;&gt;
		&lt;constructor-arg&gt;
			&lt;list&gt;
				&lt;value type=&quot;java.lang.Class&quot;&gt;my.example.rootclass.Root&lt;/value&gt;
			&lt;/list&gt;
		&lt;/constructor-arg&gt;
	&lt;/bean&gt;
</pre></p>
<p>Create prototypes for the marshallers/unmarshallers<br />
<pre class="brush: xml;">
	&lt;!-- Pool (un)marshallers to improve performance --&gt;
	&lt;bean id=&quot;marshallerTarget&quot; class=&quot;javax.xml.bind.Marshaller&quot;
		factory-bean=&quot;jaxbContext&quot; factory-method=&quot;createMarshaller&quot;
		scope=&quot;prototype&quot;&gt;
	&lt;/bean&gt;

	&lt;bean id=&quot;unmarshallerTarget&quot; class=&quot;javax.xml.bind.Unmarshaller&quot;
		factory-bean=&quot;jaxbContext&quot; factory-method=&quot;createUnmarshaller&quot;
		scope=&quot;prototype&quot;&gt;
	&lt;/bean&gt;
</pre></p>
<p>Wrap these in pool targets:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;poolTargetSource&quot; class=&quot;org.springframework.aop.target.CommonsPoolTargetSource&quot;&gt;
		&lt;property name=&quot;targetBeanName&quot; value=&quot;marshallerTarget&quot; /&gt;
		&lt;property name=&quot;maxSize&quot; value=&quot;25&quot; /&gt;
	&lt;/bean&gt;

	&lt;bean id=&quot;unmarshallerPoolTargetSource&quot; class=&quot;org.springframework.aop.target.CommonsPoolTargetSource&quot;&gt;
		&lt;property name=&quot;targetBeanName&quot; value=&quot;unmarshallerTarget&quot; /&gt;
		&lt;property name=&quot;maxSize&quot; value=&quot;25&quot; /&gt;
	&lt;/bean&gt;
</pre></p>
<p>And create pools for reusing marshallers/unmarshallers:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;marshaller&quot; class=&quot;org.springframework.aop.framework.ProxyFactoryBean&quot;&gt;
		&lt;qualifier value=&quot;marshaller&quot; /&gt;
		&lt;property name=&quot;targetSource&quot; ref=&quot;poolTargetSource&quot; /&gt;
	&lt;/bean&gt;

	&lt;bean id=&quot;unmarshaller&quot; class=&quot;org.springframework.aop.framework.ProxyFactoryBean&quot;&gt;
		&lt;qualifier value=&quot;unmarshaller&quot; /&gt;
		&lt;property name=&quot;targetSource&quot; ref=&quot;unmarshallerPoolTargetSource&quot; /&gt;
	&lt;/bean&gt;
</pre></p>
<p>This will create one context that will be used to create up to 25 marshallers/unmarshallers. Each will be created on demand until there are 25 in use simultaneously, then calls to them will block until one becomes available. Be careful changing the state on the (un)marshallers. It would probably be a better idea to create prototypes for each configuration and inject a separate pool for each. </p>
<p>These can be injected in the application context or using annotations:<br />
<pre class="brush: java;">
    @Autowired
    @Qualifier(&quot;unmarshaller&quot;)
    private Unmarshaller unmarshaller;

    @Autowired
    @Qualifier(&quot;marshaller&quot;)
    private Marshaller marshaller;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=109&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2009/09/01/spring-injecting-jaxb-unmarshaller/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring: Injecting ActiveMQ JMS Connection</title>
		<link>http://axixmiqui.wordpress.com/2009/09/01/spring-injecting-activemq-jms-connection/</link>
		<comments>http://axixmiqui.wordpress.com/2009/09/01/spring-injecting-activemq-jms-connection/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 03:03:02 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[activemq]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jms]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=106</guid>
		<description><![CDATA[First create a connection factory. Create destiation: Inject this into spring a template: Which can then be injected in the application context or using annotations:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=106&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First create a connection factory.<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;connectionPool&quot;
		class=&quot;org.springframework.jms.connection.SingleConnectionFactory&quot;&gt;
		&lt;property name=&quot;targetConnectionFactory&quot;&gt;
			&lt;bean class=&quot;org.apache.activemq.ActiveMQConnectionFactory&quot;&gt;
				&lt;property name=&quot;brokerURL&quot; value=&quot;tcp://localhost&quot;/&gt;
			&lt;/bean&gt;
		&lt;/property&gt;
	&lt;/bean&gt;
</pre></p>
<p>Create destiation:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;messageDestination&quot; class=&quot;org.apache.activemq.command.ActiveMQQueue&quot;&gt;
		&lt;constructor-arg value=&quot;MY.OUTGOING&quot; /&gt;
	&lt;/bean&gt;
</pre></p>
<p>Inject this into spring a template:<br />
<pre class="brush: xml;">
	&lt;bean id=&quot;jmsSendTemplate&quot; class=&quot;org.springframework.jms.core.JmsTemplate&quot;&gt;
		&lt;qualifier value=&quot;messageTemplate&quot; /&gt;
		&lt;property name=&quot;connectionFactory&quot;&gt;
			&lt;ref bean=&quot;connectionFactory&quot; /&gt;
		&lt;/property&gt;
		&lt;property name=&quot;defaultDestination&quot;&gt;
			&lt;ref bean=&quot;messageDestination&quot; /&gt;
		&lt;/property&gt;
	&lt;/bean&gt;
</pre></p>
<p>Which can then be injected in the application context or using annotations:<br />
<pre class="brush: java;">
    @Autowired
    @Qualifier(&quot;messageTemplate&quot;)
    JmsTemplate jmsReceiveTemplate;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=106&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2009/09/01/spring-injecting-activemq-jms-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Next Sequence Value Using Hibernate Entity Manager</title>
		<link>http://axixmiqui.wordpress.com/2009/09/01/next-sequence-value-using-hibernate-entity-manager/</link>
		<comments>http://axixmiqui.wordpress.com/2009/09/01/next-sequence-value-using-hibernate-entity-manager/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 02:30:53 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=100</guid>
		<description><![CDATA[To retrieve the next value of an Orcale sequence using the Hibernate Entity Manager first create a result set mapping. The mapping can go anywhere, I like to put it on the entity it is most closely associated with. Then in your DAO. This example is written for Hibernate 3.3.2, Hibernate Entity Manager 3.4.0, Oracle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=100&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To retrieve the next value of an Orcale sequence using the Hibernate Entity Manager first create a result set mapping.</p>
<p><pre class="brush: java;">
@SqlResultSetMapping(name = &quot;NextSequenceVal&quot;, columns = { @ColumnResult(name = &quot;NEXTVAL&quot;) })
</pre></p>
<p>The mapping can go anywhere, I like to put it on the entity it is most closely associated with.<br />
Then in your DAO.</p>
<p><pre class="brush: java;">
    public Long getNextElecTransUniqueId()
    {
        Query query = entityManager.createNativeQuery(&quot;SELECT MY_SEQUENCE.NEXTVAL from Dual&quot;,
                &quot;NextSequenceVal&quot;);
        // Workaround for
        // http://opensource.atlassian.com/projects/hibernate/browse/EJB-434
        // which breaks query.getSingleResult()
        return ((BigDecimal) query.getResultList().get(0)).longValue();

    }
</pre></p>
<p>This example is written for Hibernate 3.3.2, Hibernate Entity Manager 3.4.0, Oracle 10g.</p>
<p><em>Note:</em> in Entity Manager 3.4.0 if you use <code>query.getSingleResult()</code> you will get the exception:<br />
<code>Exception: org.hibernate.exception.SQLGrammarException: could not execute query^M<br />
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)^M<br />
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)^M<br />
        at org.hibernate.loader.Loader.doList(Loader.java:2235)^M<br />
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)^M<br />
        at org.hibernate.loader.Loader.list(Loader.java:2124)^M<br />
        at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)^M<br />
        at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1723)^M<br />
        at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)^M<br />
        at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)^M<br />
        at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:88)^M<br />
Caused by: java.sql.SQLException: ORA-02287: sequence number not allowed here</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=100&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2009/09/01/next-sequence-value-using-hibernate-entity-manager/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Grails fails to start with cryptic error</title>
		<link>http://axixmiqui.wordpress.com/2009/05/25/grails-fails-to-start-with-cryptic-error/</link>
		<comments>http://axixmiqui.wordpress.com/2009/05/25/grails-fails-to-start-with-cryptic-error/#comments</comments>
		<pubDate>Mon, 25 May 2009 17:19:35 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[grails groovy closure]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=87</guid>
		<description><![CDATA[I ran into a coding error in a Grails (1.0.4, this does not appear to be an issue in 1.1.1) app recently that proved very hard to diagnose. It turned out to be a simple coding error, just hard to spot syntax. After a simple refactor by someone else I was asked to help figure [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=87&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I ran into a coding error in a Grails (1.0.4,<em> this does not appear to be an issue in 1.1.1</em>) app recently that proved very hard to diagnose. It turned out to be a simple coding error, just hard to spot syntax.</p>
<p>After a simple refactor by someone else I was asked to help figure out why the app would no longer run. We got a error like:</p>
<p><code> Failed startup of context org.mortbay.jetty.webapp.WebAppContext@59139826{/ClosureTest,/Users/ahahn/devel/src/test/ClosureTest/web-app}<br />
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at RunApp_groovy$_run_closure2_closure7.doCall(RunApp_groovy:67)<br />
at RunApp_groovy$_run_closure2_closure7.doCall(RunApp_groovy)<br />
at Init_groovy$_run_closure6.doCall(Init_groovy:131)<br />
at RunApp_groovy$_run_closure2.doCall(RunApp_groovy:66)<br />
at RunApp_groovy$_run_closure2.doCall(RunApp_groovy)<br />
at RunApp_groovy$_run_closure1.doCall(RunApp_groovy:57)<br />
at RunApp_groovy$_run_closure1.doCall(RunApp_groovy)<br />
at gant.Gant.dispatch(Gant.groovy:271)<br />
at gant.Gant.this$2$dispatch(Gant.groovy)<br />
at gant.Gant.invokeMethod(Gant.groovy)<br />
at gant.Gant.processTargets(Gant.groovy:436)<br />
at gant.Gant.processArgs(Gant.groovy:372)<br />
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass<br />
... 13 more<br />
Caused by: java.lang.reflect.InvocationTargetException<br />
... 13 more<br />
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [TestController]!<br />
... 13 more<br />
Caused by: java.lang.VerifyError: (class: TestController$_closure2, method: doCall signature: (Ljava/lang/Object;)Ljava/lang/Object;) Incompatible argument to function<br />
at TestController.(TestController.groovy)<br />
... 13 more<br />
2009-05-25 11:01:25.026::WARN:  Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass:<br />
java.lang.VerifyError: (class: TestController$_closure2, method: doCall signature: (Ljava/lang/Object;)Ljava/lang/Object;) Incompatible argument to function<br />
at TestController.(TestController.groovy)<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at RunApp_groovy$_run_closure2_closure7.doCall(RunApp_groovy:67)<br />
at RunApp_groovy$_run_closure2_closure7.doCall(RunApp_groovy)<br />
at Init_groovy$_run_closure6.doCall(Init_groovy:131)<br />
at RunApp_groovy$_run_closure2.doCall(RunApp_groovy:66)<br />
at RunApp_groovy$_run_closure2.doCall(RunApp_groovy)<br />
at RunApp_groovy$_run_closure1.doCall(RunApp_groovy:57)<br />
at RunApp_groovy$_run_closure1.doCall(RunApp_groovy)<br />
at gant.Gant.dispatch(Gant.groovy:271)<br />
at gant.Gant.this$2$dispatch(Gant.groovy)<br />
at gant.Gant.invokeMethod(Gant.groovy)<br />
at gant.Gant.processTargets(Gant.groovy:436)<br />
at gant.Gant.processArgs(Gant.groovy:372)</code></p>
<p>Which I could trace to the TestController code:</p>
<p><pre class="brush: python;">def list = Test.list( params )
 def testMaps = []
 if(list) {
   list.each {test -&gt;
     if(test.bool) {
       testMaps &lt;&lt; [
         foo: it.foo,
         bar: &quot;Bar ${it.bar}&quot;
       ]
     }
   }
}</pre></p>
<p>Spot it yet? No really, spot <em><span style="color:#008000;"><strong>it</strong></span></em> yet? It is simply a case of an incomplete refactor, the each closure was changed to have a named parameter &#8216;test&#8217; but not all code in the body was refactored. Most of the references to the current object in the iteration still used the default parameter &#8216;it&#8217;. So what you would expect to be a run time error actual blows up at start up.</p>
<p>Just in case, here it the working code:</p>
<p><pre class="brush: python;">def list = Test.list( params )
 def testMaps = []
 if(list) {
   list.each {test -&gt;
     if(test.bool) {
       testMaps &lt;&lt; [
         foo: test.foo,
         bar: &quot;Bar ${test.bar}&quot;
       ]
     }
   }
}</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=87&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2009/05/25/grails-fails-to-start-with-cryptic-error/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>What jar is that friggin class in?!?!?!</title>
		<link>http://axixmiqui.wordpress.com/2009/03/21/what-jar-is-that-friggin-class-in/</link>
		<comments>http://axixmiqui.wordpress.com/2009/03/21/what-jar-is-that-friggin-class-in/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 17:29:11 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[classpath]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[java.lang.NoClassDefFoundError]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=77</guid>
		<description><![CDATA[It seems to me that one of the most common tasks I have to preform when packaging a J2EE project is to find out what jar a class I depend on is in. I have written (multiple times now) a simple perl script that finds all the jars in a given directory and scans them [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=77&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It seems to me that one of the most common tasks I have to preform when packaging a J2EE project is to find out what jar a class I depend on is in.</p>
<p>I have written (multiple times now) a simple perl script that finds all the jars in a given directory and scans them for a file. Thanks to the power of regular expressions you can pass in either <code>com.foo.bar.Class</code> or <code>com/foo/bar/Class</code> which ever is easier to cut-n-paste from the <code>java.lang.NoClassDefFoundError</code>, or similar, stack trace.</p>
<p><pre class="brush: ruby;">
#!/usr/bin/perl

$JAR_COMMAND = &quot;jar&quot;;
#Uncomment to use fastjar instead
#$JAR_COMMAND = &quot;fastjar&quot;;

$class = &quot;&quot;;
$lookin = &quot;.&quot;;
if(@ARGV &lt; 1) {
    print &quot;USAGE: \n\tclassfinder [dir to search fo jars]
&lt;packageName&gt;\n&quot;;
    exit;
} elsif (@ARGV &gt; 1) {
  $lookin = $ARGV[0];
  $class = $ARGV[1];
} else {
  $class = $ARGV[0];
}

foreach $jar (`find $lookin -name '*\.jar'`) {
    chomp $jar;
    foreach $file (`$JAR_COMMAND -tf $jar`) {
        chomp $file;
        if($file =~ $class) {
            print &quot;$jar:$file\n&quot;}
    }
}
</pre></p>
<p>The script relies on the standard unix utility <code>find</code>, it works on unix, linux, osx and cygwin. If you have an easy way to do this without using <code>find</code> I&#8217;d love to see it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=77&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2009/03/21/what-jar-is-that-friggin-class-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Minicom ymodem issue</title>
		<link>http://axixmiqui.wordpress.com/2008/05/16/minicom-ymodem-issue/</link>
		<comments>http://axixmiqui.wordpress.com/2008/05/16/minicom-ymodem-issue/#comments</comments>
		<pubDate>Fri, 16 May 2008 16:47:41 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[embedded]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[minicom]]></category>
		<category><![CDATA[ymodem]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=21</guid>
		<description><![CDATA[This was a simple fix, but took a while to figure out because of less than informative error messages. While trying to transfer a file (a Linux kernel) using minicom and ymodem we got a protocol failed error when using one machine (my laptop) and it worked on another. After checking versions of minicom, serial [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=21&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This was a simple fix, but took a while to figure out because of less than informative error messages. While trying to transfer a file (a Linux kernel) using minicom and ymodem we got a <code>protocol failed</code> error when using one machine (my laptop) and it worked on another. After checking versions of minicom, serial adapter drivers, ymodem config, etc&#8230; we noticed that minicom is setup to use <code>/usr/bin/rb</code> and <code>/usr/bin/sb</code> for ymodem comm. Turns out, they weren&#8217;t installed! On Debian (*buntu) the lrzsz package is what is needed. A quick <code>apt-get install lrzsz</code> and we were up and running.</p>
<p>Gotta love cryptic error messages!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/axixmiqui.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/axixmiqui.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=21&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2008/05/16/minicom-ymodem-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Adventures in Grails &#8211; Running more than one version of your app</title>
		<link>http://axixmiqui.wordpress.com/2008/03/29/adventures-in-grails-running-more-than-one-version-of-your-app/</link>
		<comments>http://axixmiqui.wordpress.com/2008/03/29/adventures-in-grails-running-more-than-one-version-of-your-app/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 15:35:17 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[web.xml]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=20</guid>
		<description><![CDATA[Update: Posted a patch to the Grails JIRA http://jira.codehaus.org/browse/GRAILS-2771 Grails provides a simple versioning system for your application with the app.version property in application.properties. When you build a .war for deployment the file name is given by "${app.name}-${app.version}.war". For me this is great, I frequently need to run multiple versions of an app to support [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=20&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><b>Update: </b>Posted a patch to the Grails JIRA <a href="http://jira.codehaus.org/browse/GRAILS-2771" title="JIRA Issue 2771">http://jira.codehaus.org/browse/GRAILS-2771</a></p>
<p>Grails provides a simple versioning system for your application with the <code>app.version</code> property in <code>application.properties</code>. When you build a .war for deployment the file name is given by <code>"${app.name}-${app.version}.war"</code>. For me this is great, I frequently need to run multiple versions of an app to support multiple client development branches. However, when I dropped myApp-0.2.war into tomcat&#8217;s webapp dir along side myApp-0.1.war the deployment failed. On tomcat 6.0.16 the error is cryptic and far from helpful <code>SEVERE: Error listenerStart</code>. Tomcat 5.5.26 provided a much more useful error message. It turns out that Grails only includes the version number in the .war file name and not in web.xml where it uses only the app name.</p>
<p>To fix this all you need to do is edit the web.xml of one of the versions and replace the app name with something else. Well, thats not very Groovy! To have Grails do this for you it is a simple change to the Package.groovy script that ships with Grails.</p>
<p>The lines (264-266):</p>
<p><pre class="brush: python;">

Ant.copy(file:&quot;${grailsHome}/src/war/WEB-INF/web${servletVersion}.template.xml&quot;, tofile:tmpWebXml)

                Ant.replace(file:tmpWebXml, token:&quot;@grails.project.key@&quot;, value:&quot;${grailsAppName}&quot;)

</pre><br />
get changed to:<br />
<pre class="brush: python;">

Ant.copy(file:&quot;${grailsHome}/src/war/WEB-INF/web${servletVersion}.template.xml&quot;, tofile:tmpWebXml, overwrite:true)

Ant.replace(file:tmpWebXml, token:&quot;@grails.project.key@&quot;, value:&quot;${grailsAppName}-${grailsAppVersion}&quot;)

</pre><br />
The overwrite:true in the copy task is necessary so that when the version is changed, web.xml is updated. This will break you if you rely on hand made changes to web.tmp.xml if your ~/.grails directory. Though, you might not want to do things that way anyway.On a side note, you may want to define more environments in <code>grails-app/config/DataSources.groovy</code> if you have changed your app&#8217;s DB schema to prevent errors.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/axixmiqui.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/axixmiqui.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=20&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2008/03/29/adventures-in-grails-running-more-than-one-version-of-your-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL install fails on Ubuntu with static IP</title>
		<link>http://axixmiqui.wordpress.com/2008/03/12/mysql-install-fails-on-ubuntu-with-static-ip/</link>
		<comments>http://axixmiqui.wordpress.com/2008/03/12/mysql-install-fails-on-ubuntu-with-static-ip/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 21:23:47 +0000</pubDate>
		<dc:creator>Andrew Hahn</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[mysql-server]]></category>
		<category><![CDATA[static ip]]></category>

		<guid isPermaLink="false">http://axixmiqui.wordpress.com/?p=19</guid>
		<description><![CDATA[Update: It was not the static IP address, but the fact that due to a typo in /etc/network/interfaces the loopback device was not active. Installing MySQL server on Ubuntu fails if the machine has a static IP address. sudo apt-get install mysql-server Results in: Setting up mysql-server-5.0 (5.0.45-1ubuntu3.1) ... * Stopping MySQL database server mysqld [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=19&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><b>Update:</b></p>
<p><i>It was not the static IP address, but the fact that due to a typo in</i> <code>/etc/network/interfaces</code> <i>the loopback device was not active.</i></p>
<p>Installing MySQL server on Ubuntu fails if the machine has a static IP address.</p>
<p><code>sudo apt-get install mysql-server</code></p>
<p>Results in:</p>
<p><code>Setting up mysql-server-5.0 (5.0.45-1ubuntu3.1) ...<br />
* Stopping MySQL database server mysqld<br />
...done.<br />
* Starting MySQL database server mysqld<br />
...fail!<br />
invoke-rc.d: initscript mysql, action "start" failed.<br />
dpkg: error processing mysql-server-5.0 (--configure):<br />
subprocess post-installation script returned error exit status 1<br />
dpkg: dependency problems prevent configuration of mysql-server:<br />
mysql-server depends on mysql-server-5.0; however:<br />
Package mysql-server-5.0 is not configured yet.<br />
dpkg: error processing mysql-server (--configure):<br />
dependency problems - leaving unconfigured<br />
Processing triggers for libc6 ...<br />
ldconfig deferred processing now taking place<br />
Errors were encountered while processing:<br />
mysql-server-5.0<br />
mysql-server<br />
E: Sub-process /usr/bin/dpkg returned an error code (1)</code></p>
<p>To fix this edit <code>/etc/mysql/my.conf</code> and change the <code>bind-address</code> to the static address of the machine. Then rerun apt-get to finish the configuration of the packages.</p>
<p><code>sudo apt-get -f install</code></p>
<p>Reported to <a href="https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/201584">Ubuntu launchpad </a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/axixmiqui.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/axixmiqui.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/axixmiqui.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/axixmiqui.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/axixmiqui.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/axixmiqui.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/axixmiqui.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/axixmiqui.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/axixmiqui.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/axixmiqui.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=axixmiqui.wordpress.com&amp;blog=2128021&amp;post=19&amp;subd=axixmiqui&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://axixmiqui.wordpress.com/2008/03/12/mysql-install-fails-on-ubuntu-with-static-ip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bb74bdec57bafb23131fc84f939939f1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
