How set the properties of the Oracle DataSource? Thank you very much!
11171Mar 22 2004 — edited Mar 24 2004Hi, everyone:
I wrote a JDBC code as follows,
import java.sql.*;
import oracle.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.*;
......
OracleDataSource ods = new OracleDataSource();
ods.setServerName(<myhost>);
ods.setDatabaseName(<DB SID>);
ods.setDriverType("oci");
ods.setNetworkProtocol("tcp");
ods.setPortNumber(1521);
ods.setUser("scott");
ods.setPassword("tiger");
Connection conn = ods.getConnection();
......
if I set the value of the setDriverType is "thin" then the code is no errors at run time, but now , run to the line
Connection conn = ...
it will display the exception message
Exception in thread "main" java.lang.NoSuchFieldError: envCharSetID
at oracle.jdbc.oci8.OCIEnv.get_env_handle(Native Method)
......
Sorry, I do not understand the error message and how correct the code.
Please teach me, Thank you very much!!!