Showing results for 
Search instead for 
Did you mean: 

Creating Oracle DataSource

Former Member
0 Kudos

I have been trying to access an internal Oracle database from within a servlet in a Web Module Project created with NetWeaver Developer Studio. I have used the Visual Administrator to set up my Oracle JDBC driver and data source.

I believe that there is a problem with my datasource itself or the driver that I'm using. I am not getting any specific error in the servlet, but none of the statements after the ds.getConnection(); statement get executed when I'm pointing to the OracleDB alias:

InitialContext ctx = new InitialContext();

DataSource ds = (DataSource) ctx.lookup("jdbc/OracleDB");

Connection con = ds.getConnection();

If I point the datasource to a SQL Server alias (SQLServerDB) that I've tested to be working, then the statements following the ds.getConnection(); statement get executed. This leads me to believe that it is definitely a problem with the datasource.

For the driver, I created two separate drivers, one with the file, the other with the ojdbc14.jar file from Oracle. I have switched between the two drivers, but neither produce any results.

For the database, I have set the following:

JDBC Version: 2.0 (with XA support)

Object Factory: oracle.jdbc.pool.OracleDataSourceFactory

DataSource Type: XADataSource

XADS Classname: oracle.jdbc.xa.client.OracleXADataSource

...and also tried...

DataSource Type: ConnectionPoolDataSource

CPDS Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource

Additional Properties

User: username

Password: password

URL: jdbc:oracle:thin@IPAddress:Port:OracleSID

SQL Engine: Vendor SQL

Not sure if I have the correct connection parameters or if I'm using the correct drivers. Any help would be great.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kevin,

Refer the following document which describes "Use SAP J2EE Database Pooling Service" sap j2ee database pooling service

This will help you in adding a new driver, creating a new datasource and accessing the same.

Hope this is helpful to you.



Former Member
0 Kudos


Thanks for the reply, but I referred to these documents, among others, to get the driver, datasource, and connectivity set up initially. I probably should have mentioned that to begin with.

I really need to talk to someone who has correctly set this up before to tell me where I'm going wrong with the configuration or if anyone has seen this particular behavior in this situation before.

Thanks again for your input.