cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Java extension classes in NWDI

Ash_ok
Contributor
0 Kudos

Hi !

I am trying to follow some 'How-to' guides to create a bespoke Java Action.

I have -

  • created a new project under sap.com_SAP-SHRWEB_1 - crm/home/shr/ext

  • imported the bespoke Java action into folder src/packages in sap.com_SAP_SHRWEB_1

However, when I try to build, I get the following error -

DC Model check: All used DCs are available locally ERROR: Check for used DCs failed: Cannot build because used component is broken: sap.com/crm/isa/web/b2c( sap.com_SAP-SHRWEB_1). Build failed with errors.

Could someone help me out please ?

Regards,

Ashok.

Edited by: Ashok on Oct 27, 2009 3:54 PM

Hi !

After having read the thread - - I've added the crm/home/shr/ext (assembly) under Used DC . But now I am getting the following error - ERROR: crm/home/shr/ext: Build failed for sap.com/crm/home/shr/ext(sap.com_SAP-SHRWEB_1) in variant "default": Illegal component usage: compartment "sap.com_SAP-SHRWEB_1" does not use compartment "sap.com_SAP-JEE_1" of used DC "sap.com/com.sap.tc.Logging"

Can anyone help ?

Best regards,

Ashok.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ashok,

Please check weather the jar files has been added on class path or not.Go project and right click there was option called properties.Once u click on properties and there is an option called java build path.There u can check all the jars are available or not. If ur not added then u need to add those jar files and save it.

Hope this resolves ur issue.

Regards,

Satish B

Ash_ok
Contributor
0 Kudos

Hi Sathish,

Thanks for your reply. On detailed analyses, we found that some objects were incorrect in the SLD. They have since been corrected and the DC synced again.

To analyse everything, we have decided to take small steps rather than large leaps. We have now added some small bit of Java code but the build is erroring due to not being able to find com.sap.isa.backend.r3.* jar file. Where can I find this .jar file ? We are using ERP E-Commerce.

Best regards,

Ashok.

Edited by: Ashok on Oct 28, 2009 5:53 PM

Hi !

I found the _com.sap.isa.backend.r3.* file in sap.comcrmisaisacorer3assembly. However, even after adding that jar file onto the Java buildpath of 'crmhomeshrextsap.com', build is failing complaining about the same .jar file. The .jar file doesn't see to be added onto the buildpath during the actual build. Am I missing anything ?

Regards,

Ashok.

Former Member
0 Kudos

Hi Ashok,

If you are using NWDS then go to "Development Configuration" perspective. Expand "sap.com_SAP-SHRWEB" SC. Expand "crm/home/shr/ext" DC. expand "DC MetaData" --> DC Definition" -->"Used DC".

Check whether "crm/isa/isacorer3" and "crm/isa/isacore" is in the list of Used DC. If not please add them and then try.

eCommerce Developer

Ash_ok
Contributor
0 Kudos

Hi !

How would I add the two external libraries onto "sap.com_SAP-SHRWEB" SC --> "crm/home/shr/ext" DC --> "DC MetaData" --> DC Definition" -->"Used DC" ? When I right click on that node, it just allows me to add a 'Used DC'.

Best regards,

Ashok.

Former Member
0 Kudos

Ashok,

You can't add directly any external JAR file for your project. If you try to add in your NWDS then it may work on your local but not on your Development or run time system.

To use external jar file in your project you have to create new DC and include JAR fil ein that DC and then you have to use that dc in your "/shr/ext" project.

isacore and isacore3 should be added by default in your track definition.

If you want to add JAR file in your DC try to look here [Using External Libraries for Development with NWDI|http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/3ce3e4df201d63e10000000a11466f/content.htm]

eCommerce Developer

Ash_ok
Contributor
0 Kudos

Hi !

I definitely know that 'isacorer3.jar' and 'userr3.jar' were included as part of the DC creation under CUSTCRMPRJ. However, it doesn't seem to appear in the Java Perspective / Package Explorer view 'crmisaweb@b2c~sap.com' entry. Am I missing anything ?

Best regards,

Ashok.

Answers (1)

Answers (1)

Ash_ok
Contributor
0 Kudos

The trick was to add 'isacore' as a UsedDC in the CUSTCRMPRJ_1 project from the 'Active' tab as it is supposed to be from standard SAP.

Cheers,

Ashok.