cancel
Showing results for 
Search instead for 
Did you mean: 

SAP JCo Moving and upgrading

russell_turner5
Explorer
0 Kudos

Hi experts,

I have an existing java application that's been running successfully for years. It's running on Tomcat 6.0 and connects to a MySQL database and connects to SAP via JCO.

I had to migrate the application to new hardware so did a fresh installation of Tomcat/MySQL 64-bit version. I put my application war file on the new Tomcat and it deployed fine. I copied all the jars from my old Tomcat/lib to the new one.

When I ran something that used JCO an error appeared in the log

Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]

Investigating this I saw I needed to download the JCo3 package and set up an environment variable to point to it. However I now get:

Dec 11, 2015 12:28:02 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet StatusListServlet threw exception

java.lang.NoClassDefFoundError: Could not initialize class com.sap.mw.jco.JCO

    at sapaccess.SapControl.createClientPool(SapControl.java:27)


Reading the release notes of JCo3 it has changes to coding between earlier versions and JCo3 and the com.sap.mw.jco namespace no longer exists.

Do I have to rewrite my code that used the old version of JCO in order to use the new version?

Cheers,

Russ.

Accepted Solutions (0)

Answers (1)

Answers (1)

HAL9000
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Russ,

yes, you have to adapt your coding if upgrading to JCo 3.0.

The JCo API has changed from version 2 to 3.

Please see the JCo 2.x-3.0 Migration Guide for further info.

I suggest that you keep your new Tomcat installation running with the old deprecated and unsupported SAP JCo 2.1 until you have finished your JCo3 migration project. You may also run both JCo versions 2.1 and 3.0 simultaneously in your Tomcat environment.

Please see KBA 1944049 for the download location of the archived JCo 2.1 version.

Best regards,

Stefan