Posted by: kittivong | 20/01/2010

Data Query String in URL with percent symbol (%)

In my project, I develops RESTful Web Services to act as interfaces for each of my data sources application in my data integration project. To make it flexible enough to handle uncertain requirement. I decided to allow web service GET method to accept data query string (actually JPA Query Language). After testing I found that it return wrong result when where condition got percent symbol(%) in it.

For Example Resource1.x like '%2%'

After look at it for a while .. I found that in RFC 1738: Uniform Resource Locators (URL) specification when we pass url percent symbol is reserved symbol use in order to send special character then .. to be able to pass percent symbol correctly viw GET method. I need to follow URL Spec. by using %25 instead of percent symbol(%) then the correct GET url should be like this Resource1.x like '%252%25'

Now it works…

I think this should be one point of concern for other special character also when manually create url in GET method.

Posted by: kittivong | 05/01/2010

Comic on PRS-600

I’m manga fan and one of main reason I bought PRS-600 was for me to easily read my comic book on trip.

Since PRS-600 not directly support zip/rar files, I needs to find someway to do it myself. After googled I found this great tool


Since, it’s a command line software then I create a .bat file to help me easier run it

comiclrf *.cb*

When I first trying it out I got error … and I comes to learn that this tool has following constrain:

  1. It support only files with cbz,cbr extension
  2. It support only files name without special charactor ([,],(,etc.)
  3. It support only one level folder


Posted by: kittivong | 04/01/2010

eUML2 Free Edition with Galileo

eUML2 is a good UML tools that support round-trip code generation. It offer free edition that has enough feature to get thing done

After downloaded eUML2 for Galeleo free Edition from its website ( and tried install it offline I got following error

Missing requirement: Modeling toolset ( requires 'bundle 0.0.0' but it could not be found

and others got similar errors. ( but it seems that its support for free community is very hard to get and not very welcome ( m/viewtopic.php?t=894).

After I take a look at log I found that it report missing gmf …  I tried download GMF manually from eclipse site but got some kinds of dependency maze (it really remind me of old days linux)  .. after several tried I still got more and more dependency errors then I came across
Eclipse Modeling Tools (includes Incubating components) (371 MB)

I tried its UML Tools but it can’t generate code yet but I thought it may help me with dependency problems. I download and install eUML on this instead and now it works!. This may just an easy way out but it fine for me.

Posted by: kittivong | 04/01/2010

Eclipse 3.5.1 – eclipse ini

Start up Eclipse can be trivial matter but setting Eclipse ini is tricky. I found that even though I got 4 GB of memory I can’t set xmx over 512 m without getting “JVM terminated. Exit code=-1” and sometimes (even worst) it come down to 128m.

My Environment are followings

  • Windows XP SP3
  • 4 gb memory
  • JDK 1.6 u16 b1

After doing some research some says that it about java using extra memory and make available memory lower than it used to be.

After long search, I found this website that have suggestion on eclipse.ini config.

It sound promising and after I tried I still got same problem with Xmx maximum limit. I decided to trail and error them by cutting them out one by one and found that the issue is from


The website said it was for some environment that not accept passing MaxPermSize directly to JVM and needs to pass via Eclipse launcher instead. After I remove this line everything works. Maybe I will spend sometime doing more research on it but it work now for me.

my final config

c:/program files/Java/jdk6/jre/bin/server/jvm.dll

Posted by: kittivong | 30/12/2009

Tomcat 6 and SSL on Windows

  1. Create a certificate keystore by executing the following command:
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

    NOTE: YOU MUST specify a password value of ” changeit “.

  2. Copy “.keystore” file from “C:\Users\Administrator”(or any other user used for running keygen) to “C:\” [NOTE: you can specify new location at server.xml]
     <!-- Define a SSL HTTP/1.1 Connector on port 8443
             This connector uses the JSSE configuration, when using APR, the 
             connector should be using the OpenSSL style configuration
             described in the APR documentation -->
        <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" 
                   maxThreads="150" scheme="https" secure="true" 
               keystoreFile="c:\.keystore" keystorePass="changeit" 
                   clientAuth="false" sslProtocol="TLS" />
  3. Enable SSL
    1. Uncomment the “SSL HTTP/1.1 Connector” entry in $CATALINA_BASE/conf/server.xml and tweak as necessary.
  4. restart Tomcat Service
  5. Test by typing https://localhost:8443/ or https://localhost (if you configure port to 443)