cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc connection problem after upgrading from SP12 - SP16 NW2004

Former Member
0 Kudos

Hi ,

We were using Class.forName("com.sap.portals.jdbc.oracle.OracleDriver") for Oracle loading drivers in SP12, it was working fine. but now as soon as we upgraded to SP16, it stopped working. Do you know if anything has changed

Class.forName("com.sap.portals.jdbc.oracle.OracleDriver")

Connection conn = DriverManager.getConnection(jdbcUrl, system, getJdbcpw());

Appreciate your time

Som

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Look at the foll0wing SAP notes ,its has changed from sp 14

1)<b>864823</b>

2)773401

Hope this helps , please mark points for helpful answers

regards

rajesh kr

Former Member
0 Kudos

Hi Rajesh,

Thank you very much for your response.

I have already looked into the notes you specified.

1) note 773401 is ruled out as we are not using JDBC system

2) second option in note 864823 says that we need to add reference. I do not know how to do that

Use your own JDBC driver via J2EE dbpool service (using JDBC API java.sql.DriverManager.getConnection() or JNDI lookup for a javax.sql.DataSource instance). For that, you'll need to create a J2EE library from your JDBC driver (and a DataSource instance based on it). Refer to NetWeaver documentation of "Deploying and Removing JDBC Drivers" in Administration Manual and "Getting a Connection to the Database" in Development Manual. When using DriverManager.getConnection() option, since you'll need to load your JDBC driver class (Class.forName("mydriver")), add your portal application a reference to the new J2EE library via the portalapp.xml file: Add to "ServicesReference" section the value: SAPJ2EE::library:myJDBCLibName

We are trying to load JDBC drivers thru API and connect to the database.

As said,

Class.forName("com.sap.portals.jdbc.oracle.OracleDriver");

Connection conn = DriverManager.getConnection(jdbcUrl, system, getJdbcpw());

Can you pls elaborate on how to do this?

Basically classloader is not picking up the Oracledrivers, Do we need to add something to the private sharing reference

Pls let me know

Thanks

Som

Former Member
0 Kudos

Hi

What it meant is if you have oracle client installed on the system where WAS is installed , you can create your own JDBC driver and create your Datasource also , which can then be referenced in your portal application via

portalapp.xml file (Add to "ServicesReference" section the value: SAPJ2EE::library:myJDBCLibName)

For creating JDBC driver

, u need to login in visual admin and you need to install oracle client on the the system where WAS is installed .

for oracle u need classes12.zip

http://help.sap.com/saphelp_nw04/helpdata/en/80/4f34c587f05048adee640f4c346417/frameset.htm

Check for the Visual Administrator option

For creating DataSource

http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm

-


Also please check the note number 773401 where it has steps as to how you can configure your own driver . there is a sample sda in the attachments section of the note

-


You can also configure your own JDBC driver. Two kinds of configurations need to be done in order to use it with the JDBC Connector:

1. The JDBC driver should be deployed and registered into the WebAS

2. The JDBC Connector needs to reference this driver, as well as the Portal component which connects to the backend system on runtime

WebAS 6.40

For NW04-SP09 to NW04-SP11 deploy the attached matching SDA

Deployment: Create a library SDA via SAP NetWeaver Developer Studio and deploy it using SDM (look for "Working with J2EE Libraries" SAP NetWeaver Developer Studio help). You may use the attached SDA (sampleLibrarySDA.zip) after renaming your JDBC driver jar file to 'myjdbcdriver.jar' and replacing it with the empty jar file inside the SDA

Reference: Add a reference to the new library to the JDBC connector (in case of using the attached sample SDA you can use the following command without any change):

change_ref -m com.sapportals.connectors.database library:myJDBCLib

WebAS restart is not needed

In addition to the connection properties, one must set the properties under "Distributed Query Engine" Category to be able to run queries:

Admin Password (DQE): Administrator password to back-end system

Admin User ID (DQE): Administrator ID to back-end system

hope this helps , <b>please mark points for helpful answers</b>

regards

rajesh kr

Message was edited by: Rajesh K. R.