Using external libraries in Web Dynpro DCs

Hi,
I've followed the example in the following blog for using external libraries in my Web Dynpro (WD) DCs:
/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro and some other messages in the forums. However, it isn't working exactly as described in the blog. I have to twist it a bit to get it work. I were wondering if anyone has any better solution for this problem?
The senario is like this:
- External libraries: a.jar, b.jar
- WD DCs: wd1, wd2 in that wd1 and wd2 are both using external libraries a.jar and b.jar; wd1 is a library DC that can be reused in wd2.
According to the example in the blog, the following steps are carried out:
- Step 1. Create an external library DC, add a.jar and b.jar to public part "ExternalLibs" as described in the blog.
- Step 2: Create, build, deploy “J2EE Server / Library” DC. (Add reference to the public part of the external library DC as a used DC, with both Build-time and Run-time dependency).
- Step 3: Create WD DC wd1, add used DCs and WD reference libraries as described in the blog. Add WD components as public part. Build and deploy WD DC wd1.
All are ok so far!
- Step 4: Create WD DC wd2, add used DCs and WD reference libraries as before. Try to build and FAIL!
The error occurs here because wd2 cannot access to the classes in the external libraries, similar to the problems described in thread Re: Problems with deploying a JAR file.
I've found a workaround, although quite tedious and cumbersom, but it works. My solution so far is:
- Round 1: Perform those 4 steps above, but in step 1, after adding the jars to the public part "ExternalLibs", set the property of the public part "purpose" to "compilation", then build and deploy all other DCs accordingly.
- Round 2: Change the public part "ExternalLibs" property to "assembly", then bulid and deploy all other DCs again.
And now I can reuse the external libraries in my WD DCs as well as WD DCs as library in other WD DCs.
I know it's not an elegant solution. So I were wondering if the experts out there can help me with better solutions?
Many thanks in advance for your help.
Regards,
Van
Edited by: Van Hai Ho on Dec 18, 2007 3:30 PM
Edited by: Van Hai Ho on Dec 18, 2007 3:31 PM

Hi Pascal,
Thank you so much for your help. Your suggestion has helped to make my life a lot easier.
Regards,
Van

