cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to add build ref to portal jar in web dynpro DC

former_member194198
Active Participant
0 Kudos

Hi All,

I've created a Web Dynpro DC which is stored in the DTR. I need to access the com.sap.security.api JAR file so that I can get user details in the web dynpro. My local web dynpro has a reference to this in its classpath.

Whenever I try to add a reference to this in the DC based web dynpro, the change is not reflected in the DTR so the build always fails.

I've seen postings that suggest you need to create an external library DC and extract all of the classes in the JAr into your web dynpro DC.

Surely there is a better way to access SAP provided API's then extracting them into your project.

Please help.

Richard

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Richard,

In a webDynpro DC if you are using a external Jar then you need to create another DC, in which you have to put that Jar and then exposing its component as a Public part.

Then you have to Add the Used DC in the project where you are using this jar file.

Actually what happens is, when you DC Build the project, a Internal JAR file is created specific to that project. When you add some external jar and build the project that are included in the project but it goes inside that generated Internal JAR file.

So inside the DTR, when it is taking the reference of the jar file it could not locate the direct path of the Jar file you have added. That is why you are getting the build error.

AFAIK, the best and the recommended way is to create another DC in which you put the JAR File and then using its Public part in the required DC.

I hope this helps you to solve your problem. For any further problems please revert back.

Regards,

Pravesh

PS: Please consider rewarding points if helpful.

Answers (1)

Answers (1)

former_member194198
Active Participant
0 Kudos

Your posting made me think that I should do a "DC Build" as opposed to a local build. This removes the problem of the missing JAR's as the DC build also gets the external library.

I also noticed that the "extracting all of the classes" method is only for SP11. Seen as we are using SP16, this is not a problem.

Cheers

Richard