cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter Conect to Oracle Database

olaf_lehmann
Explorer
0 Kudos

Hi

If we connect to a Oracle Data via JDBC adapter for Oracle we get following error.

patchlevel XI (XI 3.0 SP 12)

senario

From a SAPR3 ECC 5.0 get data from a Oracledatabase 9.0.2.6 via JDCB Adapter XI 3.0

The Classe12.zip is OK

Check ur JDBC driver string what you placed in the channel configuration. Also, Refer to this url https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to install and configure external drivers for jdbc and jms adapters.doc

setting

1. adapter

2005-07-08 10:23:05 : JDCB

      • Raw configuration data ***

Transport protocol: JDBC, version

Message protocol: XML_SQL, version 3.0.0527

additionalParameters|false

jdbcDriver|oracle.jdbc.driver.OracleDriver

emptyStringValue|NULL

dbpassword|***

exactlyOnceErrorInPendingState|error

tableForExactlyOnceHandling|vbak

tableEOColumnNameId|mandt

apostropheEsc|''

columnNameDelimiter|

autoCommit|false

dbdisconnect|true

dbuser|sapm05@m05.world

isolationLevel|-1

adapterStatus|active

exactlyOnceHandlingImplementation|local

tableEOColumnNameTs|100

addParameterParams|*** TABLE , 0 ROWS DEFINED ***

conditionRequired|true

noOfRetries|0

execute|

connectionURL|jdbc:oracle:thin:@//169.254.25.129:1527/M05.WORLD

      • Used configuration data ***

'MessageProtocol': 'XML_SQL'

'adapterStatus': 'active'

'additionalParameters': 'false'

'apostropheEsc': ''''

'columnNameDelimiter': '''

'conditionRequired': 'true'

'connectionURL': 'jdbc:oracle:thin:@//169.254.25.129:1527/M05.WORLD'

'dbpassword': '***'

'dbuser': 'sapm05@m05.world'

'exactlyOnceErrorInPendingState': 'error'

'exactlyOnceHandlingImplementation': 'local'

'execute': ''

'jdbcDriver': 'oracle.jdbc.driver.OracleDriver'

OK - initialized

2.XI log ( j2eeclusterserver0logapplicationscom.sap.xi)

#1.5#02004C4F4F50006E0000000C0000125C0003FB5F6AEC0049#1120812164371#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.XI2JDBC.connectDB()#J2EE_GUEST#0####407f8860ef8c11d9a85002004c4f4f50#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#com.sap.aii.adapter.jdbc.XI2JDBC#Plain###Accessing database connection 'jdbc:oracle:thin:@//169.254.25.129:1527/M05.WORLD' failed:

java.sql.SQLException: E/A-Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093632)(ERR=12514)(ERROR_STACK=(ERROR=(CODE=12514)(EMFI=4))))

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)

at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3649)

at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:353)

at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:368)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:549)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:349)

at java.sql.DriverManager.getConnection(DriverManager.java:512)

at java.sql.DriverManager.getConnection(DriverManager.java:171)

at com.sap.aii.adapter.jdbc.XI2JDBC.connectDB(XI2JDBC.java:742)

at com.sap.aii.adapter.jdbc.XI2JDBC.onInternalMessage(XI2JDBC.java:349)

at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.callSapAdapter_i(SapAdapterServiceFrameImpl.java:173)

at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.callSapAdapter(SapAdapterServiceFrameImpl.java:149)

at com.sap.aii.af.modules.CallAdapterWithMessageBean.process_receiver(CallAdapterWithMessageBean.java:204)

at com.sap.aii.af.modules.CallAdapterWithMessageBean.process(CallAdapterWithMessageBean.java:159)

at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl1.process(ModuleLocalLocalObjectImpl1.java:103)

at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:227)

at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)

at com.sap.aii.af.listener.AFWListenerBean.onMessage(AFWListenerBean.java:241)

at com.sap.aii.af.listener.AFWListenerLocalObjectImpl0.onMessage(AFWListenerLocalObjectImpl0.java:103)

at com.sap.aii.af.ra.ms.impl.ServicesImpl.deliver(ServicesImpl.java:282)

