Problem on running Java Agent connect to SAP

All,

I have a problem when running Java agent that using native method (load library) sapjcorfc.dll. What I wanted to do is I want to connect to SAP using SAP-JCO Connector.

At the first time I executed the Java agent, it was successfully executed (I got reply from SAP). But at second time and next, it was always thrown an exception as shown bellow :

==============

java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ‘com.sap.mw.jco.rfc.MiddlewareRFC’

Native Library C:\temp\SAPConnector\sapjcorfc.dll already loaded in another classloader

at com.sap.mw.jco.JCO.<clinit>(JCO.java:565)



at JavaAgent.NotesMain(JavaAgent.java:16)



at lotus.domino.AgentBase.runNotes(Unknown Source)



at lotus.domino.NotesThread.run(NotesThread.java:208)

==============

It’s likely that Domino doesn’t unloaded the library automatically, because the error tells that the library already loaded after first execution. I use Domino Designer6.5 and Domino Server6.5 (trial version) running on WinXP Prof. Is there any bugs in this version?

Can anyone tell me what should I do? Please, really need help.

Thanks,

Henri

Subject: Problem on running Java Agent connect to SAP

Hello,perhaps the solution:

try first to not starting Domino as TASK; start it as WINDOWS PROGRAMM;

if all right, you can start Domino as ServerTask, without login as Local System Login, login as administrative user.

jl

Subject: Problem on running Java Agent connect to SAP

Hey,

I am trying to do the same thing, connecting to SAP via the JCO library.

I am interested in your experience with this.

Subject: RE: Problem on running Java Agent connect to SAP

Hello,…have the same problems while running a (java-) agent connecting to SAP…

Any ideas…?

jl