cancel
Showing results for 
Search instead for 
Did you mean: 

Build problem with external JAR

Former Member
0 Kudos

Hello,

I am developing a custom web dynpro component. I need to use some of the JARs delivered by SAP such as com.sap.security.api (can be found in \SAP\IDE\IDE70\eclipse\plugins). I have included the JAR files to my project in Properties->Java Build path->Libraries). Everything is working fine: I can build/deploy the application and it is running fine in the application server.

Anyhow, the problem comes when I try to activate my activity in the development configuration perspective.

In the build log I can see for example the following:

[javac] ERROR: /usr/sap/VDD/JC10/j2ee/cluster/server0/temp/CBS/3/.B/4789/t/067D33924E6154CA5284F16652954F88/gen_wdp/packages/com/mydevelopment/mystuff/MyComponent.java:29: package com.sap.security.api does not exist

[javac] ERROR: import com.sap.security.api.IUser;

I have been reading several threads about similar issues, but I am not quite satisfied with the answers. There seems to be several opinions about how to solve this.

Now the questions are:

- How can I get rid of this error?

- What is the best practice in overall to use the SAP delivered JARs in custom web dynpro component/project.

Edited by: Pa Pa on Nov 21, 2009 2:07 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Pa,

To use any jar in your DC on NWDI track, you need to follow the following steps:

1. Go to Your project>Used DCs and try to add a new one by locating the DC among those which are already present on the track.

2. If you are not able to locate any DC with the required jars then,

a. Create an external library DC where you need to add all the jars in the library folder of the project using an activity.

b. Create public parts for compile time and run time for this dc.

c. Deploy the DC.

d. Goto src folder of your dc and say Add files to DTR (your jars would be on the track)

e. Deploy the external library DC so that the Jars are deployed on the portal server.

f. Add the public parts of this External Library DC under used DCs of your development component.

g. Add this external library under library references of your project.

h. Build and deploy.

i. Now try activating your activity.

Use the following link to know how to execute these steps.

[Add and Use Jars through used DCs|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm]

[Screen Shots|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID1078501850DB00490474849923920126End?blog=/pub/wlg/9517]

Please let me know, if you ahave any doubt.

Regards,

Tushar Sinha

Former Member
0 Kudos

I would say you should add a dependency from your DC to the public part of the DC that contains these jar files and not manipulate the build path of the Eclipse project.

Armin

Former Member
0 Kudos

Thanks. I think that it solved my (first) problem. I could locate the security API DC and create a dependency to it.

Now the problem is that for the other JARs that I need to use, I cannot locate a DC. They are:

bc.uwl.service.api_api.jar

bc.uwl.service.api_core.jar

(in folder \com.sap.netweaver.bc.uwl.plugin_1.0.0\lib)

Is there a way to locate a DC for these?

And if there for some reason isn't a DC for these, what would be the best option to use the JARs in my development?

Former Member
0 Kudos

If there does not exist a DC containing these jar-files (what I don't know but please check that first) then you can create a library DC and copy the jar-files into that. See

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm

Armin