cancel
Showing results for 
Search instead for 
Did you mean: 

Some problems about JCo >.<

Former Member
0 Kudos

Hi,everyone.

I try to do some exercise about Jco.

But i got trouble on mu first step.

When i call a Client.connection();

I got a error message:

<i>java.lang.NoClassDefFoundError

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

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

at JCoTest.main(JCoTest.java:24)

Exception in thread "main"</i>

Follows is my codes:

mConnection=JCO.createClient("107","NW01","6czrbe5s","EN","http://140.115.77.xx","00");

mConnection.connect();

System.out.println(mConnection.getAttributes());

mConnection.disconnect();

Anyone can solve my problem? Thx a lot~~~

Accepted Solutions (1)

Accepted Solutions (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Louis,

Is this a console application or one in NWDS?.

have u set class path for sapjco.jar?.

just check u have set classpath.

Regards

Kishor Gopinathan

Former Member
0 Kudos

Hi Kishor,

It is in NWDS.

I had already set Class Path & Path.

And copied two .dll files to ../system32 .

But it still doesn`t work .

Should i do anything to NWDS?

former_member184385
Active Participant
0 Kudos

Hi Louis,

in NWDS, as it is customized Eclipse 2.11 IDE, the usual procedures apply, how to reference jars in your project.

Either you copy the jars inside your project's dir structure and do a "local jar" reference or you leave the jars, where you installed them and do a "external jar" reference. What did you do?

Regards

Gregor

kishorg
Advisor
Advisor
0 Kudos

Hi Louis,

i had faced the same problem.

but , could realise that ,

associated with the sapjco.jar, these two dlls (librfc32.dll ,sapjcorfc.dll) will be there, and that combination will work if and only if the entire things(sapjco.jar,and the dlls ) are associated with the same package.(i mean in that zip where jar files and dlls )..

just take the back up of the sapjco.jar file from the NWDS ,

replace with u got from the package,

then copy the dlls into sys32 folder from the zip..

i think it will work.

i tried in this way and worked...

Regards

Kishor Gopinathan

Former Member
0 Kudos

Thx~~ everyone

I had already solved my problem.^^

former_member187444
Participant
0 Kudos

How did you have solved?

Please can you explain?

Former Member
0 Kudos

Hi Eray,

I were wondering whether you have found a solution for this problem. If yes, would you please share it with me?

Thanks,

Van

Former Member
0 Kudos

Hi Louis Huang,

Would you please share with us your solution for this problem? I encountered the same problem right now, and looking for a solution.

Your help is very much appreciated.

Thanks,

Van

Answers (1)

Answers (1)

former_member188321
Contributor
0 Kudos

Right, try setting 'sapjco.jar' into your classpath.

Moreover, please comfirm that you have PDK's required DLLs:

librfc32.dll

sapjcorfc.dll

into your <windows>\system32 folder.

If still facing problem, then mention.

Have a great day!