cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

External Library issue

Former Member
0 Likes
328

Hi,

We have a requirement in CRM B2B web shop where we need to access third party web service. We have all the required JARS related to webservice. I am working on NWDS 7.3. I am calling this service from one of the Z Class method created in home/shr/ext.

I have added external JARS by creating a new External library DC under SHRWEB and added dependency between home/shr/ext and newly created external libaray DC.

I have followed the below SAP help for this
http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/content.htm

I was able to deploy the application successfully but am getting NoClassFound Exception for one of the class which is there in jar file while calling this service, means the JARS are not available for the application.

Can any one please suggest how to resolve this issue.


Thanks,
Rajinikanth G

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Easy to solve this one.

You assigned your library to your Java Component, which is correct. This only allows the build envionment to locate your class and compile your code into a jar file.

This jar file is referenced by your  web-application (DC) and all depending jar files of your java DC are not added automatically. The war app therefore just knews your java DC jar file, but not the external library => Class not found exception.

You have to assign the external lib to your war file as well, then it becomes automatically stored in the lib folder within the *.war file, that you have added.

You can also use somehow the application-config.xml of the ear project to referece some libraries of other deployments (which would require also more work to make the external lib available in a different way), but this is a bit too complicate if you anyway just run a single web-application scenario.

Happy coding!

Former Member
0 Likes

Thanks Andreas.

How to add external jars to *.war. I already tried adding External Library DC as Used DC for crm/isa/b2b (where we have *.war). I did not see external jars in lib folder of *.war even fter adding External Library DC as Used DC for crm/isa/b2b.

Please suggest.

Thanks,

Rajinikanth G

Former Member
0 Likes

Create a public part of type assembly and then assign it as DC dependency within your *.war DC using the dependency build & design time (should be build time only, but does not hurt to flag both types). After build it will be within the *.war => Web-Inf/lib folder

Former Member
0 Likes

Thank you Andreas.

With the above, Now i am not getting NoClassFound Exception.

But now i am getting this exception - "

javax.xml.rpc.ServiceException: Error processing WSDL document: javax.xml.rpc.ServiceException: Cannot find service " for the third party web service.

Can you please suggest how to resolve this issue. I will create a new post if  required.

Thanks,

Rajinikanth G

Answers (0)