My Writings. My Thoughts.

Grails Activiti Plugin And Tomcat

// July 20th, 2011 // 4 Comments » // Development, Grails

After finished develop our grails with activiti plugin, we found a new issue related with window server error when we deploy to our SIT server

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘processEngine’: FactoryBean threw exception on object creation; nested exception is java.lang.InternalError: Can’t connect to window server – not enough permissions.

Caused by: java.lang.InternalError: Can’t connect to window server – not enough permissions.

And seems there’s an activiti plugin that use the AWT component.

To fix this issue, we need to turn on the headless option

go to your $GRAILS_HOME/bin/startGrails

Find GRAILS_OPTS change to this config

GRAILS_OPTS =  -server -Xms1024m -Xmx1024M -XX:PermSize=128m -XX:MaxPermSize=128m -XX:UseGCOverheadLimit -Djava.awt.headless=true -Dfile.encoding=UTF-8

If you encounter PermGen issue related with your grails application, try above configuration too

 

TortoiseGit and GitHub

// May 9th, 2011 // 1 Comment » // Development

Today we had a problem with the tortoiseGit and GitHub..

As we knew, tortoise family, is one of the best SCM tools for windows, but today, I really headache because of the ssh keystore won’t work with the TortoiseGit and GitHub

But finally we can use the tortoise git.

- disable pageant!
- generate public key with puttygen
- copy key on textbox “Public key for pasting into OpehSSH authorization_keys file” to GitHub SSH Public Keys
- save the private key
- go to tortoisegit > settings > config, configure all user and email same as github, and also choose AutoCrlf and SafeCrlF
- on git clone, choose load putty key with private key that you generate before

GitHub

// May 9th, 2011 // 1 Comment » // Development

After try to configure our own git server, and several problem with our VPN cause by our ISP… I decide to move our git repository to github.com. All my team really happy with the github feature. GitHub provide what a developer team really need to do collaboration for development process. We hope after this, we can focus just on the development instead the tools that we need to use for support our development process.

I just need 10 minutes to configure the repository on github and migrate all current development repository to github. And the best thing that we never lose track of all our development tracking although we move to new repository. That’s the power of Git distribution versioning system.

And I want to spend sometime later to explore more about forking in git. When I read a bit, it’s really interesting to help us maintain the current version while there’s some critical changes need to be implement.

Global Assistance and Healthcare

// May 4th, 2011 // No Comments » // Development

Finally we can publish completely the website of Global Assistance and Healthcare, after a long long discussion. I love the color especially the right bar. Red, green, orange, and gray.

Global Assistance and Healthcare focus on 24 hour medical evacuation and medical clinic. During the development, few times I went to their office, I really love their first aid bags. I never see the first aid bag with damn good design.

just go to the website and get some information about them.

Feedly for iPad

// May 4th, 2011 // 1 Comment » // Apple

After few months waiting, finally Feedly release their iPad version. It’s not like a famous Flipboard but one of things that I like from feedly that I can use same source and categories of news feed for my safari or firefox on mac, iPad and iPhone. And today they also release the new Android version.
Another feature that I like, I can create temporary bookmark with “saved for later” and it also sync between devices.

20110504-072806.jpg

Git with Snow Leopard Server

// May 1st, 2011 // No Comments » // Development

This past few weeks, I tried to configure Git on Snow Leopard Server with help from several other blogs. Most of the blog that I search from google has same method and trick, but at the end I stuck on file permission issue when I configure git using ssh protocol with multi user.

For our based configuration, we separate git repository by project, therefore I will assign each user by group to help us maintain the file permission. Actually what we need if our git repository user is git, then for the group, we can create the group name by project name. But the problem is when new object/file created, the file permission always as 755.

After few weeks manually chmod each objects, then I tried to configure on /etc/bashrc with additional configuration umask 0117 which similar all new file or folder will be grant as 660 as what we need for the git.

If there any better solution specially for security reason, please share to me.

Grails Offline Repository

// April 3rd, 2011 // 11 Comments » // Development, Grails

This last two days, I trying to solve one of issue that cause pain in our grails based applications. The compile time became very slow, and I realize some of the file that required by the grails plugins always been download from http://svn.codehaus.org. In my current location, we don’t have a luxury for a high speed internet connection, but grails is really consume a lot of bandwidth for the dependency checking and downloading new plugins from repository.

And finally I try to fix this issue, and I found out there’s not a lot of article that could help how to fix it. And finally I got this link from google “Managing Plugins with Grails“. I will use Artifactory as our maven local repository

I follow the instruction from the link above.

1. Download Artifactory 2.3.2 from here.

2. Install Artifactory. Follow the instruction from “One minute Artifactory” screencast.

3. Go to $HOME_USER/.ivy/cache/org.grails.plugins/. Here you can find your previous installed plugins in your project.

