cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent help needed

Former Member
0 Kudos

I am having no luck creating an external library DC. I have Netweaver 6.40 SP11.

I have a JAR file that I would like to use in a WebDynpro component - this must be a DC Component and NOT a WebDynpro Project.

If anyone can provide me with a step-by-step idiot's approach to doing this I would greatly appreciate it.

Walter

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

1. Create External Library DC

2. Add jar(s) to libraries folder (use Package Explorer)

3. Add jars to public part (since you have SP11, you automatically get a public part for compilation called "External Libs")

4. Build the DC

5. Create a Web Dynpro DC

6. Add the External Library DC as Used DC.

7. Edit the Used DC, select the Design time and Build time options (I've seen that selecting them when creating the DC Usage does not work properly in NWDS SP11)

You should now be able to use all classes from the jar and the Web Dynpro DC should build successfully.

The Web Dynpro will NOT run though, because the jar is not deployed with the Web Dynpro application yet. Solve this as follows:

1. Create a public part for assembly in the External Library DC

2. Add the jar(s) to this public part

3. Select Sync Used DCs from the context menu of the Web Dynpro DC to make sure that it becomes aware of this change to the External Library DC

4. Create a public part for assembly in the Web Dynpro DC

5. Open the Entity References node of this public part and select the Edit option from the context menu

6. Add the public part for assembly from the External Library DC

7. Build and deploy the Web Dynpro DC

It should work now.

Former Member
0 Kudos

Hi,

After creating javaDC , you need to create a public part.

Now build the project then you can see the folder structure.

Regards, Anilkumar

Former Member
0 Kudos

Hi,

1. Create DC of type java.

2. Create a public part for this DC.

3. Now build the DC once. Then you can see a folder like

\gen\public\<PublicPartName>\lib\java in the project.

4. Place the .jar file inside the above mentioed folder.

(Please do not build the DC after atep no 4).

5. Now go to the WebDynpro DC and refer to the above javaDC by usedDCs.

This should work.

Regards, Anilkumar

Former Member
0 Kudos

Thanks Anilkumar, but I got stuck at your 3rd step:

3. Now build the DC once. Then you can see a folder like

\gen\public\<PublicPartName>\lib\java in the project.

No such folder was created.

Any ideas?

Former Member
0 Kudos

Hi,

One more solution

1 .Create a java DC

2. Place the JAR file you want to expose in the public part of the java DC.

3. Use the javaDC in the webDynpro project by including in the usedDCs.

Regards, Anilkumar

Former Member
0 Kudos

Hi Walter,

There is other way around also for your problem.

IF you want to use this JAR file in this webdynpro applixcation only then follow these steps:

1. Goto nevigator view.

2. Expand node of your Webdynpro project.

3. Right click on the lib folder in it.

4. Choose "import.." and there choose "File system".

5. Now browse your JAR file which you want to import and then click finish.

It will import this JAR file in your Webdynpro project.And it will deploy also with your application on server.

Regards,

Bhavik

Former Member
0 Kudos

Hi Walter

1. Create a Development component

2. Unzip the Jar file and copy the folder into src/packages folder of your DC

3. Expose this folder as public part in your DC (Use Java Package tree )

4. Build and deploy the DC.

5. Use this DC in other components where you need the Jar file

Let me know if your require any additional help.

Regards

NagaKishore V

Former Member
0 Kudos

Hi

Firstly, thank you for responding. Unfortunately I am not able to succeed with what you said.

I would greatly appreciate a click-by-click instruction of how to implement the steps you outline.

For example:

1. Create a Development component

  • I created a new Project -> Development Component Component Project of type J2EE Server Component -> Library.

Is this correct?

2. Unzip the Jar file and copy the folder into src/packages folder of your DC

  • I do NOT have a src/packages folder in the project I created in step 1! But I did create a "packages" subfolder in the "src" folder, and unzipped my jar file to there.

3. Expose this folder as public part in your DC (Use Java Package tree )

  • This is the main place that fails. How do I do this??

I right-clicked "Public Parts", then chose "New Public Part". I selected the radio button "Provides an API for developing/compiling other DCs" and click "Next". Now I am not see the folder "src/packages" for selection!! What is wrong?

I did try something else: I opened the DC Explorer path "DC MetaData"->"CD Definition"->"Folders".

I right-clicked "Folders" and chose "Add Package Folder", and pointed it to the "src/packages" folder.

I now went back to the previous step, and WAS able to select the folder where I had opened the jar file, but the checkboxes for "Add Entity to Public Part" ("as Class" and "as Source") remain disabled.

Thanks in advance for your help,

Walter

Former Member
0 Kudos

Hi Walter,

Create a DC of type webdynpro.

after creation, you will see packages subfolder under src in navigator view

copy the unzip jar folder

right click at packages node (in navigator view) and paste. this node will have sub node after paste

now when creatye new public part, (after name and description and click next), click at folder in select entry type, you'll see all the folders of the unzip jar in Select Entities after expanding the node.

Rgds,

Vilish

Former Member
0 Kudos

Hi Vilish

After opening my jar file in the packages folder, I see lots of subfolders and class files.

When I create a new public part, how exactly do I create it?

Please expand on all the steps after this.

Thanks,

Walter

Former Member
0 Kudos

Please do not use the approach of unzipping the jar file and adding it to your Web Dynpro DC. This is (very) bad practice: If you need this in other DCs as well, you're gonna have a lot of work, especially if the involved jar gets an updated version in the future. You started off good by trying to do it with an External Library DC. Check my post at the bottom for more info.

Former Member
0 Kudos

hi walter,

have u done copy / paste the jar folder in src/ packages.....

if switch to web dynpro explorer, expand your DC node,

expand DCMrtaData

Right click Public part > select New Public Part >Give Name, Caption , Description in the open wizard and click Next

click at folder in select entry type, you'll see all the folders of the unzip jar in Select Entities after expanding the node.

select all or Required folders

Rgds,

Vilish