cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Java proxy for RFC

Former Member
0 Kudos

Hi

I'm new - sorry if this is a simple question.

I'm developing a jsp on Oracle Application server, and I want to call a function in R/3 which i've written in ABAP. I tried using JCo with the sapjcorfc.dll and sapjco.jar. Works fine in development environment, but in production I get "sapjcorfc.dll already loaded in another classloader" error. To solve this I found a note saying that generating a proxy should be the solution. So I downloaded SAP NetWeaver in order to get the Development studio, and the tried to follow these instructions:

http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm

which leads to:

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/11/e2bc3d9ecc6b3be10000000a114084/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/11/e2bc3d9ecc6b3be10000000a114084/content.htm</a>

First step is to Choose:

File -> New -> Other… -> SAP Connectivity -> SAP Enterprise Connector

BUT - i don't get an option called SAP Connectivity. I've browsed all menus and can't find anything that has to do with proxy generation.

Any help will be appreciated.

Regards Allan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Allan,

This is strange. What IDE version are you using?

By the way:

1. There is also options to use plain JCo (without classes generated by SAP Enterprise Connector) and SAP JCA adapter for JCo

2. Your problem with already loaded DLL is due to 2 class instances (from JCo lib) loaded by different class loader. try to find out who is the first (obviously, your code is second). I don't know whether or not there is a mechanism in Oracle AS (is it still Orion?) similar to SAP WebAS refereneces...

In SAP service it is possible to define library/service and then refer them from other projects. This way library/service has own class loader that loads shared classed (like JCo lib), classloader of any other projects (like EAR) delegates to this classloader and necessary classes is loaded only once.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi

The IDE is:

SAP NetWeaver Developer Studio JavaOne Edition

Version: 7.1.0

Build id: 200601240137

Downloaded as part of NW_J2EE_Preview_710J1.

I thought a lot about solving the classloader problem, but Oracle application server is running several different instances of OC4J (prev. Orion) so 'I'm having several different Virtual Machines and if I solve the problem for this first jsp, I'm afraid that it will return when making new applications. That's why I went for the proxy solution. This looks like a safe way.

Allan

Former Member
0 Kudos

Allan,

This is a preview of new version, so not functionality are included.

Anyway, SAP Enterprise Connector does not solve your problem -- it uses JCo underneath, so the only result will be a bit longer stack trace.

I'm wondering whether or not JCA adapter will help you, but this is the only option to test...

VS

Former Member
0 Kudos

Hi

Hummmm.....

I'll look into the JCA Adapter, or try to solve the classloader problem.

Thanks.

Allan

Former Member
0 Kudos

Well, if anybody is messing with the same problem, here is how I solved the classloader problem on the Oracle Application Server:

In my JDeveloper project where I'm making the JSP pages I've included the sapjco.jar as a library. When making the EAR file i don't include this jar file. Instead I create a shared library on the AS and then during deployment I choose to edit the deployment plan, and makes the application dependent on the shared library.

As far as I can see, this makes me able to use JCo from all pages within one application on the AS.

Allan

Answers (0)