cancel
Showing results for 
Search instead for 
Did you mean: 

Socket closed exception

Former Member
0 Kudos

Hi all,

I am trying to execute an XI scenario in which i am sending data from sap R/3 system to a table in Oracle 8.0 system using JDBC adapter.

The XI server has JDBC 9.0 driver.

On sending the message, status shown on the XI server is successful, but no data is getting posted in the table.

In XI runtime workbench, in component monitoring, the error shown with the JDBC driver is SOCKET CLOSED.

Pls if anybody can help me with this problem.

Its very urgent.

Thanks in advance.

Regards

Neetu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi neetu,

Check if you are connecting to the correct url. The connection and drivers information you have given in the communication channel should be correct.

Vendor apecific drivers file for oracle database should be correctly deployed in jmsproviderlib.sda and corresponding entry should be there in provider.xml file in jmsproviderlib.sda

But your error socket exception more deals with network issues. Check if the port you are giving in connection parameter is the correct one and check authorisation issues.

The default port for Oracle database is 1521.

Yomesh

Message was edited by: yomesh P Sharma

Answers (8)

Answers (8)

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

To install oracle driver, just check this link,

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

Regards,

Bhavesh

Former Member
0 Kudos

Bhavesh,

Sorry for the delay in response.

I have not been to try any solution because my Xi web page is not getting displayed.

Can pls suggest what can be the possible reason for this.

Regards,

Neetu

Former Member
0 Kudos

Hi,

Previously we were using the command INSERT.

But we were getting the same message at that time also.

Regards

Neetu

bhavesh_kantilal
Active Contributor
0 Kudos

Hi neetu,

889410 note talks of the same problem with a File Adapter. take a look at it. Might be applicable to the JDBC adapter also.

Also, check if you are using OJDB14.jar as the driver for your Oracle Database.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

There is no stored procedure for inserting values to the database. In our scenario we are placing the data in a dump table.

The data in the JDBC adapter is converted into the corresponding SQL statement by XI .

i.e.

<?xml version="1.0" encoding="UTF-8" ?>

- <ns:Promotion_HURES_MT xmlns:ns="http://sap.com/XI/POC">

- <StatementName>

- <sap_promotion action="UPDATE_INSERT">

- <access>

<Prom_Empno>20</Prom_Empno>

<Prom_Comp>ITD</Prom_Comp>

<Prom_Div>ITD</Prom_Div>

<Prom_Old_Level>ZA</Prom_Old_Level>

<Prom_Old_Desg>Associate Consultant</Prom_Old_Desg>

<Prom_New_Level>ZA</Prom_New_Level>

<Prom_New_Desg>Cons</Prom_New_Desg>

</access>

</sap_promotion>

</StatementName>

</ns:Promotion_HURES_MT>

Regards

Neetu

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

Can you just make this one small change and try it out.

ACTION = "UPDATE_INSERT" as ACTION ="INSERT"

ASFAIK, when an UPDATE is used, <KEY> has to be defined compulosiry. Try this and let mek now if it works.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Neetu,

Please have a look at these threads.. They deal with a similar problem

Hope these help!

cheers,

Prashanth

Former Member
0 Kudos

Hi,

The error shown in the Adapter Monitor in Runtime Workbench is:

Receiver Adapter v1027 for Party '', Service 'HURES':

Configured at 16:35:07 2006-05-12

Last message processing started 15:16:02 2006-05-13, Error: Transform error in xml processor class, rollback:

ERROR:Processing request: Error when executing statement for table/stored proc. 'sap_promotion': java.sql.SQLException: Io exception: Socket closed

at com.sap.aii.adapter.jdbc.xml2sql.service(xml2sql.java:175)

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

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

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

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

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

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

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

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

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

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

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

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

at com.sap.aii.af.ra.ms.impl.core.queue.ReceiveConsumer.invokeHandler(ReceiveConsumer.java:353)

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

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

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:94)

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

Regards

Neetu

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

<i> Error when executing statement for table/stored proc. 'sap_promotion':</i>

Can you try a simple INSERT into the Database.? If it works fine, then the problem is because of the cal to the STORED PROCEDURE.

I have implemeneted Calling a STORED PROCEDURE to an Oracle DB and did not face any issues.

Can you post the Datatype that is calling the STORED PROCEDURE?

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

I tried accessing the DB server from the XI server as told by Bhavesh. Its working fine i.e. the ping command is returning successful reply.

All the vendor specific driver files are also present as mentioned by Yomesh.

But the error still exists.

Can the problem be there because of some version incompatibility?

Regards

Neetu

Former Member
0 Kudos

Hi Bhavesh,

Yes we have already installed the driver on the XI server using the same link as sent by you.

We have also tried accessing the DB server using JAVA code and its working fine. We have also used the connectivity string as given by you,

JDBC Driver: oracle.jdbc.driver.OracleDriver

Connection String: jdbc:oracle:thin:@<IP Address>:<Port number>:<DataBase name>

Therefore the error is not present for these resons.

Can you tell us how we can check if we can access the DB server from the XI Server?

Regards

Neetu

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

<i>Can you tell us how we can check if we can access the DB server from the XI Server?</i>

Just try a TELNET with the IP address and port from the XI server.If the socket/port is not accesible , then you will not be able to access this netwrok address from your XI server.

Ofcourse, you need acess to the server to be able to try all this.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

Has the driver for Oracle Database been installed on your server. If no, check this document on how to do the same.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-964...

Next, try to access the IPADDESS and PORT on which the DB is running from your XI server. Check if connectiviyt to the same is available. Socket Closed Exception looks like a connectivity and authorization issue.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

The details that have to be entered while adapter configuration,

<b>jdbc:oracle:thin:@<IP adress>:<listener port>:<instance name (database name)>

Driver oracle.jdbc.driver.OracleDriver</b>

Check this and let us know the reulsts.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Neetu,

One final try. hopefully it should do the trick,

Enable the "Advanced Mode" for the JDBC Adapter channel and select the option "Disconnect from Database After Processing each Message".

Regards,

bhavesh

Former Member
0 Kudos

Bhavesh,

The file being used for Oracle Driver is Classes12.zip.

Can you pls tell me the steps for enabling the advanced mode and selecting the option specified for you.

Regards

Neetu

bhavesh_kantilal
Active Contributor
0 Kudos

neetu,

in your receiver JDBC adapter, you will have the option ADVANCED mode, slect the same, and select the option,"Disconnect from Database After Processing each Message".

If this does not solve this issue, try using OJDBC14.jar. We have used the same, for connecting to an Oracle DB and found no issues on the same.

Regards,

bhavesh

PS mark useful answers with points.

Former Member
0 Kudos

Bhavesh,

But we dont have the OJDBC14.jar file.

Regard

Neetu