cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get J2EE Library to work as described in blog

Former Member
0 Kudos

I've been trying to follow the directions in this <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro so that I can use a 3rd party jar file in my web dynpro application.

Everything is fine until Step 2 section labeled "Add used DC (External Library) to J2EE library". After adding the Public Part of my External Library as a Used DC to the J2EE Library DC and building it I don't see the jar file in the generated SDA file.

This (using jars in Web Dynpro) is something I've been trying to do for a long time. I finally opened an OSS message and they referred me to the blog above. I've tried this several times from scratch with the same result each time.

Has anyone been successful doing this with the NWDI? I am not using local DCs as described in the blog. I'm using Netweaver2004s (vers 7.0.09).

Any help would be greatly appreciated.

FYI, here are the steps I went through:

- Create DC of type 'External Library'

- Add the jar file in the folder named 'libraries'

- Create two Public Parts:

1) Compile - with 'Provides an API for developing/compiling other DCs' radio button selected

2) Deploy - with 'Can be packaged into other build results (e.g. SDAs)' radio button selected

- Create a DC of type J2EE Library

- Create a Used DC and selecting the 'Deploy' Public Part from the External Library DC

- Select 'Development Component | Build' to build the J2EE Library DC

- Opened Windows Explorer and found the generated SDA file in the '*_comp\gen\default\deploy' folder

- Opened the SDA file and found only the following files in it:

1) Manifest.mf

2) Sap_manifest.mf

3) sda-dd.xml

4) provider.xml

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi David,

if you are not using local DCs: What version of SAP_BUILDT do you have in your track? There was a patch for SP09 that should fix the problem you're describing, maybe you still have the unpatched SP09 version?

Regards,

Marc

Former Member
0 Kudos

Marc,

One of my contacts at SAP did mention a patch and had me download it. I had to leave the office for a week so I haven't tried it yet.

Again, what's frustrating about this whole exercise is that it seems so hit and miss. I'm not knocking SDN because I understand that it's just a bunch of people like me trying to help others.

But when SAP support gives you different responses or sends you to blogs that don't work then you just want to scream.

Oh well. I'll give the patch a shot and see what happens.

> Hi David,

>

> if you are not using local DCs: What version of

> SAP_BUILDT do you have in your track? There was a

> patch for SP09 that should fix the problem you're

> describing, maybe you still have the unpatched SP09

> version?

>

> Regards,

> Marc

Former Member
0 Kudos

As Marc said, this was caused by an unpatched version of sp9.

OSS referred me to note 993799 and that took care of the problem.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi David,

Please try the steps given in the following <a href="/people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas given by Bala Krishnan.

It has always worked for me for both NWDS 2004 and NWDS 2004s versions.

Hope it helps.

Regards,

Alka.

former_member186016
Active Contributor
0 Kudos

Hi David,

Please go through these threads:

->

->

->

Seems to be some problem with version of IDE.

For now, you can do the workaround mentioned by me in the thread:

It might solve the problem for now.

Best Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Thanks for your reply. Unfortunately, this just confused me more.

Obviously, all the posts deal with the same problem but I still don't see that there is a solution.

In one section of a post it says to copy the jar file directly into the SDA file. In another, it says you don't need to.

In another it says you can add the jar file manually to the EAR file of the web dynpro project.

In another it says you MUST create an entity reference and later in the same post it says you don't need to.

In one post it says it's a problem with the version and in another it says it's not. Although, I suspect that probably IS the problem because it seems to be a common thread.

<b><rant></b>

This is so frustrating!

All I want is for SAP to tell me if this IS a problem with a specific version and which version fixes it. If it is not a problem with the version then I want SAP to tell me how to do this.

It's not like I'm some newbie that doesn't know what he's doing. I've been working with NWDS for 2 years now although most of that has been with normal J2EE development instead of Web Dynpro. What I'm trying to do here I've done many, many times in J2EE development.

I understand it's different in Web Dynpro but, for crying out loud, why can't SAP tell me the exact process that WORKS!?

I've opened OSS messages about it and provided all the information they've asked for. STILL it doesn't work. The end result of all that was that they sent me to the blog referenced in the first entry of this post.

It's really frustrating that SAP support would direct me to SDN posts instead of taking the time to actually review my problem, figure it out and answer it.

For example, OSS support directed me to the blog mentioned in the first entry of this post but then another SAP consultant (who, frankly, I trust more than OSS support so far) tells me that the blog is incorrect and OSS should not be sending me to it.

It seems like a cop-out by OSS to just send me to blog entries (especially if they're not accurate!) or SDN entries instead of directly answering my question.

<b></rant></b>

Sorry for the rant but I fell a litle better now. : )

Still no solution, though.

Any help would be greatly appreciated.

FYI - if I haven't mentioned it, I'm using Netweaver Developer Workplace 2004s SP9

former_member182372
Active Contributor
0 Kudos

David, open "Package explorer" view in NWDS, select your 'External Library' DC there, refresh the tree (from context menu "Refresh"), expand 'libraries' folder, right click on your jar, select "Development component->add to public part", add it to "Deploy" public part. Complete the rest as you described.

former_member186016
Active Contributor
0 Kudos

Just taking the steps from the threads i mentioned:

1) Create External Library DC.

2) Add the jar under libraries folder in the DC.

3) Expose this jar as public part.While exposing select "Can be packaged in other build result (e.g. SDA)"

4) Create the J2EE Server Component of library type.

5) Add the External Library DC as used dc in the J2EE dc.

6) Build the J2EE dc.

Check the sda. It should have the jar from External Library DC.

I think you are doing these steps correctly. With SP18 and SP19 NWDS everything works very correctly there.(Followed the steps mentioned above only)

About copying of jar to the sda: Yes it is <b>not recommended</b> and hence in that thread it was said by not to do it. But still as a <i>workaround</i> it can be done. The library dc will not changed very frequently and hence this is a possible workaround. This will not damage your work but is not a nice practice, hence it is not recommended.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

I've been away from the office so I'm just now getting back to this.

I've already done what you describe. That's what I meant by "Create two Public Parts"

former_member182372
Active Contributor
0 Kudos

David, post the content of your .pp file from def folder.

Former Member
0 Kudos

Here it is:

<?xml version="1.0" encoding="UTF-8"?>
<public-part
  xmlns="http://xml.sap.com/2002/11/PublicPart"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.sap.com/2002/11/PublicPart ppdef.xsd"
  version="1.0.4"
  xmlns:IDX="urn:sap.com:PublicPart:1.0">
  <name>deploy</name>
  <purpose>assembly</purpose>
  <caption></caption>
  <entities>
    <entity>
      <name>log4j.jar</name>
      <package></package>
      <caption>log4j.jar</caption>
      <description></description>
      <entity-type>Archive</entity-type>
      <entity-sub-type>Java Library</entity-sub-type>
    </entity>
  </entities>
</public-part>

> David, post the content of your .pp file from def

> folder.