cancel
Showing results for 
Search instead for 
Did you mean: 

Adding external Jar's to Web Dynpro DC

Former Member
0 Kudos

Hi All

I want to add external jar's to a web dynpro development component but when i add the jar and rebuild the project by right clicking on project and then Development Component ===> Build / Refresh from DC settings then automaticaly the added jar's get removed

Is there any other process to add the jar's in DC like what we do in normal dypro project. or what could be the issue. I add the jar by properties ===> Java Build Path ==> Add External JAR's

Please guide me I am totaly confused

Thanks

Ninad

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

try to paste the jar files in the 'lib' folder of the DC project..you will find the LIB folder in the navigation perspective the project..

Regards

AM

Former Member
0 Kudos

Hi Anoop,

I have already tried this but its not happaning for me

Thanks

Ninad

Former Member
0 Kudos

Put the ejb project in the projects required by the WebDynpro project (Java build path) in order to get it to compile succesfully.

<b>Now you have 2 options:</b>

1. You can then export your EJB methods as a web service and import these methods as a model in the WebDynpro project.

<i>After this you can call your web service (ejb methods) from your webdynpro app.</i>

2. Instatiate your EJB classes from jndi context as ejbs are normally used.

Context initctx = new InitialContext();
Object objref = initctx.lookup("java:comp/env/ejb/YOUR_EJB");
YOUR_EJB_CLASS myEJB = (YOUR_EJB_CLASS) objref;

<i>Call the methods from the myEJB object.</i>

<u><b>If this solves your situation, points would be greatly appreciated.</b></u>

Best regards,

Homer Vargas

SAP EP Development Consultant

SAP Web AS Development Consultant

SAP Andina y del Caribe

Former Member
0 Kudos

Hi Homer,

I was able to do these steps you mentioned in the post but the real problem is when i do same thing in a DC it gives me error while building the project. but it dose not find the JAR files which we include in the project those files i am not able to include.

so please tell me the steps to do same thing in Web Dynpro DC.

Thanks

Ninad

Former Member
0 Kudos

To add external jars to a webdynpro DC, you have to create a new DC called External Library DC and then define it as a dependency in your webdynpro dc.

Thanks,

Rajit Srinivas

Former Member
0 Kudos

Hi Ranjit,

Thanks for your suggestion but I don't find type <b>External Library</b> while creating DC so do we need to create some other type of DC? basically i want to call a EJB in Dynpro project so if you can suggest me how to call it.

Thanks

Ninad

Former Member
0 Kudos

Hi,

When you create an EJB DC, by default 2 public parts are created, client and ejbjar. Create a EAR DC, add the EJB DC to it so that it ejb dc can be deployed.

In your webdynpro dc, define dependency to client pp of ejb dc and you can then refer to the ejb in webdynpro.

Hope that helps,

Thanks,

Rajit Srinivas

Former Member
0 Kudos

Hi Rajit,

I created the EAR DC, also added the EJB module dc(ejbmoddc) into it. I added the EJB DC as used dc in my webdynpo dc.

When I build my EAR DC, it builds successfully. On deploying it I get an following error :

____________________________________________________________________

deployment not executed : file:/C:/DOCUME1/PBHANG1/LOCALS1/Temp/temp11146sap.comejbeardc.ear

Unresolved dependencies found for the following SDAs:

1.: development component 'ejbeardc'/'sap.com'/'LOCAL'/'20070124134029'/'0'

dependency:

name: 'ejbmoddc'

vendor: 'sap.com'

____________________________________________________________________

Please help me in this regard !

Thanks in advance.

Prasanna

Former Member
0 Kudos

Hi Ninad,

You can add the same using used DC.

Select the DC - >Go to DC Metadata - > DC Definition -> Used Dcs -> Add Used Dcs -> Select the which you want to add->Ok.

This will not give any error.

Regards,

Jhansi