Similar Messages

  • Use external libraries in web dynpro java

    Dear Experts,
    I need to add an external library to my project.
    Anyway, I do not know how to do it because it gives me many problems.
    I tried modifying the classpath and placing it in the lib folder of the project from "Navigator".
    Also project properties, add. jar outside, and throws me the following error:
    [javac] Compiling 213 source files to D:\WORK\WORKSPACE\7.2.jdi\LocalDevelopment\t\2BF09F48E6D0E2C201262098A0E4D79F\classes
         [javac] ERROR: D:\WORK\WORKSPACE\7.2.jdi\LocalDevelopment\t\2BF09F48E6D0E2C201262098A0E4D79F\gen_wdp\packages\elsys\com\.....\wd\comp\....\MainView.java:34: package com.estaf does not exist
         [javac] ERROR: import com.estaf.jpay;
         [javac] ERROR:             
    Given these errors, I know my includes without problems and I can instantiate objects from library classes, but these errors I can not deploy.
    I read the following link:
    /people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-ii
    I did everything the tutorial. I created the external library. I can see in my project "DC-Definition -> Used DCs" The public parts assembly and compilation. Now the problem is that it still does not recognize the classes of the libraries you want to use.
    A level of code, when I try to instantiate the class does not recognize me. What could be missing? I did a couple of times step by step and gives me the same results.
    I use SAP NetWeaver Developer Studio SAP NetWeaver 7.2 SP03 PAT0007 version.
    Infinitely appreciate any help. Thank you very much.
    Rasim
    Edited by: Rasim Donmez on Apr 11, 2011 4:50 PM
    Edited by: Rasim Donmez on Apr 11, 2011 4:51 PM

    Hi,
    please find below path for adding External Jar files.
    right click on the webdynpro dc and select the properties .
    then clcik on Java Build path->select libraries->select External External Jars.
    after that just rebuild your project (not Build).
    Regards,
    Govindu
    Edited by: Govindu Nagotla on Apr 12, 2011 2:28 PM

  • Problem with external libraries and Web DynPro

    Hello,
    we're stuck here.
    We're trying for a week now to include external libraries(e.g. Hibernate) into our Web DynPro Project, without success so far.
    We read every single forum and blog entry we could find on this topic.
    E.g.: /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
    We're running Netweaver 2004s SP9 Trial Version.
    The biggest problem is, that when we deploy an J2EE Server Component Library DC exactly like described in the blog entry above, although it is deployed correctly an lists under Server->Libraries in Visual Administrator, the external hibernate.jar doesn't get deployed onto the server. It's just an empty container named hib/lib without any entries in "Jars Contained". The sda file of the library DC also has only 2K and doesn't include the hibernate.jar which we added as used dc...
    Any help would be greatly appreciated.
    Or is there a simpler way to include external jars into Web DynPro Projects and deploy them to the server? (We already tried putting them into the lib folder without luck, we always get "NoClassDefFound...")
    Edited by: Christian Wieland on Jan 31, 2008 11:22 AM

    Hallo Christian,
    this is a bug which should be fixed in NW 7.0 SP9 patch1: [Look at this forum thread on the same issue: External Library DC in NW2004s SP09|External Library DC in NW2004s SP09].
    Regards, Bertram

  • Using External java within web dynpro DC

    Hi
    I'm new in web dynpro and I'm facing a problem.
    I'm doing a web dynpro DC application and I want to use some external java classes I have created into my DC. But I don't really know how to do it, I tried EJB but I don't exactly how it works.
    by the way, I was using a stand along web dynpro before and this worked fine, I just needed to create a package within my web dynpro project with all my class architecture to have them directly. but now with the DC stuff, it's not the same at all. so please help
    thanks

    Hi
    Better you create a Java Development component and add all your java classes to that DC and build it.
    Create a webdynpro DC to develop front end and add the java DC in used DC's of your Webdynpro DC.
    This is the way you can use the java classes effectively with out redundancy.
    If you create a package inside a normal webdynpro project, then you can not reuse them later in other webdynpro proj
    Go with SAP component model by creating 2 development components one for java and other for webdynpro and define the reusability (Used DC's) in DC Metadata.
    Regards
    Kalyan

  • Using External Library in Web Dynpro - Error

    Hello,
    I want to use an external library in a web dynpro. I use WAS 6.40 SP12.
    1. I have created an dc web dynpro app
    2. I have created an dc external library app
    3. I have importet the jar to the external library
    4. I have published the jar as public part
    5. I have imported the public part to web dynpro
    If I build the project I get no error. If I deploy an run the project then I get an error stacktrace:
    java.lang.NoClassDefFoundError: com/sap/netweaver/bc/rf/util/uuid/UUID
    NoClassDefFoundError - I think the jar-file was not deployed. What is wrong?
    Greetings
    Thomas

    Hi THomas,
    Please explain how you are adding the jars into the publicpart of the Libary DC.
    You need to create 2 public parts .
    1. Assembly
    2. Compilation
    You need to add your jar to above two public parts.
    Then you need to add above two publicparts to your webdynpro application.
    Regards, Anilkumar

  • Using external libraries with Developer Studio 7.1 Composition Environment

    Hi,
    I downloaded DS 7.1 CE and tried to develop a simple application which uses an external library.
    I created a development component for "external library" for the local development -> MyComponent, giving it the name "test2" (for the domain basis).
    I imported the external library file using Import -> File System , then selecting the .jar file.
    In the component properties browser I added a public part naming it "mylib2" setting the purpose to "ASSEMBLY" (my intention was that the libarry will be transferred during the deployment to the application server).
    I right clicked on the public part to "managed entities". I selected the archive tree and checked the library file shown there (the one I imported before). #
    Then I opended component properties of my web dynpro project and clicked on "Dependencies". The I chose "Add..." and selected the "test2" development component I created before (see above).
    Then I tried to deploy the project (which uses this external library) using "Deploy Archive and Run"
    After deployment the browser window opens and shows the ClassNotFoundException
    So what did I oversee or do wrong?
    BTW: Is it necessary for using external libraries to use a full fletched NWDI? Or can I use external libs also with netweaver development environments freely available for download on sdn.sap.com?
    Any hints?
    Thanks a lot
    Hannes

    Hannes,
    If you want to use external libraries with DCs then you should follow the NWDI completely.
    Check this step, otheways of using external libraries is mentioned <a href="http://help.sap.com/saphelp_nw70/helpdata/en/e3/de813e77d46245e10000000a114084/frameset.htm">here.</a>
    Regards
    Abhilash

  • External Library in Web Dynpro DC

    Hi All,
    I am trying to use an external library in my web dynpro development component. I have already followed the steps that are named in other threads which are:
    1. Create an External Library DC, add the library to the lib folder, and then add the library to two public parts (one for compilation and one for assembly). This DC builds correctly.
    2. Create a J2EE Server Library DC, and reference in the Used DCs the External Library DC Public parts (on the assemble one I checked the Runtime Dependency Flag).
    According to the other threads I have read when I build the J2EE Server Library my sda file should contain the jar file so it would get deployed in the WebAS, but in my case it doesn't work, and the building process displays the following warnings:
    <i>Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    [cda] WARNING: Ignoring invalid runtime dependency on xlsjar (sap.com), type External Library</i>
    I guess they clearly show that my jar file will not be added to the sda file.
    Anybody knows why I am getting such warnings and what could I do to upload and use my jar file in Web Dynpro DCs?
    Thanks for all the help you can get me.
    Best Regards,
    Juan Daniel Riveros R.

    Hi,
    This is the thing mentioned in the SAP note for Netweaver Developer studio.
    i am pating the same point which is mentioned in The SAP note 891223 below.
    NetWeaver Developer Studio
    Note that even if you update the Build Plugins in a CMS Track, the Development Components developed within the "Local Development" configuration of the Developer Studio (NWDS) are not affected by this action! This local configuration is a static pool of archives shipped with the NWDS without any connection to NWDI services.
    Could any one please let me know how to make my local component work in NWDS 7.0.09 which use the external library DC.
    One more thing i dont have any idea how to apply the patch to NWDS.
    It is also mentioned how to do it in tracks plz let me know about Local Componenets.
    Thanks & regards,
    Lokesh

  • External jars in Web Dynpro for Java CE 7.1.1

    Hi there,
    Can you give me some guidance for including external jars in Web Dynpro for Java (CE 7.1.1)?
    I vainly tried for some hours now to get my external jars running in the new version of web dynpro (part fo Composition Environment 7.1.1).
    The routines described in some other threads didn't help me. For example, in CE 7.1.1 there's no DC Metadata that would allow me to add an external library.
    FYI, in the error message during build it simply says the package is not found.
    My error is javac ERROR: D:\test.jdi\LocalDevelopment\DCs\demo.sap.com\retail\_comp\src\packages\com\sap\demo\retail\javafiles\DomParser.java:12: package com.sap.semprom.retail.sc does not exist
    javac ERROR: import com.sap.semprom.retail.sc.BoundEvent;
    Thx in advance!
    Holger

    See http://help.sap.com/saphelp_nwce10/helpdata/en/d7/fc139ba1549047a5372ad3c0d540ea/frameset.htm
    under "External library".
    Armin

  • How to use a CAS in web dynpro with NWDS 7.0

    Hi, all.
            I implemented a cas project (some entity services and application services). Now I want to use it in a web dynpro project.
    I know how to do that with NWDS 7.1, but it seems  something differernt with NWDS 7.0.
    Can  anyone give me a hand?  Thanks.

    hi
    CAF Core project comes with a sub-project WebDynpro.
    You can implement business logic using CAF Core Service ,integrate it in WebDynpro UI.
    1)Select your CAF project root , right click on it and select u201CCreate Web Dynpro Modelu201D from the context menu.
    2) Switch to the Web Dynpro Perspective
    3)You can find  the CAF Core services have been generated and are available to the WebDynpro component.
        you can find caf services under modelclasses of webdypro project .
    4)Then you proceed with creating component etc..
    Regards
    sowmya.

  • Using .properties file in web dynpro

    Hi,
    I am having a requirement. I have to create a .properties file and I have to use it in my web dynpro application. How can I do that? Any help...
    Thanks & Regards,
    Raj

    Hi,
    Go to the navigator view...select src\Components\<ComponentName> and create create a .properties file.
    You can read the  configuration file in your webdynpro app as follows
    IWDConfiguration configuration =
          WDConfiguration.getConfigurationByName(
            wdComponentAPI.getDeployableObjectPart(),
            "<<>>");
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/aa343e32ff1033e10000000a114084/frameset.htm
    Regards, Anilkumar
    Message was edited by:
            Anilkumar Vippagunta

  • Using FREE-SELECTIONS_DIALOG in Web Dynpro

    Hi Experts,
    I want to transfer a report whicht uses the FREE_SELECTION_DIALOG Function into Web Dynpro.
    Is it possible to use this function with Web Dynpro?
    The aim is to generate a list on the left side of the screen with different attributes from a dictionary table.
    By clicking on an attribute it should open the select-options for this field. The inputs should be saved.
    In the End I want to select data from a list that fit to all of the inputs.
    Thanks for any ideas!
    Martin

    any help..

  • Using macromedia flex in web dynpro

    how can i use flash object in web dynpro for displaying charts instead of using the webdynpro default charts .
    i want to use from NWSD not through the portal ..

    Hi Valery,
    I didn't say that it is the only solution. But this could be one of the solutions. Now, it depends on the requirement whether need to use it or not.
    Hi Yashpal,
    No need to use WDURLGenerator service. You can directly give flash object name which you have imported in mimes->components-><package>.
    Regards,
    Bhavik

  • Using external libraries in eSWT on 7.1

    Hi again.
    Is it still possible to use external libraries when developing applications for Handhelds on Mobile 7.1 (eSWT)? Or do we have any restrictions here?
    Thanks,
    Sascha

    Hi,
    as long as your have POJOs it should be ok to use them still.
    Regards,
    Oliver

  • Using external libraries in DS 5.2 plugins

    Hello,
    I'm writing a moderately complicated preoperation plugin for Directory Server 5.2, and I've linked in glib 2.0 so I can use some of its data structures. Aside from some memory leaks I'm tracking down, things look okay, and the plugin behaves as expected.
    Are there any reasons why I should avoid using external libraries in the directory server? I know that SLAPI has its own memory management code that glib isn't using, but I don't think that's the reason I have the leaks.
    Thanks!
    -lars

    Plug-in library code runs inside the memory space of the server process, so it can be nice to have the memory management from the API.
    Also if you have things coming in from all over the place, maybe there's a higher security risk, since there are more places where somebody could replace a dynamic library and do bad things when you load that code.
    I don't recall us putting anything in the docs that said you should make a special effort to avoid doing linking out to external libraries. (If it's there, I don't see it with a quick google search.)
    Mark

  • Using external libraries over signed Java applet: InvocationTargetException when running locally with 7u51

    We have a signed Java applet that uses external libraries, specifically the OpenOffice application libraries.
    We have a problem running Java applet with 7u51 of "InvocationTargetException" when use these libraries OpenOffice, that is not signed; regardless of the browser used (Mozilla Firefox, Explorer, Chrome).
    Please, as you could solve this problem?   This problem can not arose with 7u40 and earlier..
    Best regards.

    In  java - JRE 1.7.0_51-b13 and signed applet - Stack Overflow found solution. I've missed to add in external jars manifest this: 
    Trusted-Library: true

Maybe you are looking for

  • How to migrate rtf Templates in XML Publisher ?

    Hi All, I want the script so that i can download and upload the RTF files directly from my development instance to my production instance. For this i have come across 3 links How to migrate rtf Templates in XML Publisher? http://download.oracle.com/d

  • Is there a way to open form as if from different responsibility in R12

    Is there a way to open form as if from different responsibility in R12. Have tried to call FND_GLOBAL.apps_initialize but it did not changed a thing.

  • Adding Safari Plugins to iPhone 3GS

    I occasionally try to open a webpage on my iPhone & get a message stating I need to download a plug in. Is it possible to download the plugins?

  • Synchronous pulse generation

     Hi all, I need to generate synchronous pulses from my USB device NI M6289 connected with BNC2120 on connector-0 and SCB68 on connector-1. I need to operate 8 chips which are connected in parallel with power supply,with only one chip at a time. Two p

  • Best Uncompressed for HDV 50i?

    Hi there, I did a video in FCS2, its an HDV 50i project and I have to deliver in the best quality possible for computer, its to be reedit, what settings should I use?? Cheers Javier