cancel
Showing results for 
Search instead for 
Did you mean: 

sapjcorfc.dll already loaded in another classloader

Former Member
0 Kudos

Hi all,

I was trying to use JCO connecting to BAPI. I have wrote two J2EE web applications (e.g. A and B) and create the java proxy using the follow codes:

JCO.Client jclient = JCO.createClient(.....);

jclient.connect();

myproxy = new FirstConnector_PortType();

myproxy.messageSpecifier.setJcoClient(jcoclient);

Each time I can only run one of my applications, e.g. after runing A, if I run B, it would give error like:

sapjcorfc.dll already loaded in another classloader

I think that the error was caused by "JCO.createClient(.....)", which will load "sapjcorfc.dll" everytime when callinng the function. Do anyone know that how I can handle this case ?

Thx a lot~

Accepted Solutions (0)

Answers (1)

Answers (1)

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

for this we developed the proxy generator, that is available with 6.40. Those proxies you can use without such conflict. Otherwise you have to write a peoxy yourself that handles this conflict.

Regards,

Benny

Former Member
0 Kudos

Hi,

I have already used the proxy generator to generate

"FirstConnector_PortType" and a set of java classes. To my best knowledge, we need to supply a JCO client for setting up the proxy information, i.e.

JCO.Client jclient = JCO.createClient(<my_SAP_system_information>);

......

myproxy.messageSpecifier.setJcoClient(jclient);

However, I find that the exception occurs at "JCO.createClient", but not at the creation of proxy instance. Therefore, I wonder if "JCO.createClient" will load the "sapjcorfc.dll" everytime and there are any alternative methods, which avoid loading the "sapjcorfc.dll", to create JCO.Client.

Thx in advance.

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Oh, then the error is that you should generate all BAPIS you want to call into this proxy. Remember when going through the wizard and check the BAPI. There please check both bapis you want to call.

Regards,

Benny