A few days ago, I ran into a strange bug when I was running JUnit4 test. Compiling of the JUnit test package went smoothly with Maven, but the Spring beans were not initialized properly in running time, and kept being null. The version of my Spring is 2.5.6 and JUnit library is 4.4, all up to date. At the beginning, I suspected that it was a Spring configuration issue and spent lots of time playing with all sorts of bean autowire options, but in the end, I found that if I just simply upgraded Maven from 2.0.8 to the latest 2.2.1 version, everything worked correctly. So the moral of the story is that I need to keep all packages up to date and don’t miss any single one.
Eclipse
After I installed the latest Eclipse 3.4 on my home computer and launched it, I saw a warning message complaining about the Eclipse was using the JRE instead of JDK. Even though I followed the notice in the warning message and added an extra line of “-vm …” in the eclipse.ini file, it still didn’t remove the warning message. Eventually, I created a desktop shortcut with the target command as
E:\Tools\eclipse\eclipse.exe -vm E:\Tools\jdk1.6.0_16\jre\bin\javaw
The error message disappeared.
PS: I just found that the better way to solve this issue is to modify the eclipse.ini file by adding the -vm line right above the -vmargs line. Eclipse always has something strange like this one.
Photoshop handwriting fonts
Avoid inserting duplicated records in Oracle
See http://www.techonthenet.com/sql/insert.php
INSERT INTO clients
(client_id, client_name, client_type)
SELECT 10345, ‘IBM’, ‘advertising’
FROM dual
WHERE not exists (select * from clients
where clients.client_id = 10345);
The use of the dual table allows you to enter your values in a select statement, even though the values are not currently stored in a table.
Open secured Microsoft Access file
“C:\Program Files\Microsoft Office\Office\MSACCESS.EXE” “E:\myAccessDB.mdb” /WRKGRP “E:\secured.mdw”