All,
I have 6 projects that each one has a POM file. I have a master POM file
that I run it in order to build/test/package my projects.
I use maven 2.
When my test runs I get the error below:
I guess that this happen because there are 2 different project that
their test load the same DLL from 2 different classloaders.
Does maven use different classloader for each project? (and does not
release them at the end).
How can I solve the problem below?
java.lang.ExceptionInInitializerError: 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:\WINDOWS\system32\sapjcorfc.dll already loaded in
another classloader]. java.library.path [C:\Program
Files\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\s
ystem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Java\jdk1.5.0_06\bin;D:\Program Files\maven-2.0.4\bin]
at com.sap.mw.jco.JCO.<clinit>(JCO.java:738)
at
com.panaya.sap.utils.SapUtils.connectSAP(SapUtils.java:1140)
at com.panaya.sap.utils.SapUtils.<init>(SapUtils.java:175)
at com.panaya.sap.utils.SapUtils.<clinit>(SapUtils.java:149)
at
com.panaya.explorer.ui.controls.errormessages.ErrorMessagesPGraphTest.te
stValidGraph(ErrorMessagesPGraphTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
Thanks,
Ronen