Skip to Content
avatar image
Former Member

Could not initialize dynamic link library sapjcorfc

We are tryibg to use Sap Jco under J2EE Tomcat application running on

AIX 5.3 64 bit, with JRe 1.4.2.

We are reciving this error :

HTTP Status 500 -

-


Type Exception report message

description The server encountered an internal error () that prevented

it from fulfilling this request.

Exception

javax.servlet.ServletException: #{pc_Index.doButton1Action}:

javax.faces.el.EvaluationException:

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

[/opt/sapjco/libsapjcorfc.so: load ENOEXEC on shared library

(s) /opt/sapjco/libsapjcorfc.so]. java.library.path

[/usr/java14/jre/bin:/usr/java14/jre/bin/classic:/usr/java14/jre/bin:/opt/sapjco:.:/usr/lib]

javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)

root cause

javax.faces.FacesException: #{pc_Index.doButton1Action}:

javax.faces.el.EvaluationException:

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

[/opt/sapjco/libsapjcorfc.so: load ENOEXEC on shared library

(s) /opt/sapjco/libsapjcorfc.so]. java.library.path

[/usr/java14/jre/bin:/usr/java14/jre/bin/classic:/usr/java14/jre/bin:/opt/sapjco:.:/usr/lib]

com.sun.faces.application.ActionListenerImpl.processAction

(ActionListenerImpl.java:78)

javax.faces.component.UICommand.broadcast(UICommand.java:312)

javax.faces.component.UIViewRoot.broadcastEvents

(UIViewRoot.java:267)

javax.faces.component.UIViewRoot.processApplication

(UIViewRoot.java:381)

com.sun.faces.lifecycle.InvokeApplicationPhase.execute

(InvokeApplicationPhase.java:75)

com.sun.faces.lifecycle.LifecycleImpl.phase

(LifecycleImpl.java:200)

com.sun.faces.lifecycle.LifecycleImpl.execute

(LifecycleImpl.java:90)

javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)

Any suggestion ?

thansk in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 26, 2006 at 04:38 AM

    Hi this error most likely occurs in following scenario

    when you have different versions of sapjcorfc.dll and sapjco.jar installed. everytime the JCO connector is upgraded to a new version, you need to ensure that all three libraries are updated (librfc32.dll, sapjcorfc.dll, and sapjco.jar). This error will occur if any one of them is still in older version.

    To resolve this try out extracting sapjcorfc.dll and sapjco.jar from the original JCO jar file. Copy these files to the appropriate locations, overwriting the originally installed versions( Mostly the in the Sysem32 folder of your windows). Ensure that the PATH statement is updated to reflect the directory location of the DLL files and the Java CLASSPATH points to sapjco.jar.

    Hope this resolves your issue. Please dont forget to award points if this helps you.

    Regards,

    Sesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 07:03 PM

    I discovered a way to fix this error:

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

    JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc

    [/opt/sapjco/libsapjcorfc.so: load ENOEXEC on shared library

    Answer: First, make sure you've downloaded the proper version of sapjco for your system including 32 or 64-bit. Also, make sure you copy lib files to right directory that get extracted with the sapjco file.

    For example on AIX: cp librfccm.o libsapjcorfc.o libsapjcorfc.so /usr/java14_64/jre/bin/

    make sure permissions/owner/group are okay.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 08:15 AM

    Put sapjcorfc.dll in some folder (c:/saplibs for inst) and add java launch parameter like:

    -Djava.library.path=c:/saplibs

    or, if u use unix-like OS instead of .dll file you should use libsapjcorfc.so

    Add comment
    10|10000 characters needed characters exceeded