cancel
Showing results for 
Search instead for 
Did you mean: 

Import MDM jars to DC

Former Member
0 Kudos

Hi All,

I have created a DC, I want to import a few MDM jar files to this DC. I tried copying the jar files into the lib folder of the DC and then set the path in the java build path, but when I try to build the DC the reference path that was set goes off and throws an error that it is unable to import those jars.

I also tried adding these jars as "add external jar" but it throws the same error saying unable to resolve the path.

Is there specific way we need to follow to add a MDM jar to a DC? The same code worked fine with a normal project, but not working when Iam using a DC. Please advise.

Regards

Suresh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Suresh,

When we use Local Web Dynpro projects it is easy to include the external JAR

files to support the Application, but, when using a DC External JARS cannot be

added to the Project in its Java Build Path.

For this we need to create External Librarry DCs.

Following are 2 blogs for doing this.

<b>Valery's Blog</b> /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro

<b>Bala's Blog</b> /people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas

Hope it helps.

Regards,

Alka.

Former Member
0 Kudos

Thanks...

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Suresh!

I actually went through Bala's and Valery's blogs. I tried to do the suggested steps with MDM jars, but I was not able to reach the jars on Portal. Could you please tell me, how you exactly imported the MDM jars?

Regards,

Peter

Former Member
0 Kudos

Hi Peter,

I was not able to do it because of a BUG in the Netweaver version i was using (Version: 7.0.09). So if you are using the same version I would suggest you to upgrade.

The procedure to import the jar is as below

1. Create a DC of type external library

2. You can see a folder "libraries" created there. Copy your jars to that folder

and then select those jars and right click -> add to public part

3. A dialog box opens, give a name to the Public Part and select the second

option (as you want to deploy them to the server)

4. Build the project

5. Create a DC of type J2EE -> Enterprise Application.

open the project in the J2EE development perspective, and go to used DC

right click there and add browse to the "DC of type external library" which you

created in the first step and select the public part which you created in the 3

step.

6. Build the project and a .ear file is created which will have your jars.

Hope this helps

Regards

Suresh

Former Member
0 Kudos

Hi Suresh!

Thank you for your detailed answer. I am developing a Local DC Web Dynpro workflow, using CAF GP.

The system I use: NetWeaver 2004s SP9 (Sneak Preview), and NetWeaver Developer Studio, version 7.0.07.

I also deployed com.sap.mdm.tech.mdm4j.sda which contains all the MDM jar files, but these cannot be reached using DCs as far as I know.

So thats why I need to create another Local DC which contains the MDM jars and after I have created it, I can add it as "Used DC" to my Web Dynpro type DC.

The workflow is going to be displayed on Portal so I need to create Callable Objects. After I got the following document, I started to develop my WD project as DC.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50d74ada-0c01-0010-07a8-8c118d408e59">Implementing a WD CO which Implements the GP Interface</a>

I went through the steps you suggested, after I have built the J2EE/Enterprise Application DC I deployed it. Then I added it to my WD DC as "Used DC" but the build failed, because of errors where the implementation uses the MDM Java API.

Have you any ideas what can cause the problem, or how to solve it?

Could you please tell me the version of NetWeaver, which solved your problem!

Thank you for your help in advance!

Kind regards,

Peter

Message was edited by:

Peter Ley

Former Member
0 Kudos

Hi Peter,

When you build the j2EE project (which has the external library project in it) a .ear file is created, copy it to your desktop and extract the file and check if the jar you included is present in the ear file or not.

If the MDM jar is present then probably the problem is in the deployment.

If it is not present then the problem is with the .ear file, and hence try recreating it again.

  • Also check if you have created the public part of type "<b>assembly</b>" and not compilation.

Let me know if you still have a problem

Thanks

Suresh

Former Member
0 Kudos

Hi Suresh!

In the External Library DC project when I added the jars to public part I always chose type "Assembly" ("Can be packaged into other build results(e.g. SDAs)" was checked). The build finished without errors or warnings.

By the J2EE project I added the External Library DC as "Used DC" with dependency: <b>Build Time</b>. After building the project I got the .ear file, but the MDM jars are not int it!

May I choose another dependency type?

Regards,

Peter

Former Member
0 Kudos

Hi Peter,

What you have done is perfect. Guess I got the problem. That is because of the bug in netweaver version you are using. There is a strange trick with which u can make it work, try this

First build the external library project. Then <b>close</b> the netweaver window.

Open it again and this time build <b>ONLY</b> the J2EE enterprise project (this time dont build the external library project) then check if the MDM Jars are present in the .ear file

There are few more bugs of this kind. So I would strongly suggest you to upgrade to the newer version than using this method.

Hope this works for you

Regards

Suresh

Former Member
0 Kudos

Hi Suresh,

I tried the trick you have suggested, but there are still no jars in the ear file.

So you say I should upgrade my SAP NetWeaver system, or just the NetWeaver Developer Studio? Which version do you suggest?

Regards,

Peter

Former Member
0 Kudos

Hi,

Try version

Version: 7.0.10 or above

Just upgrading the NWDS is enough.

Regards

Suresh

Former Member
0 Kudos

Hi Suresh!

I upgraded NWDS to 7.0.11. Now the build went fine, all the jar files can be found in the .ear file. I tried to set up the J2EE Enterprise Application DC as "Used DC" in my WD DC, but the build fails, the errors appear where I use the MDM Java API. Do you have any ideas what could cause this problem?

Thanks,

Peter

Former Member
0 Kudos

Hi Peter,

Have you created two public parts, one of compilation type and other assembly type?? If not do that. And include both the Public parts in your WD DC and then build. It should work.

Regards

Suresh

Former Member
0 Kudos

Hi Suresh!

The jars are now deployed! Thanks a lot, I appreciate your help!

I still have some problems, I made a new Thread for it:

Regards,

Peter

Former Member
0 Kudos

Hi Suresh..

Here the Manipulations of MDM..

Pls Go thru this link contains PDF...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/92811997-0d01-0010-9584-f7d53517...

URs GS