Friday, September 23, 2011
Table not found in statement
java.sql.SQLException: Table not found in statement [...
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.
Friday, September 16, 2011
STS and Grails error
The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files.
To solve this problem, right click the project, grail tools -> refresh dependencies fixed it.
Wednesday, April 28, 2010
Windows CPU 100% all the time
Finally, I tried go to Start, then Run Services, on Automatic Updates, disable it. From then on, I'm wuauclt.exe free!
Thursday, July 2, 2009
MyEclipse upgrade - making a war file
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.
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.
So, after some research, here's the alternative:
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!
Step 1: Right click the project name -> properties
Step 2: Choose Tomcat from the bottom, then click Export to WAR settings.
Step 3: Browse to the correct directory and give the WAR file name.
Step 4: Click Apply and close the properties page.
Step 5: Right click the project name -> Tomcat Project -> Export to the WAR file sets in project properties.
Now we have a .war file ready to be deployed.
XSL-FO checkbox using unicode
<fo:inline font-family="ZapfDingbats" font-size="10pt">❏</fo:inline>
For the cheked box, here's my solution:
<fo:inline font-family="ZapfDingbats" font-size="6pt" border="1pt black solid">✕</fo:inline>
Monday, May 11, 2009
RedHat Linux JDK1.6 and Tomcat 1.6 installation
We need the Java JDK instead of Jre.
Downloaded current JDK 1.6 from Sun web site: jdk-6u13-linux-x64-rpm.bin
> cp -p /tmp/jdk-6u13-linux-x64-rpm.bin /var/www/.
> chmod a+x /var/www/jdk-6u13-linux-x64-rpm.bin
> ./jdk-6u13-linux-x64-rpm.bin
> /usr/sbin/alternatives --install /usr/bin/java java /usr/java/latest/bin/java 1
> /usr/sbin/alternatives --config java choose the java you wanted.
Package name is "jdk-1.6.0_13-fcs". To view the package info, use command:
>rpm -qc jdk
Download Tomcat 1.6 tar.gz
> tar -zxvf jakarta-tomcat-6.x.xx.tar.gz
Create a symbolic link to a tomcat directory:
> ln -s apache-tomcat-6.0.26 tomcat
After install Tomcat, use another user account instead of root to run the Tomcat:
1. Add a group:
> /usr/sbin/groupadd other
2. See if the group is added:
> grep other /etc/group
If you see something like this, it is added, otherwise do it again:
> other:x:1000000:
3. List users:
> cat /etc/passwd
Thursday, December 4, 2008
LAMP on Mac
> /etc/apache2/httpd.conf
To add php support to Apache, uncomment this line in httpd.conf:
#loadModule php5_module libexec/apache2/libphp5.so
Remove the "#" from the line, then save.
If you can not save because the file is read only, try to use sudo to open the file:
> sudo vi httpd.conf
Then restart Apache server on Mac:
> sudo /usr/sbin/apachectl restart
If you want to become root on terminal, When logged in as an user with Admin privilege, open the Terminal application and give the command:
> sudo tcsh