Skip to Content
0
Feb 04, 2008 at 07:43 AM

Java Connector. "sapjcorfc.dll already loaded in another classloader"

1013 Views

Dear all:

I'm fighting against a Java Connector problem.

I'm using:

-JCO version 2.16

-Apache Tomcat 5.5.17

I have written the environment variables:

CLASSPATH pointing where I have sapjco.jar, sapjcorfc.dll

Path where i have sapjco.jar, sapjcorfc.dll.

I try to make a webservice which calls a RFC function in SAP.

Java program compiles and Deploy OK.

I load the web service in Tomcat.

When I call the java server page, I get this error message from Tomcat:

org.apache.jasper.JasperException: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc Native Library C:\Traspas\Projecte\lib\sapjcorfc.dll already loaded in another classloader. java.library.path C:\Tomcat5.5.17\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Java\jdk1.5.0_07\bin;C:\Traspas\Projecte\lib

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Seems that is trying to load twice sapjcorfc.dll?

I would be grateful if someone can give me help.

Thanks in advance.

Jordi