Author Archives: juhap

Liferay service builder, class loader issues

When you create a new service with Liferay service builder that system generates a whole lot of boilerplate code based on the few lines you put into the service.xml. Part of the code deals with the problem related to passing … Continue reading

Posted in Liferay |

Debugging ClassCastExceptions in Eclipse

Working with application servers it is not uncommon to run into strange ClassCastExceptions which seem to have now reason. You are trying to cast an instance of MyModel to MyModel and yet them JVM is having issues with it. Experience … Continue reading

Posted in Eclipse |

Using git to deploy new versions

Simple instructions for setting up git so that you can push new versions to server from the comfort of your workstation. This is based on article by Abhijit Menon-Sen. If you need more details, take a look at that. This … Continue reading

Posted in Web development |

NullPointerException while creating new Portlet project in Liferay IDE

Creating new portlet project in Liferay IDE may result in NullPointerException and complaints about no IModelProvider being found for Dynamic Web Module 3.0. An example of the stack trace is below (you can see this in your $WORKSPACE/.metadata/.log -file). This … Continue reading

Posted in Misc |

Starting up node.js apps on Ubuntu

Tim Smart describes in his article a great way to use upstart on Ubuntu to startup node.js applications. Below is my version of his script. I stripped the PID file handling and moved configuration to use environment variables (to be … Continue reading

Posted in Ubuntu |

Replacing multiple occurences of character in bash

I wanted to replace multiple occurrences of underscore with single in one bash shell script. With regular expressions this is pretty simple, but by default they are not available directly in bash (using awk, sed and other tools would have … Continue reading

Posted in Misc |

Transfer MongoDB collection to Windows

A quick’n’dirty1 way for transfering MongoDB collection from Linux to Windows, using plink as the ssh client. If you have setup the key based authentication for SSH and are using pageant to manage the key locally, this does not prompt … Continue reading

Posted in MongoDB |

D-Link routers and ZoneEdit dynamic dns

Some D-Link models support updating selected dynamic dns services. The support is however limited and it seems to be that for example you can’t configure it to push updates to ZoneEdit. A simple workaround is to use the D-Link provided … Continue reading

Posted in Misc |

Install latest MongoDB in Ubuntu

The MongoDB version available from the default Ubuntu/Debian repositories can be fairly old. Luckily it is easy to get a newer version directly from 10gen repository Source:

Posted in Misc |

Apache reverse proxy on Ubuntu

Install Apache and Enable relevant Apache proxy modules Create new configuration file for the virtual host in /etc/apache2/sites-available. Link the created configuration file to sites-enabled. The numbers in target name are there to guarantee the files get loaded in certain … Continue reading

Posted in Web development |