<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1743052710931738299</id><updated>2011-09-23T10:47:37.415-07:00</updated><category term='Grails'/><category term='Windows CPU 100%'/><category term='jdk-6u13-linux-x64-rpm.bin'/><category term='Linux'/><title type='text'>Tong Sun's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-2117223807945743632</id><published>2011-09-23T10:46:00.000-07:00</published><updated>2011-09-23T10:46:38.584-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grails'/><title type='text'>Table not found in statement</title><content type='html'>When creating a table in Grails, I used "password" as a column name, then when connecting to Oracle and try to create table for the first time, I got the following error:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;java.sql.SQLException: Table not found in statement [...&lt;br /&gt; &lt;br /&gt; After searching online and randomly trying to fix it, I finally come to change the column name to "myPassword", and it worked. I could only wish the error message could be more helpful.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-2117223807945743632?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/2117223807945743632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=2117223807945743632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/2117223807945743632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/2117223807945743632'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2011/09/table-not-found-in-statement.html' title='Table not found in statement'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-3331910977887855239</id><published>2011-09-16T09:07:00.000-07:00</published><updated>2011-09-23T10:47:02.530-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grails'/><title type='text'>STS and Grails error</title><content type='html'>When I changed the .grails and .ivy2 folder from my home directory to another location, I got the following compiling error:&lt;br /&gt;The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files.&lt;br /&gt;&lt;br /&gt;To solve this problem, right click the project, grail tools -&amp;gt; refresh dependencies fixed it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-3331910977887855239?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/3331910977887855239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=3331910977887855239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/3331910977887855239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/3331910977887855239'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2011/09/sts-and-grails-error.html' title='STS and Grails error'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-6672974416376771723</id><published>2010-04-28T13:19:00.000-07:00</published><updated>2010-04-28T13:25:24.435-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows CPU 100%'/><title type='text'>Windows CPU 100% all the time</title><content type='html'>I'm using Windows XP and the CPU 100% problem was bothering me for a while. I tried to use "Windows Update" site to disable the automatic update, but the wuauclt.exe always comes back a few minutes later after I kill it. I tried to go to "Control Panel", turn off Automatic Updates, that didn't help either.&lt;br /&gt;&lt;br /&gt;Finally, I tried go to Start, then Run Services, on Automatic Updates, disable it. From then on, I'm wuauclt.exe free!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-6672974416376771723?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/6672974416376771723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=6672974416376771723' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/6672974416376771723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/6672974416376771723'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2010/04/windows-cpu-100-all-time.html' title='Windows CPU 100% all the time'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-2186180437799648374</id><published>2009-07-02T08:45:00.001-07:00</published><updated>2009-07-02T08:45:48.273-07:00</updated><title type='text'>MyEclipse upgrade - making a war file</title><content type='html'>&lt;p&gt;In the older version of MyEclipse, we used JBoss plugin for Eclipse for .war file generation. But after the upgrade to MyEclipse 7.1, the JBoss plugin simply doesn't work anymore.&lt;/p&gt;  &lt;p&gt;Of course, we could always write our own deployment descriptor, run ANT, and generate the .war file. But that also means install ANT on every developer's local machine, configure the path, go to command line every time, not something easy for everyday life.&lt;/p&gt;  &lt;p&gt;So, after some research, here's the alternative:&lt;/p&gt;  &lt;p&gt;Although MyEclipse does not require Tomcat plugin, we could just set the path and run different versions of Tomcat. But if we add the Tomcat plugin, we could generate .war file!&lt;/p&gt;  &lt;p&gt;Step 1: Right click the project name -&gt; properties&lt;/p&gt;  &lt;p&gt;Step 2: Choose Tomcat from the bottom, then click Export to WAR settings.&lt;/p&gt;  &lt;p&gt;Step 3: Browse to the correct directory and give the WAR file name.&lt;/p&gt;  &lt;p&gt;Step 4: Click Apply and close the properties page.&lt;/p&gt;  &lt;p&gt;Step 5: Right click the project name -&gt; Tomcat Project -&gt; Export to the WAR file sets in project properties.&lt;/p&gt;  &lt;p&gt;Now we have a .war file ready to be deployed.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-2186180437799648374?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/2186180437799648374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=2186180437799648374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/2186180437799648374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/2186180437799648374'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2009/07/myeclipse-upgrade-making-war-file.html' title='MyEclipse upgrade - making a war file'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-2095766357101649225</id><published>2009-07-02T08:21:00.000-07:00</published><updated>2009-07-02T08:42:12.835-07:00</updated><title type='text'>XSL-FO checkbox using unicode</title><content type='html'>When using xsl-fo to generate PDF, according to FO documentations, the best way is to use unicode fonts instead of using fo:external-graphics. After searching the web, I didn't find the best solution, but found a lot of useful information. The existing solution is, there is a way to draw a unchecked box using font "ZapfDingbats", but there is no checked box. For the unchecked box, here's code:&lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(0, 0, 102);"&gt;&lt;fo:inline family="ZapfDingbats" size="10pt"&gt;&lt;fo:inline family="ZapfDingbats" size="10pt"&gt;&lt;/fo:inline&gt;&lt;/fo:inline&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;fo:inline font-family="ZapfDingbats"  font-size="10pt"&gt;&amp;amp;#x274F;&amp;lt;/fo:inline&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;For the cheked box, here's my solution:&lt;br /&gt;&lt;fo:inline family="ZapfDingbats" size="6pt" border="1pt black solid"&gt;&lt;fo:inline family="ZapfDingbats" size="6pt" border="1pt black solid"&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 0, 153);"&gt;&amp;lt;fo:inline font-family="ZapfDingbats"  font-size="6pt" border="1pt black solid"&gt;&amp;amp;#x2715;&amp;lt;/fo:inline&gt;&lt;/span&gt;&lt;br /&gt;&lt;/fo:inline&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/fo:inline&gt;Try to use &lt;span&gt;"X" plus the border to create the checked box.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-2095766357101649225?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/2095766357101649225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=2095766357101649225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/2095766357101649225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/2095766357101649225'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2009/07/xsl-fo-checkbox-using-unicode.html' title='XSL-FO checkbox using unicode'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-4156510239665869649</id><published>2009-05-11T12:49:00.000-07:00</published><updated>2010-04-29T14:06:44.137-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jdk-6u13-linux-x64-rpm.bin'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>RedHat Linux JDK1.6 and Tomcat 1.6 installation</title><content type='html'>The current java on wwwp path is: /usr/lib/jvm/jre-1.6.0-sun.x86_64/bin/java&lt;br /&gt;We need the Java JDK instead of Jre.&lt;br /&gt;&lt;br /&gt;Downloaded current JDK 1.6 from Sun web site: jdk-6u13-linux-x64-rpm.bin&lt;br /&gt;&gt; cp -p /tmp/jdk-6u13-linux-x64-rpm.bin /var/www/.&lt;br /&gt;&lt;br /&gt;&gt; chmod a+x /var/www/jdk-6u13-linux-x64-rpm.bin&lt;br /&gt;&gt; ./jdk-6u13-linux-x64-rpm.bin&lt;br /&gt;&gt; /usr/sbin/alternatives --install /usr/bin/java java /usr/java/latest/bin/java 1&lt;br /&gt;&gt; /usr/sbin/alternatives --config java choose the java you wanted.&lt;br /&gt;&lt;br /&gt;Package name is "jdk-1.6.0_13-fcs". To view the package info, use command:&lt;br /&gt;&gt;rpm -qc jdk&lt;br /&gt;&lt;br /&gt;Download Tomcat 1.6 tar.gz&lt;br /&gt;&gt; tar -zxvf jakarta-tomcat-6.x.xx.tar.gz&lt;br /&gt;&lt;br /&gt;Create a symbolic link to a tomcat directory:&lt;br /&gt;&gt; ln -s apache-tomcat-6.0.26 tomcat&lt;br /&gt;&lt;br /&gt;After install Tomcat, use another user account instead of root to run the Tomcat:&lt;br /&gt;1. Add a group:&lt;br /&gt;&gt; /usr/sbin/groupadd other&lt;br /&gt;&lt;br /&gt;2. See if the group is added:&lt;br /&gt;&gt; grep other /etc/group&lt;br /&gt;If you see something like this, it is added, otherwise do it again:&lt;br /&gt;&gt; other:x:1000000:&lt;br /&gt;&lt;br /&gt;3. List users:&lt;br /&gt;&gt; cat /etc/passwd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-4156510239665869649?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/4156510239665869649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=4156510239665869649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/4156510239665869649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/4156510239665869649'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2009/05/redhat-linux-jdk16-and-tomcat-16.html' title='RedHat Linux JDK1.6 and Tomcat 1.6 installation'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1743052710931738299.post-3565248640522613890</id><published>2008-12-04T12:59:00.000-08:00</published><updated>2008-12-08T11:11:06.307-08:00</updated><title type='text'>LAMP on Mac</title><content type='html'>Apache config file:&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&gt; /etc/apache2/httpd.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To add php support to Apache, uncomment this line in httpd.conf:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;#loadModule php5_module    libexec/apache2/libphp5.so&lt;/span&gt;&lt;br /&gt;Remove the "#" from the line, then save.&lt;br /&gt;If you can not save because the file is read only, try to use sudo to open the file:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&gt; sudo vi httpd.conf&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Then restart Apache server on Mac:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&gt; sudo /usr/sbin/apachectl restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to become root on terminal, &lt;a name="root"&gt;When logged in as an user with Admin privilege, open the Terminal application and give the command&lt;/a&gt;:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&gt; sudo tcsh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1743052710931738299-3565248640522613890?l=tongsun1.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tongsun1.blogspot.com/feeds/3565248640522613890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1743052710931738299&amp;postID=3565248640522613890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/3565248640522613890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1743052710931738299/posts/default/3565248640522613890'/><link rel='alternate' type='text/html' href='http://tongsun1.blogspot.com/2008/12/lamp-on-mac.html' title='LAMP on Mac'/><author><name>Tong Sun</name><uri>http://www.blogger.com/profile/03561457156005036807</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