at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:825)

at com.sap.aii.af.ra.ms.impl.core.queue.RequestConsumer.onMessage(RequestConsumer.java:112)

at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:447)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)

Additional information: JDBC driver 'oracle.jdbc.driver.OracleDriver' loaded successfully, additional driver information:

Available JDBC drivers:

oracle.jdbc.driver.OracleDriver, 1.0 JDBC compliant

#

#1.5#02004C4F4F50006E0000000E0000125C0003FB5F6AEC03A0#1120812164371#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/JDBC#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.jdbc.XI2JDBC.addAuditLog(AuditMessageKey, AuditLogStatus, String, String,Object[])#J2EE_GUEST#0####407f8860ef8c11d9a85002004c4f4f50#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#com.sap.aii.adapter.jdbc.XI2JDBC#Plain###JDBC_ERR_207#

3 Log from Integartion Engine Monitoring

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Database connection could not be established</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Can anyone please help. Thanks.

Regards

Olaf Lehmann

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Olaf,

From the dump you had provided..

>> database connection 'jdbc:oracle:thin:@//169.254.25.129:1527/M05.WORLD' failed:

>> java.sql.SQLException: E/A-Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093632)(ERR=12514)(ERROR_STACK=(ERROR=(CODE=12514)(EMFI=4))))

note the error..ERR=12514

ORA-12514: the listener doesn't recognize the requested service in the connection descriptor

Check your tnsnames.ora file!

regards,

Felix

Answers (4)

Answers (4)

Former Member
0 Kudos

Olaf,

not directly related to your problem, but please do not use classes12.zip, which is not compatible with JDK 1.4, but use the current ojdbc14.jar instead.

Regards,

Thilo

olaf_lehmann
Explorer
0 Kudos

Thanks for the info , but first i have to solve the login problem

olaf_lehmann
Explorer
0 Kudos

Thilo

what are the settings for ojdbc.jar.

act. settings are

oracle.jdbc.driver.OracleDriver

jdbc:oracle:thin:@nb00008610:1527:M05

so long we deploy the classes12.zip and the ojdbc.jar

so what i have to change ?

Former Member
0 Kudos

Hello Olaf,

as far as I know the connection URL format is compatible and the driver class name also is the same.

However, you cannot deploy both drivers in jmsproviderlib at the same time as this will result in a class name collision (both drivers are loaded using the same class loader).

Regards,

Thilo

Former Member
0 Kudos

Hi Olaf,

I have the same connection problems, did you ever resolve this problem? Solution?

Regards,

Mattias

olaf_lehmann
Explorer
0 Kudos

Listner settings

STARTUP_WAIT_TIME_LISTENER = 0

ADMIN_RESTRICTIONS_LISTENER = on

LISTENER =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = M05.WORLD))

(ADDRESS = (PROTOCOL = IPC)(KEY = M05))

(ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(HOST = nb00008610)(PORT = 1527))

)

CONNECT_TIMEOUT_LISTENER = 10

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SDU = 32768)

(SID_NAME = M05)

(ORACLE_HOME = E:\oracle\oraM05)

)

)

TRACE_LEVEL_LISTENER = OFF

  1. TNSNAMES.ORA

M05.WORLD =

(DESCRIPTION =

(SDU = 32768)

(ADDRESS_LIST =

(ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(HOST = nb00008610)(PORT = 1527))

)

(CONNECT_DATA =

(SID = M05)

(GLOBAL_NAME = M05.WORLD)

)

)

olaf_lehmann
Explorer
0 Kudos

thanks to all

the conncet string is like

jdbc:oracle:thin:@nb00008610:1527:M05

oracle.jdbc.driver.OracleDriver

user : sapm05

password '***'

udo_martens
Active Contributor
0 Kudos

Hi Olaf,

you filled the field "Connection" in the communication channel in a wrong way. Ask the oracle adminstrator for the right connection string.

Regards,

Udo

Former Member
0 Kudos

Hi Olaf,

Just check in ur adapter monitor as to what is the exact error that u r facing in the JDBC communication channel.

This will give u the exact reason for the error.

Regards

Sunita