// register the Oracle JDBC drivers
OracleDataSource ds = new OracleDataSource();
ds.setURL("jdbc:oracle:thin:hr/oracle@127
.0.0.1:1521:XE");
// create a Connection object and connect to the database
// as store_user using the Oracle JDBC Thin driver
Connection myConnection = ds.getConnection();
Properties p = ds.getConnectionProperties();
System.out.println(p.getProperty("disableDefineColumnType"));
------------------------------------------------------------------------------------
This code will throw "null exception". Because
Properties p = ds.getConnectionProperties();
line return exactly null :)
Solution: We must set it first.
ref:
http://forums.oracle.com/forums/thread.jspa?forumID=99&threadID=403342