Sunday, May 22, 2011

My Cloudfoundry experience

I finally decided to follow up on my "Congratulations, You have been signed up with Cloudfoundry" email and see if I can go flying in the cloud. I looked at the help doc and started following along.
You'd have to install ruby and ruby gems, unless you opt for the STS plugin. The Cloudfoundry's deploy tool vmc is a gem so the first thing I did was "gem install vmc" as per the help doc.

After that I went on to deploying my hello world grails app. Attached is a screen shot of my dos session:

And sure enough the world's best online donkeys supermarket can be found at:

I didn't have to install a database, I didn't have to write code to talk to a proprietary data source (hint, hint...GAE). It all just magically worked. Thumbs up!

I like the fact that it gives you three options for database - MongoDB and redis besides MySQL.
It also automatically detected that I wanted to deploy a Grails app.
You can also deploy Rails, Node, Sinatra, Spring Roo and JavaWeb.
Happy clouding!

Sunday, May 8, 2011

javax.mail.MessagingException: A12 NO Mailbox does not exist, or must be subscribed to

This one has been a long time coming...
One of the apps I have worked on uses Postfix + IMAP for email. One of the users was unable to get to her/his mailbox and in the apps logs for that user we were seeing :

Caused by: javax.mail.MessagingException: A12 NO Mailbox does not exist, or must be subscribed to.;
  nested exception is:
        com.sun.mail.iap.CommandFailedException: A12 NO Mailbox does not exist, or must be subscribed to.
        at com.sun.mail.imap.IMAPFolder.getMessageCount(
        at com.altair.cls.common.messaging.eis.mail.MailMessageDAO.getMailBoxLineItem(
        at com.altair.cls.common.messaging.eis.mail.MailMessageDAO.getMailBoxLineItems(
        ... 50 more
Caused by: com.sun.mail.iap.CommandFailedException: A12 NO Mailbox does not exist, or must be subscribed to.
        at com.sun.mail.iap.Protocol.handleResult(
        at com.sun.mail.imap.protocol.IMAPProtocol.status(
        at com.sun.mail.imap.IMAPFolder.getStatus(
        at com.sun.mail.imap.IMAPFolder.getMessageCount(

We give users the ability to create custom mail folders and subfolders. This particular one did create a custom  folder and also a subfolder inside it, so the mailbox on the files system had the likes of:

Then at some point she/he attempted to delete the custom folder "CustomFolder" in this case, but something bleeped in the system and the parent "CustomFolder" was deleted, but the child "CustomFolder.subfolderOfCustomFolder" remained in the filesystem:

So the next time the user attempted to access her/his mailbox, she/he was unable to and the above mentioned exception was showing in the logs. We could not figure out what caused the subfolder to not delete, but deleting the subfolder, in this case "CustomFolder.subfolderOfCustomFolder", from the file system enabled the user to access her/his mailbox again. Hope this helps someone at some point.

Saturday, May 7, 2011

Wish list for things to play with after Stir Treck

1. Node.js
2. MongoDB (already played with, but just a little)
3. Finish reading JavaScript The Good Parts (...this is embarrassing, I've had this book for 8 months and it is only 140 pages)
4. Jasmine
5. Sinatra
6. Hadoop