Sunday, September 30, 2012

WAS Liberty Profile has a weird requirement

There is a weird requirement on using Websphere Application Server Liberty Profile where the workspace path must not have any space in the folder name, especially in Windows. This is apply to any WAS version.

This happen during the runtime mode where the server is started, and wait till the web is being loaded. Then there is a bunch of error complaining that the JARs in WEB-INF/lib are not found even though the path is correct.

I use to put my workspace right under my user account folder, say C:/Documents and Settings/huahsin68/workspace. This is due to the practice influence from Linux where my development path is like this /home/huahsin68/workspace.

Notice that I don't have any space in between the workspace path under Linux, no wonder I don't see any error in Linux.

Sunday, September 23, 2012

Finishing the LibreOffice build

This is the output when LibreOffice finished the built. It took less than 2 hours to make the build on an i5 + 8GB ram PC. Remember last time I was building it on a C2D + 2GB ram PC, it took more than 8 hours to complete the build.

Such a big difference.

Full stack trace of the build


gb_Deliver_deliver file was missing?

My intention is to make a partial build on accessibility module of LibreOffice, but end up an error being thrown by the compiler complaining the file gb_Deliver_deliver was missing.

I was consult that I am require to build all the pieces in LibreOffice before continue on the individual module. In other words, I need to do this:

./autogen.sh
make

Full stack trace of the build

LibreOffice compilation stop building at ridljar

The build was stop at ridljar module. And the compiler complaining that SSOExceptions.idl was missing. Why this happen? According to the fellow developers, this could happen when the source code is downloaded without making a clean build. In other words, to solve this problem, a clean build is a must whenever the source code were first check out.

Notice that the console output showing javac compile error, invalid jdk 1.7? That one must be solve by issuing following command before build.

Full stack trace of the build

Note on Tomahawk commandSortHeader usage.

I had a hard time on creating a sortable table using JSF Tomahawk in last week. After a long searching, try and error, it is not that hard actually.

From the existing t:dataTable code, wrap the column header with t:commandSortHeader and add two more properties, sortColumn and sortAscending, into t:dataTable, just like the code shown below.

Add two member variable into the backing bean and implement Comparable interface just like this:

Here are some notes on the usage:
  1. sortColumn property in t:dataTable indicate which column name that triggered the sort. The column name is reference from the columnName property of t:commandSortHeader.
  2. sortAscending property in t:dataTable indicate the particular column sort in ascending/descending order.
  3. The JAVA class, theBean, must implement Comparable interface in order to provide the sorting facility.
  4. In the sample code above, I only have one column to sort, thus the compare function only implement one sort. If there is more than one sort, simply expand the if-else statement.

Monday, September 17, 2012

Type Attribute "xmlns:h" must be declared for element type "html"


I get this error when I have the XHTML code ready just as simple as the code shown below and without the web.xml ready.


Sunday, September 2, 2012

Why I like Runnable more than Thread?

When creating a thread in JAVA, there are 2 reasons why I choose to implementing Runnable interface is more preferable than extending Thread class.

Reason 1
Extending Thread class will limit the subclass from extending other class.
Reason 2
I am just interest in Runnable class rather than extension of Thread class.