latest news

February 10, 2008

Our website is redesigned.

read more ...

November 1st 2006

Our website is launched.

read more ...

Java Tips

Problems with Quartz scheduler package

ErrorQuartz: java.lang.NoSuchMethodError: org.apache.commons.collections.SetUtils.orderedSet
First check the org.apache.commons.collections and see if the version is out of date. if yes, then download the latest version of common package from apache and replace the old one with the latest version. If not then it is more subltle. Check to see if there is a package called checkstyleall.jar in your library if yes, then remove that package and replace with the latest version of the apache. The checkallstyles.jar (old version) contains the common package with old class SetUtil which causes problem for other open source such as Quartz etc. Finally, if the above two steps does not solve your problem. Here is the step that you can do to trace where is the older version of the common package in your library

  1. Create an empty java class with main method - assuming you are using an IDE tool which has smart complete typing and check for dependency
  2. Add SetUtils. to the manin class and hit (Ctlr + space bar) to import the common package
Now you should know where the SetUtils comes from. Follow the instruction of step 1 to replace with it the latest of the package.




How to scrap data from Ajax web site (web site that has Ajax enabled)

Common problem: Httpclient package does not execute Javascript. Thus it does not download data from URLs that are called within javascript

Use HtmlUnit package instead of HttpClient. However, some websites have either invalid Javascript syntax and missing links. HtmlUnit normally will throw exceptions if images are missing etc. Make sure to disable to javascript error in HtmlUnit. If the problem still persist download the source code and comment out the images section. It should do the trick