4. Upload all zip file under org.grails.plugins.

After click upload, insert “org.grails.plugins” as your ArtifactId. If you failed in configure this, your grails will lookup the plugins to http://svn.codehaus.org

And your maven proxy had successfully configure. If you had new plugins component or version, don’t forget to submit it to your Artifactory repo.

5. After finish configure your maven proxy repository. Now you need to configure your BuildConfig.groovy in your grails project. Add this line for your maven repository

  grailsPlugins()
  grailsHome()
  mavenRepo "http://localhost:8081/artifactory/remote-repos"
  mavenRepo "http://localhost:8081/artifactory/libs-release"
  mavenRepo "http://localhost:8081/artifactory/libs-snapshot"
  mavenRepo "http://localhost:8081/artifactory/plugins-release"
  mavenRepo "http://localhost:8081/artifactory/plugins-snapshot"
  grailsCentral()

Grails RESTful and JSON not easy as talked

// March 1st, 2011 // 2 Comments » // Grails

Finally we had accomplished half part of our first project using Grails. When first time I use grails, the most interesting part was when I try the ability for restful and JSON automatically rendering.

But during the project, I tried to use the JSONP along the way for the integration with our RIA platform Adobe AIR, it’s really screw up.
JSONP in grails just works when the you set in your Config.groovy

 

 

  • grails.mime.file.extensions = true
  • grails.mime.use.accept.header = true

 

And configure to UrlMapping.groovy
for “url path” (controller: “controllername”, action: “actionname”)
And when you try to access from client, just “post” and “get” action form that can be used.
To make your controller works with JSONP, you can use several methods. If it just for several request, you can use change the way you render the JSON
if(params.callback) {
render ${params.callback}(${variable as JSON));
}
else {
render variable as JSON
}
This code snippet compatible with Grails 1.3.5

Why Blackberry penetration highest in Indonesia?

// September 9th, 2010 // No Comments » // Blackberry

Few years ago I start using blackberry, that time blackberry still an expensive gadget in Indonesia, and difficult to find the device, beside the service price is expensive too. But after 4 years blackberry became major smartphone in Indonesia big cities, and had be a common for people to share their pin compare to phone no.

Few of the reason previously people adopt blackberry were because of
- expensive internet connection (blackberry unlimited)
- high mobility because of traffic in Jakarta
- most of user start use blackberry beside corporate users, is from mailing list. Thats use email as major communication and blackberry is the best on it
- indonesian love to sms, and they can chat unlimited with manageable cost using blackberry
Blackberry biggest rivals nowadays came like Apple iPhone and android based mobike, why blackberry still survive? For some reason, iPhone and android use more bandwidth compare to Blackberry, iPhone is very expensive in Indonesia, but how about Android that have better and competitive price?
And last weekend I spend my time in Singapore, I saw most users use touch screen smartphone, most of them is iPhone either iPhone 3GS or iPhone 4. Then in Sydney this past 2 days, its same behavior, during communting, they still use their smartphone to browse, find information, playing games…. They don’t use email as where Blackberry most powerful selling point.
There’s a big different background why in most country iPhone is selling that fast, while is very different in Indonesia. In most country, they had most of information and resources had been publish in internet, and another things the educational background if these people was make paper and research. Indonesian, because lack of information and difficulty to find information, then most of them is ask for information to mailing list or someone that can give trusted information and chatting. Beside that the behavior to create good content of information and reading beavior for most Indonesian is very low. And this accelerate the mailing list penetration and this became good market for blackberry.

iOS4 and Blackberry

// July 9th, 2010 // 1 Comment » // Apple, Blackberry

Two days ago, I upgrade my iPod Touch 2nd generation to iOS4, the latest iPod Touch OS. During upgrade process, its really bad, start from a long time backup almost 2 hours and after the upgrade process, the backup images can’t be restore, its corrupted.

So I lost all my data even before I do the upgrade process, I had sync the data first, but for some applications in the iPod Touch can’t be sync to my macbookpro due the limitation of the applications.
Mail
But after all, its totally awesome, I love the Mail, it’s like when I’m working with my Mac. The multitasking feature is also very nice, but sometimes it could make the device a bit slow, but I like the animation during switching the application, it’s Apple product :) These 2 items make me felt that Apple totally improved, and now I can optimize the use of my ipod touch compare to my blackberry, which previously had unbeatable performance for the email. Now Apple know what really important, I can use my gmail folders to separate my emails, it’s really helpful for us that need to work mobile.
iOS4 push technology faster than Blackberry
Another experience that I had that my iPod Touch and Blackberry both using Wi-Fi connections at home, but I got all my push message on the iPod Touch first than on the Blackberry, which means… iOS4 improve a lot in the push technology.
I haven’t use the iBooks yet, but I will post my review later.