cancel
Showing results for 
Search instead for 
Did you mean: 

Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

larry_chaput
Participant
0 Kudos

Hi Guys,

We've just moved over to NWDS and are using WebAS 6.40 as the server ... along with DTR. After moving my project from Tomcat onto the WebAS I'm receiving the following error...

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 [no sapjcorfc in java.library.path]. java.library.path

Now, from my web archive context menu I've chosen to "added additional libraries" and selected the com.sap.mw.jco. Also in my application-J2EE-engine.xml of the EAR archive I've added that same package ... the xml file looks like this ...

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">

<application-j2ee-engine>

<reference

reference-type="hard">

<reference-target

provider-name="sap.com"

target-type="library">com.sap.mw.jco</reference-target>

</reference>

<provider-name>sap.com</provider-name>

<fail-over-enable

mode="disable"/>

</application-j2ee-engine>

From what I've read I seem to have everything set up properly but I continue to get this error.

One thing I did notice is that when I build the project locally I'm doing so on a Windows box. The dlls that its complaining about are there and the project builds fine. However when its deployed, it is on a Unix box so it won't be using the dlls.

n e thoughts?

Accepted Solutions (0)

Answers (1)

Answers (1)

larry_chaput
Participant
0 Kudos

The problem was that I had a Windows version of the JCo instead of an HP-UX version. After swapping them I am no longer receiving the error.