cancel
Showing results for 
Search instead for 
Did you mean: 

package com.sap.mw.jco does not exist

Former Member
0 Kudos

Hi All,

i wrote a class where i have imported a pkg com.sap.mw.jco.* and called a method

JCo.Function func = getDefaultJCoConnection().getJCoFunction("CRM_ISA_ADD_DATA_SAVE");

But the NWDS shows an error that "The import com.sap.mw.jco cannot be resolved".

Then i have added sapjo.jar as external JAR in my crm/home/shr/ext. Due to this the import error has gone.

The real issue is:

when i do the build project. it failed. Following is the error which is generated in build.log

[javac] ERROR: C:\Users\mdeshpande.jdi\0\DCs\sap.com\crm\home\shr\ext\_comp\src\packages\com\cf\isa\mod\demo3\backend\crm\Z_CustomBasketCRM.java:4: package com.sap.mw.jco does not exist

[javac] ERROR: import com.sap.mw.jco.*;

[javac] ERROR: ^

[javac] ERROR: C:\Users\mdeshpande.jdi\0\DCs\sap.com\crm\home\shr\ext\_comp\src\packages\com\cf\isa\mod\demo3\backend\crm\Z_CustomBasketCRM.java:43: package JCO does not exist

[javac] ERROR: JCO.Function func = getDefaultJCoConnection().getJCoFunction("CRM_ISA_ADD_DATA_SAVE");

[javac] ERROR: ^

[javac] ERROR: C:\Users\mdeshpande.jdi\0\DCs\sap.com\crm\home\shr\ext\_comp\src\packages\com\cf\isa\mod\demo3\backend\crm\Z_CustomBasketCRM.java:43: cannot access com.sap.mw.jco.JCO

[javac] ERROR: class file for com.sap.mw.jco.JCO not found

[javac] ERROR: JCO.Function func = getDefaultJCoConnection().getJCoFunction("CRM_ISA_ADD_DATA_SAVE");

[javac] ERROR: C:\Users\mdeshpande.jdi\0\DCs\sap.com\crm\home\shr\ext\_comp\src\packages\com\cf\isa\mod\demo3\backend\crm\Z_CustomBasketCRM.java:49: cannot access com.sap.tc.logging.Category

[javac] ERROR: class file for com.sap.tc.logging.Category not found

[javac] ERROR: log.error(ex);

^

Please tell me is there anything i missed?

Thank you.

Regards,

MackDe

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mack De,

What is the dependency type you gave while adding the DC?

Ideally it should be Build time, Deploy time and Run time checked. Also you can give the relation ship type to be weak or strong.

These options would be available for you when you are adding the dependency.

Sateesh Chandra

Former Member
0 Kudos

Hi Sateesh,

The dependency type given are 1. Design Time 2. Deploy Time 3. Runtime.

Actually I didn't find any relationship type option like weak or strong.

I am sending an error message when I hover the mouse over tc/bl/jrfc/api DC:

Vendor: sap.com

Type: J2EE server component / Primary Library [sap.com]

Containing SC: ENGFACADE

! Component is deprecated.

Reason for deprecation: DC tc/bl/jrfc/api is obsolete and should no longer be used. it will be removed in future releases.

Deprecated since: 2008-06-01

Regards,

MackDe

Former Member
0 Kudos

Hi,

I am also facing the same problem. Any solution to this issue?

Thanks

Former Member
0 Kudos

Hi,

For NWDS 7.1 and above with JDK version 1.5 and above, use import com.sap.conn.jco.;* instead of import com.sap.mw.jco.*;

Then follow the steps

> Go to build path of shr/ext

> Configue build path

> Add external jars

> Browse upto plugin of NWDS

> Select com.sap.mw.jco3_3.0.6.110321125304

> Select lib

> Select sapjco3_IDE.jar

This will solve your import error.

Follow the link:

[http://help.sap.com/saphelp_nw73/helpdata/en/48/5f66b426ec58d7e10000000a421937/frameset.htm]

Regards,

Mack

Former Member
0 Kudos

Hi Mackde,

If you are using NWDI then check whether you have used DC com.sap.mw.jco under crm/home/shr/ext DC. If the used DC is not available you can add it manually from SAP-JEE SC.

If you are not using NWDI then add jrfc.jar as an external jar to your project. This jar is available in your J2EE Engine.

Sateesh Chandra.

Former Member
0 Kudos

Hello Sateesh Chandra,

great answer about this post!! This fixed my problem.

Thanks.

[]'s

Former Member
0 Kudos

Thanks Sateesh for your reply.

Yes we are using NWDI.

As per your instructions we have identified that the package com.sap.mw.jco.* is present in the tc/bl/jrfc/api DC of ENGFACADE SC.

When we added the DC in the used DCs of our development component, the compilation error is gone but still while building it gives the same error and the DCs get broken.

Since we are using NWDS 7.3 version which is using jsdk 1.6 version and the current version of jrfc is deprecated, could the problem be because of that ?

Regards

MackDe

Former Member
0 Kudos

MackDe,

which windows are you using? and what's the version 32 or 64bits?

Former Member
0 Kudos

Hi Tulio,

I am using Windows Server 2008 R2 Standard with 64-bit OS.

Also version of NWDI is 7.3 and JDK version 1.6 Is there any documentation available for version 7.3?

Thanks.

Regards,

MackDe