I keep on getting the error:
SEVERE: Could not open a connection to the database webmodel

I am able to connect from java using the same settings that I am trying in
my torque.properties file. Please advise what is wrong.

Here is my torque.properties file:

torque.database.default=mydb
torque.database.mydb.adapter=oracle

torque.database.mydb.driver=oracle.jdbc.driver.OracleDriver
torque.database.mydb.url=jdbc:oracle:thin:@127.0.0.1:1521:xe
torque.database.mydb.username=webmodel
torque.database.mydb.password=webmodel

#Using commons-dbcp
torque.dsfactory.mydb.factory =
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.mydb.connection.driver = oracle.jdbc.driver.OracleDriver
torque.dsfactory.mydb.connection.url = jdbc:oracle:thin:@127.0.0.1:1521:xe
torque.dsfactory.mydb.connection.user = webmodel
torque.dsfactory.mydb.connection.password = webmodel



I am running this as a stand-alone application. (Not in any app server.)

Here is my Java code that connects successfully to the database:

            Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
            con = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1
:1521:XE",
                "webmodel", "webmodel");

if(!con.isClosed())
                System.out.println("Successfully connected to Oracle");


Please advise as I am stuck at this point.
Best Regards.
-- 
Anas Mughal

Reply via email to