Total Pageviews


SchemaSpy Quick Start

SchemaSpy is a Java-based tool (requires Java 5 or higher) that analyzes the metadata of a schema in a database and generates a visual representation of it in a browser-displayable format. It lets you click through the hierarchy of database tables via child and parent table relationships as represented by both HTML links and entity-relationship diagrams. It's also designed to help resolve the obtuse errors that a database sometimes gives related to failures due to constraints.

Running SchemaSpy
You run SchemaSpy from the command line: java -jar schemaSpy.jar -t dbType -db dbName [-s schema] -u user [-p password] -o outputDir
For further information, please check:

Execution Process
3. execute a command:
java -jar "C:\schemaSpy_5.0.0.jar" -dp "C:\ojdbc6.jar" -t orathin -db dev02 -s ap_tax -host -port 1521 -u ap_tax -p taxtest -schemas AP_TAX -connprops "C:\schemaSpyGUI\properties\" -charset UTF-8 -o "C:\schemaSpyGUI\output" -norows -hq
4. check the output

java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path

As I run SchemaSpy and use this command line:
java -jar "C:\schemaSpy_5.0.0.jar" -dp "C:\ojdbc6.jar" -t ora -db dev02 -s ap_tax -host -port 1521 -u ap_tax -p taxtest -schemas AP_TAX -connprops "C:\schemaSpyGUI\properties\" -charset UTF-8 -o "C:\schemaSpyGUI\output" -norows -hq

I got this error message:
 Failed to load driver [oracle.jdbc.driver.OracleDriver] from classpath [file:/C:/ojdbc6.jar]  
 Make sure the reported library (.dll/.lib/.so) from the following line can be  
 found by your PATH (or LIB*PATH) environment variable  
 java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path  
 at java.lang.ClassLoader.loadLibrary(  
 at java.lang.Runtime.loadLibrary0(  
 at java.lang.System.loadLibrary(  
 at oracle.jdbc.driver.T2CConnection$  
 at Method)  
 at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(  
 at oracle.jdbc.driver.T2CConnection.logon(  
 at oracle.jdbc.driver.PhysicalConnection.(  
 at oracle.jdbc.driver.T2CConnection.(  
 at oracle.jdbc.driver.T2CDriverExtension.getConnection(  
 at oracle.jdbc.driver.OracleDriver.connect(  
 at net.sourceforge.schemaspy.SchemaAnalyzer.getConnection(  
 at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(  
 at net.sourceforge.schemaspy.Main.main( 

Root Cause
I assign wrong database type and connection property in command line.

Change database type from ora to orathin:
java -jar "C:\schemaSpy_5.0.0.jar" -dp "C:\ojdbc6.jar" -t orathin -db dev02 -s ap_tax -host -port 1521 -u ap_tax -p taxtest -schemas AP_TAX -connprops "C:\schemaSpyGUI\properties\" -charset UTF-8 -o "C:\schemaSpyGUI\output" -norows -hq


SQuirreL SQL Client Quick Start

SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc

1. download SQuirreL SQL Client from
2. download JDBC jar file, i.e. Oracle 11 JDBC jar file from

1. use command line to execute jar file

2. It will pop up GUI window to install. Just do step by step

Click Next

Click Next

Click Next

Choose plug-ins if you need, and click next

Click Next

Launch SQuirreL SQL Client
1. Click squirrel-sql.bat (in windows platform) to launch this tool

2. Configure Jar file

3. Configure Database Connection

4. Connect to database


11 tips for better code

1. keep methods short
2. never ever ever reuse a variable for different purpose
3. use self-descriptive variable and method names
4. define variables as close as possible to the place of their usage
5. no magic numbers
6. be friend with your language
7. don’t fight the convention
8. watch out for premature optimization
9. always refactor the code after you test it
10. don’t get sucked into overengineering
11. learn new things by prototyping


AutoPagerize for Chrome

AutoPagerize is a browser Extension for auto loading paginated web pages. AutoPagerize use in many web site, and provide efficiently web browsing.


12 programming mistakes to avoid

Programming mistake No. 1: Playing it fast and loose
Programming mistake No. 2: Overcommitting to details
Programming mistake No. 3: Not simplifying control
Programming mistake No. 4: Delegating too much to frameworks
Programming mistake No. 5: Trusting the client
Programming mistake No. 6: Not trusting the client enough
Programming mistake No. 7: Relying too heavily on magic boxes
Programming mistake No. 8: Reinventing the wheel
Programming mistake No. 9: Opening up too much to the user
Programming mistake No. 10: Overdetermining the user experience
Programming mistake No. 11: Closing the source
Programming mistake No. 12: Assuming openness is a cure-all


cloc - count line of code

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages. Given two versions of a code base, cloc can also compute changes in blank, comment, and source lines. It is written entirely in Perl with no dependencies outside the standard distribution of Perl v5.6 and higher (code from some external modules is embedded within cloc) and so is quite portable. cloc is known to run on many flavors of Linux, Mac OS X, AIX, Solaris, IRIX, z/OS, and Windows.

[command]cloc-1.53.exe --not-match-f=.*Test --by-file --skip-uniqueness --skip-win-hidden --csv --report-file=[output-file] [source folder]

[example]cloc-1.53.exe --not-match-f=.*Test --by-file --skip-uniqueness --skip-win-hidden --csv --report-file=nig_loc.csv "D:\work\FDC\0.svn\trunk\SDS\source code"

output file


How to align JSF h:outputText text to right?

Original Way

But it doesn't work
What we need to do is to add div tag to enclose outputText tag, and define text-align in div tag

It works now....


The value of attribute "itemLabel" associated with an element type "null" must not contain the '<' character.

Environment: JSF 2.0 on GlassFish V3

[Error Message]
The value of attribute "itemLabel" associated with an element type "null" must not contain the '<' character.

Source Code 

Root Cause
The problem results from the itemValue cannot accept < in xhtml page

Move selectItems value and label to managed bean
    //declare a List variable    
   public List compareList = new ArrayList();
    //declare a getter class
    public List getCompareList() {         
  compareList.add(new SelectItem(">", ">"));
  compareList.add(new SelectItem("<", "<="));
  return compareList;     

xhtml page should be updated to be like this: