Thursday, May 25, 2006
Migrated to Windows
Wednesday, March 29, 2006
Debugging JNLP WebStart application
Basically, IDEA can remote debug virtually any app as long as it is started with some special arguments. The bad news is that not all of those arguments are allowed to be specified in the JNLP file. Finally I found this forum thread which gave some enlightment.
http://forum.java.sun.com/thread.jspa?threadID=569693&messageID=4039981
I added this entry to my ~/.bash_profile.
export JAVAWS_VM_ARGS="-Xdebug -Xnoagent -Djava.compiler=NONE \
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
Saturday, December 17, 2005
Ghostscript and Java
D [17/Dec/2005:14:25:48 +0700] [Job 54] Error: /configurationerror in --setpagedevice-- D [17/Dec/2005:14:25:48 +0700] [Job 54] Additional information: [/ManualFeed false]After hours searching, I finally found the solution.
It is in /usr/share/ghostscript/8.15/lib/gs_setpd.ps
Here is the diff
--- gs_setpd.ps.bak 2005-12-17 14:30:23.000000000 +0700 +++ gs_setpd.ps 2005-12-17 14:31:49.000000000 +0700 @@ -171,10 +171,10 @@ % the default policy to "7" (impose) to avoid numerous problems with % printing within CUPS... % - % /PolicyNotFound 1 - % /PageSize 0 - /PolicyNotFound 7 - /PageSize 7 + /PolicyNotFound 1 + /PageSize 0 + % /PolicyNotFound 7 + % /PageSize 7 /PolicyReport { dup /.LockSafetyParams known { % Only possible error is invalidaccess
Monday, November 7, 2005
Mandriva 2006
I upgraded my and my clients PCs to Mandriva 2006 PowerPack. It is
fantastic. Shorter boot time, look and feel, and the list grows. I
copied the CDs' contents to my harddisk then invoked urpmi.addmedia
--distrib, and then urpmi --auto-select. It worked like charm.
But...
There is one disappointment. There is no postgresql-server package. I
was forced to download it manually.
Friday, November 4, 2005
FasterFox Break
Recently I discovered that FasterFox extension located in mozilla break
WebWork's token mechanism.
It appears that FasterFox caused the lines
public static String setToken(String tokenName, HttpServletRequest
request) {
HttpSession session = request.getSession(true);
String token = GUID.generateGUID();
session.setAttribute(tokenName, token);
return token;
}
in TokenHelper to be executed twice. This make the token saved in the
session differs to those rendered in the page. As a result,
invalid.token is always returned thus disabling user from using forms.
Thursday, November 3, 2005
Found Resin Xml Bug Revisited
Here it is:
<system-property javax.xml.parsers.DocumentBuilderFactory= "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/> <system-property javax.xml.parsers.SAXParserFactory= "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
Solitaire is Deadlock-Prone
Solitaire is one of my favorite games. Recently, I discovered that it is
deadlock-prone. Why? I think you who have ever played it have noticed
it. Sometimes I cannot make any progress and is forced to give up the
game session because one or more important cards are buried.
I think this is interesting because people tend to use Philosopher to
explain deadlock.
PS: I use PySol in Linux for playing. PySol contains several games. The
game I play is Klondike.
Wednesday, September 21, 2005
Samsung CD Writer and K3B
I experienced weird things when writing CD using K3B. The verification
always fails when I use cdrecord in DAO mode. I tried RAW mode and
suprprisingly it succeeded.
Tuesday, September 6, 2005
Found Resin Xml Bug
Couldn't flush user prefs: java.util.prefs.BackingStoreException: java.lang.NullPointerException every 30 seconds.
This is happened on Resin 3.0.13. I fixed this by adding the following lines into my resin-web.xml.
<system-property
javax.xml.parsers.DocumentBuilderFactory=
"org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"/>
<system-property
javax.xml.parsers.SAXParserFactory=
"org.apache.crimson.jaxp.SAXParserFactoryImpl"/>
The NPE is thrown on the line 321 of java.util.prefs.XmlSupport
319 | Element xmlMap = (Element) doc.getChildNodes().item(1);
returns null ^^^
320 | // check version
321 | String mapVersion = xmlMap.getAttribute("MAP_XML_VERSION");
Resin xml implementation would behave correctly if item(1) was modified to item(0). After several considerations I decide to stop using resin xml implementation in favor of default JDK 1.4 xml instead of creating my own implementation of Preferences.
