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

Similar Messages

  • 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 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

  • 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

  • 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

  • Using External Library in Mobile Web Dynpro Offline

    Hi all,
    i would like to use a jar in a Mobile Application for Handheld and i followed the steps from the wiki "Using External Library in Mobile Web Dynpro Offline" at
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/usingExternalLibraryinMobileWebDynpro+Offline
    >How to use External Library in Mobile Web Dynpro Offline
    >For using external jar in local deployment scenario, one can do following:
    >1. In the dc where jar has to be used, add the jar as external jar classpath entry. It can be done via <dc> > (Right-click)> properties->Java Build Path->Select "add external jar".
    >2. Do the programming using the jar.
    >3. Shut down the mobile client.
    >4. Copy the jar in the "lib" folder of mobile client installation.
    >5. Deploy the application in the IDE.
    >6. Run the application.
    >In 5, the jar will not deployed and will be picked from the lib folder during 6.
    >...
    >Note: This will work on and after SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 (and after).
    i get a error at the deployment with the message "...package myres does not exist...":
        >echo:     C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_oca
          >echo:   class path:  C:Program FilesSAPIDECEeclipsepluginscom.sap.tc.ap_2.0.1.080222142948compXOCADCssap.com     cmobileocaapi\_compgendefaultpublicapilibjavasap.comtcmobileocaapi~api.jar
          >echo:   output dir:  C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5classes
         >javac: Compiling 16 source files to C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5classes
         >javac: ERROR: C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_ocacomsapdemoemployee_scserviceimplEmployeeService.java:8: package myres does not exist
         >javac: ERROR: import myres.TestA;
    there is only sap.comtcmobileocaapi~api.jar in the class path and myres.jar was not added.
    how can i fix my problem or does the steps in the wiki not work yet for SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 ?
    Thanks,
    Ismet

    Hi,
    1) in Development Infrastructure Perspective -> rightklick in Navigator/Projekt Explorer  -> new Project  -> (Development Infrastructure)  Development Component (DC).
    NWDS generates Project Ressources e.g. the folder "libraries"
    2) copy the jars to the "libraries" folder.
    3) rightklick on the newly created Development Component (DC) ->  Development Component -> Show In ->  Development Properties -> go to the Tab "Public Parts",
    in -> "Defined Public Parts" -> klick on Button "Add" -> give a name for "Public Part" -> at "Purpose" select "Compilation" -> Finish.
    rightklick on the newly created Public Parts -> select  "Manage Entities" and select the jars you want to use -> Next -> Finish.
    4) switch to the Mobile Apps for Handhelds Perspective ->  in Development Component  select e.g. the Service Component or the UI Component ->
    rightklick ->  Development Component -> Show In ->  Development Properties -> got to Tab "Dependencies" -> klick on Button "Add"  -> under the Node MyComponents -> select the newly created Development Component with the Public Parts/jars (that was created in 1 - 3).
    thats all, now you can deploy your application
    Regards,
    Ismet

  • Using External Library in a DC problem (SP16)

    Hi,
    I've been trying to get the example that Valery is outlining in his <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro">Blog</a>.
    I've done it exactly as Valery says, but I can't get it to work. I create the External Library DC, add the jar to Public Part (purpose Assembly) and build. Builds ok.
    I then proceed to creating the J2EE Library. It is created ok. I then add the External Lib I just created to Used DCs. This goes ok. I build the DC. There are warnings:
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    And:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    I've tried nearly every combination of Dependency Types When adding the used DC to J2EE DC. The jar never ends up in the SDA file in gen\default\deploy or jar in gen\default\public. I only get different types of warnings.
    Here is the whole build.log:
    Apr 7, 2006 8:48:00 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: js/lib: built with warnings orion.com/js/lib(MyComponents) in variant "default" (0.753 sec) :
    Build log -
    Development Component Build (2006-04-07 08:48:00)
      Component name: js/lib
      Component vendor: orion.com
      SC compartment: MyComponents
      Configuration: LocalDevelopment
      Location: local
      Source code location: jarpak@UFIES-JARPAK
      DC root folder: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\
      DC type: J2EE Server Component
      DC subtype: Library
      Host: UFIES-JARPAK
    DC Model check:
              [dcmake] All used DCs are available locally
              [dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/addLib"
              [dcmake] validating dependency to  public part "Tokenizer" of DC "orion.com/js/jars"
              [dcmake] DC model check OK
    Start build plugin:
              [dcmake] using build plugin: sap.com/tc/bi/bp/addLib
              [dcmake] starting build plugin from : C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\
    Build Plugin 'J2EE Library', Version 6.40 SP 16 (630_VAL_REL, built on 2006-02-13 00:17:07 CET)
       development component:  js/lib (orion.com)
          software component:  MyComponents (demo.sap.com)
                    location:  local
                        type:  J2EE Server Component, subtype Library
               build variant:  default
             source location:  jarpak@UFIES-JARPAK
           plugin start time:  2006-04-07 08:48:00 GMT+02:00 (EEST)
                     Java VM:  Java HotSpot(TM) Client VM, 1.4.2_03-b02 (Sun Microsystems Inc.)
    General options:
      convert *.xlf to *.properties: yes
      include sources for debugging: yes
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    Preparing data context..
    No 'default' JDK defined, will use running VM.
    Data context prepared in 0 seconds
    Executing macro file..
      Using macro file:     C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\macros\build.vm
      Creating output file: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
    Macro file executed in 0.482 seconds
    Starting Ant..
      Using build file:     C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
      Using build target:   build
      Generation folder:    C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426
      Using Ant version:    1.5.4
    prepare:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\int-pp
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sda
    compile:
    createPublicParts:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    packDeployArchive:
    [srcpacker] Creating source archive
    [srcpacker] No sources available for packing, no archive will be created.
         [timer] Source archive creation finished in 0.02 seconds
        [jarsap] Info: JarSAP version 20041217.1600
        [jarsap] Info: JarSAPProcessing version 20060104.1634 / JarSL version 20060106.1831
        [jarsap] Property jarsap.info.dir is not set.
        [jarsap] Building: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy\orion.comjslib.sda with compression
         [timer] JarSAP finished in 0.03 seconds
    build:
    Ant runtime 0.161 seconds
    Ant build finished with WARNINGS
    Build plugin finished at 2006-04-07 08:48:00 GMT+02:00 (EEST)
    Total build plugin runtime: 0.693 seconds
    Build finished with WARNING
    What am I doing wrong ?
    Kind Regards,
    Jari Pakarinen

    Hi,
    There is an issue with SP16 in using External library DC.
    Go through this Jars not included in J2EE Library DC SDA. This thread deals with the same issue.
    Hope this helps.
    Regards,
    Rathna.

  • 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

  • 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

  • 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

  • How to use external library(in .jar format) in netbeans project?

    How to use external library(in .jar format) in netbeans project?
    Thanks!

    How to use external library(in .jar format) in netbeans project?
    Thanks!

  • 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

  • Error when using Adobe form in Web Dynpro..

    I created an adobe form and gave the form name in template source property of interactive form in web dynpro component.The context node used in that form is automatically created. I pass value to that node using set_static_attributes. When I run the application I am getting an error msg 'Node <node name> does not contain any elements'.Can someone tell me how to solve this problem?

    Dear friend,
    Check the Below link
    https://www.sdn.sap.com/irj/sdn/adobe?rid=/webcontent/uuid/24b9e126-0b01-0010-e098-f46384fad9f3

Maybe you are looking for