Home > SAP software/management Tips > SAP ABAP/Java developer tips > What does this JCO Exception mean?
SAP Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SAP ABAP/JAVA DEVELOPER TIPS

What does this JCO Exception mean?


Austin Sincock
12.16.2003
Rating: -4.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Three or four times a month, I am asked about a specific JCO connector exception that seems to confuse many people. If you've experienced the following exception, then read on for more insight:

java.lang.ExceptionInInitializerError: JCO.classInitialize(): 
Could not load middleware layer
'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): 
Could not initialize dynamic link library 
librfc. Found version "620.0.907" but required at least 
version "620.0.950".

This exception is misleading because most people start looking for the class com.sap.mw.jco.rfc.MiddlewareRFC which is part of the JCO file "sapjco.jar". After making sure this file is in the CLASSPATH, they attempt to re-run the application, only to get the same error. The answer lies in the fact that they have attempted to run JCo with files from different JCo versions.

SAP has been great about supporting JCo with ever-newer releases. Each release is a successive build upon the last, solving bugs and often adding new features to the connector. The trick is ensuring that you have completely removed ALL files installed from the previous release before attempting to run a new one.

The files in question are:

  • sapjco.jar
  • librfc32.dll
  • sapjcorfc.dll

    The exception above occurs when you have left the .dll files from a previous installation in the Windows/system32 directory, while trying to use the latest sapjco.jar file in my Java application. Obviously, my example here is Windows biased, such that if I were running on a UNIX platform, I would be using native libraries (.o, .so, etc.) instead of .dll files.

    To perform a successful install of a new JCo version, you simply need to remove the .dll files from the Windows/system32 directory and replace them with the libraries that come zipped in the newer version. Likewise, you must point your CLASSPATH to the latest sapjco.jar file, ensuring that the old version is not available from the CLASSPATH.

    Author Austin Sincock is a freelance Java/SAP consultant who contributes regularly to Web and print journals. He can be reached at austin@opensourceguru.com. Check out his book Enterprise Java for SAP


    Rate this Tip
    To rate tips, you must be a member of SearchSAP.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



    RELATED CONTENT
    SAP ABAP/Java developer tips
    How to do additional dialog processing after SAP COMMIT WORK statement
    How to find a piece of SAP ABAP code without debugging
    How to read an SAP transaction in an ABAP code
    How to provide an SAP R/3 4.5B application server with a Web service interface
    How to find owners and transports of deleted ABAP programs
    Fixing a common OPEN_FORM and START_FORM error in SAPscript
    Select Text fields: Case-insensitive
    Is this the quickest way to find a BADI?
    Easily debug error messages in SAP processes
    Accessing private attributes in ABAP Objects

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • NetWeaver SAP White Papers
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
    SearchSAP.com is a search service provided by TechTarget and is completely
    independent of and not affiliated with SAP AG.
      TechTarget - The IT Media ROI Experts