Sunday, November 6, 2011

I am keeping get this error while using google api:

"hostname in certificate didn't match: != <*.googleapis.com> OR OR <*.googleapis.com>"

so I googled and here is the answer:
http://forum.springsource.org/showthread.php?114685-Samples-OpenId-Google-Login-Hostname-in-Certificate-didn-t-match

basically do not use httpclient:4.1.2 for this kind of operations

Wednesday, October 19, 2011

Both java 6 and 7 got updated

Java 6 is on update 29 and java 7 is on update 1. enjoy!

Update:
since it was said that the crash bug fixed from dzone http://java.dzone.com/news/java-7-and-lucene-bug-saga so I moved my major dev point to the java7u1

But imediately i got this from my js script engine related code, sure there was no issues on java6 before:
sun.org.mozilla.javascript.internal.InterpretedFunction cannot be cast to java.lang.Double

So I have to comment out all my script engine related test out to be quick and dirty.

UPDATE 2: I got stuck again, this time on
aspectj-maven-plugin
looks like it cannot handle 1.7 compiliance level.

So I have to set this to 1.6 for aspectJ

Update 3 (10/25/11) I have to move back to 1.6 due to some
java.lang.VerifyError: Expecting a stackmap frame at branch target 25.

Spring 3.x and Cassandra using Hector

To config Spring with Cassandra, you can use the HectorTemplate class in the Hector core. the configuration is something like this:

[sourcecode language="xml"]
<bean id="hectorTemplate"
class="me.prettyprint.cassandra.service.spring.HectorTemplateImpl"
init-method="init">
<property name="cluster">
<bean class="me.prettyprint.cassandra.service.ThriftCluster">
<constructor-arg value="${cassandra.clustername}" />
<constructor-arg>
<bean
class="me.prettyprint.cassandra.service.CassandraHostConfigurator">
<constructor-arg value="${cassandra.dburl}" />
</bean>
</constructor-arg>
</bean>
</property>
<property name="keyspaceName" value="${cassandra.keyspace}" />
<property name="replicationStrategyClass"
value="org.apache.cassandra.locator.SimpleStrategy" />
<property name="replicationFactor" value="${cassandra.replicationfactor}" />
</bean>
[/sourcecode]


please note that I am using Cassandra 1.0 and hect 1.0 now. if you are using some other versions, you might need to make sure all the referred classes are in the package.

After you have the template then you can use it as other spring template.

Sunday, April 3, 2011

Useful ubuntu mail setup with gmail

http://prantran.blogspot.com/2007/01/getting-postfix-to-work-on-ubuntu-with.html

Tuesday, January 12, 2010

Sunday, May 11, 2008

Upgrade to spring 2.5.4

This weekend I am upgrading my pet project to use spring 2.5.4. During the same time I am also get rid of the spring.jar and try to use the separated packages. it takes sometime to figure out the new package layout. Lucky I finally googled and looks like Eric did some good job outlined the packages and jar files here: http://erics-notes.blogspot.com/2007_12_01_archive.html. Thanks.