cancel
Showing results for 
Search instead for 
Did you mean: 

Problem passing data to Oracle StoredProcedures

Former Member
0 Kudos

Hello @all,

I run SAP NetWeaver Java EE 5 Edition. My IDE is Eclipse 3.2 and not the Developer Studio because of my Company, I do an Internship and have no influence on that thing.

I have some Problems with an Application ported from Oracle OC4J. The Application runs fine with only few changes to JNDI Names. But I can't find a solution for the following problem:

I created a customDataSource in the NWA with the correct oracle jdbc-driver(ojdbc14.jar) and selected VendorSQL as SQLEngine.

I create a connection to the AS:

con = getDataSource().getConnection();

Then configure my CallParams for the stored Procedure. At the following line

ArrayDescriptor arrayDescriptor = ArrayDescriptor.createDescriptor(

"NUM_TABLE",

con);

I get this error:

java.lang.ClassCastException: com.sap.engine.services.dbpool.cci.ConnectionHandle

at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:149)

at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:115)

at de.xavo.bat.radis.dao.callparams.GetCigaretteSpecCallParams.getStatement(GetCigaretteSpecCallParams.java:209)

I started lots of google searches an found results with similar Problems. It must have something to to with the connection. Remote Debugging of the Enterprise Beans shows me, that Netweaver returns a com.sap.engine.services.dbpool.cci.ConnectionHandle. In this Handle is a VendorConnectionHandle in which the connection I need, an oracle.jdbc.driver.T4CConnection is located. The method createDescriptor needs this T4CConnection.

I tried to use the standard DriverManager and called the Database directly without the SAP NetWeaver dbpool andit works fine.

Has anyone an idea how I get the underlying T4CConnection out of the ConnectionHandle and give it to the ArrayDesriptor?

Thanks in advance

Matthias Reizammer

Message was edited by: Matthias Reizammer

Message was edited by: Matthias Reizammer

Message was edited by: Matthias Reizammer

Accepted Solutions (1)

Accepted Solutions (1)

nikolai_tankov
Explorer
0 Kudos

Hi Matthias,

The connection that is returned from SAP NetWeaver Java EE 5 Edition implements java.sql.Connection and some SAP specific interfaces. This connection does not implement specific interfaces from Oracle driver. It is not possible to get Oracle's T4CConnection.

These features are Oracle specific features. Try to use standard JDBC or Java EE features.

We will try to provide support for some of the specific features in our next releases.

Best regards,

Nikolai.

Former Member
0 Kudos

Hello Nikolai,

thank you very much for your answer.

Now I have lots of work to do

Best regards

Matthias

Former Member
0 Kudos

You can actually do it but you need to get the underlying connection, you can do this by calling ConnectionHandle.getPhysicalConnection().

Answers (0)