Hello, I have developed a custom component that extends the importContent component in webtop. This component calls a class that has to connect to a DB for data validation.
First of all, I have a configuration file (la_config.properties) with the following information:
dbserver = spr02.lagunaro.local
dbport = 1145
database = spr02
dbusername=DMOWNER
dbpassword=ADMIN
urljdbc=jdbc:oracle:thin:@160.1.100.108:1145:SPR02
This information is correct. Then, from my java code I load this information using this structure:
private static Configurator config = new Configurator();
config.load(path + "//config//la_config.properties");
**where path is the documentum environment variable path
jdbcurl = config.getProperty("urljdbc");
dbusername = config.getProperty("dbusername");
dbpassword = config.getProperty("dbpassword");
And after that, using this variables I try to connect with this code:
dbcon = new DBConnection(jdbcurl, dbusername, dbpassword);
dbcon.connect();
And this is the connect method code:
public void connect() throws Exception {
OracleDriver ora=new OracleDriver();
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
con = DriverManager.getConnection(jdbcurl, dbusername, dbpassword);
The problem is that I get an error in this last line execution:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at javaapplication2.CallableStatementEx1.main(CallableStatementEx1.java:19)
I am sure that the DB information is correct, and also I can connect to the database using sql plus from the CS machine. i also know that this java code is correct because it works with another database, concretely the one used to create the repository. The database is oracle 11.2.0
What can be happening?
Thanks in advance!