cancel
Showing results for 
Search instead for 
Did you mean: 

Error with SAP modules : Could not initialize class com.sap.mw.jco.JCO

Former Member
0 Kudos

Dear Guru

Environment :

Windows2003 cluster SP2

I installed

apache-tomcat-6.0.20.0.exe

jdk-6u2-windows-i586-p.exe

sapjco-ntintel-2.1.8.zip

After install

My Tomcat is work but when i test script connection with SAP module i founded this error

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

I solved this issue from this link

http://help.sap.com/saphelp_nw04/Helpdata/EN/47/80f671ee6e4b41b63c0fe46bd6e4f8/content.htm

Create a directory, for example C:
SAPJCo, and extract the JCo .zip file into this directory.

2. Copy the file librfc32.dll from your SAP JCo main directory to C:\WINNT\SYSTEM32

3. Make sure that the file sapjco.jar (in the SAP JCo main directory) is contained in the class path for all projects for which you want to use the SAP JCo..

After i have used that solutions. I can't solve them.

Eroor :::

root cause

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

and I test install with Windows XP

That solution it is work !!!!

Please advise me?

Accepted Solutions (1)

Accepted Solutions (1)

former_member204746
Active Contributor
0 Kudos

you use the wrong Java JDK.

go get the proper version at http://java.sun.com/j2se/1.4.2/SAPsite/download.html go with version _17.

Former Member
0 Kudos

Hey ,

I am also getting the same error , Any concrete solution for this.

I am using windows 2008 server , and copied sapjcorfc and librfc32 dlls in the windows/system32 folder.

But still i am getting the error .

Exception in thread "main" 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 [C:\Windows\System32\sapjcorfc.dll: Can't find dependent libraries]. java.library.path [D:\jdk16\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;d:\jdk16\bin;.;]

at com.sap.mw.jco.JCO.<clinit>(JCO.java:776)

at SAPDemoTest.getConnection(SAPDemoTest.java:66)

at SAPDemoTest.main(SAPDemoTest.java:24)

Please help me to resolve and thanks in advance..

Answers (2)

Answers (2)

former_member227283
Active Contributor
0 Kudos

Hi ,

After copying the librfc32.dll to C:\WINNT\SYSTEM32 , did you register the DLL with windows.

Thanks,

Anil

former_member227283
Active Contributor
0 Kudos

Hi,

Pls descirbe what is your requirement for the excise you have done.

Thanks

Anil

Former Member
0 Kudos

Dear Anil

Thanks for reply me

My requirement is install Tomcat 6.0 for using application server , install Sapjco modules for connect with SAP on windows 2008 cluster. After install i test Example1.jsp( code programe connect SAP application) and then i found error.

BR,

Songtham

Former Member
0 Kudos

Dear Anil

Thanks for reply me

My requirement is install Tomcat 6.0 for using application server , install Sapjco modules for connect with SAP on windows 2008 cluster. After install i test Example1.jsp( code programe connect SAP application) and then i found error.

BR,

Songtham