cancel
Showing results for 
Search instead for 
Did you mean: 

Can't obtain JCO client connection

Former Member
0 Kudos

Hello all,

I defined a destination in the Visual Admin.

Run a successful test with the test button.

Created an EJB that accesses the destination successfully, but getting an exception when trying to create a client (the last code line) :

 
RFCDestination dst = (RFCDestination) dstService.getDestination("RFC", "DGL_DEST_TEST");
Properties jcoProperties = dst.getJCoProperties();
JCO.Client client = JCO.createClient(jcoProperties);

Any suggestions?

Thanks for your time, Adi.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Adi,

provide more details about exception you've got

Former Member
0 Kudos

Hi Denis,

I wrote the code in an EJB and running the EJB threw a Web Service.

I don't have much experience in J2EE but it looks like because I'm running threw a

Web Service I don't get the details of the exception.

even though the code is in a try-catch block all I get is an error saying:

Exception in method name_of_method.

This is why I can't give anymore information.

Can you advice on another way of running the EJB so I'll be able to see more information?

Thanks, Adi.

Former Member
0 Kudos

Hi again,

Problem solved.

The solution was:

In the EJB project:

1. Remove sapjco.jar from the Libraries in Java Build Path (project --> properties)

2. in Project --> Set Additional Libraries choose com.sap.mw.jco

In the Application project:

Open application-j2ee-engine.xml go to general tab and add a new reference to the same library (com.sap.mw.jco).

Regards, Adi.