cancel
Showing results for 
Search instead for 
Did you mean: 

class not found error while establishing a jco connection

Former Member
0 Kudos

Hi

I am trying to establish a JCo connection in Java class.

public static void main(String s[])

{
try {
...// set connection properties
			connClient.connect();
			} catch (Exception ex)
			{
				ex.printStackTrace();
				System.exit(1);
			}
 
}

It is throwing runtime error on line connClient.connect();

java.lang.NoClassDefFoundError

at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:1079)

at com.sap.mw.jco.JCO$Client.connect(JCO.java:3256)

Accepted Solutions (0)

Answers (1)

Answers (1)

p330068
Active Contributor
0 Kudos
Former Member
0 Kudos

I am having DC and added "com.sap.mw.jco" in used DC section with built time dependency.

Still I am getting this error

Former Member
0 Kudos

I figured it out !

I was building a Java application in a DC.

So the problem I was facing was very much similar to his.

[;

Now, I have changed to simple java project.

And its working fine.

Thanks