Help need in Adding External jar files.

Hi all,
Iam developing ADF application using JDEV 11.1.1.3.0.
I need to move files from one directory to another so i have used external jar "commons-io-1.4.jar" file.
i did this by going to the project properties -->Libraries and Classpath -->Add Library
added the jat file.
In java class i have used the function
File.copyFileToDirectory(reQueueFile, TargetLocation,false);
it was working fine when i tried in IntegratedWeblogic server but when i deploy in Standalone Weblogic server its not getting the jar file.
Its throwing me the exception
javax.el.ELException: java.lang.NoSuchMethodError: org/apache/commons/io/FileUtils.moveFileToDirectory(Ljava/io/File;Ljava/io/File;Z)V
at com.sun.el.parser.AstValue.invoke(AstValue.java:161)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1303)
Please let me know is there a way of adding the lib to the project.
Regards,
Suresh kumar.k

First you should check that the library has the checkbox 'Deploy by default' is checked for your library.
The you open the project properties of the view controller project, select Deployments, edit the deployment descriptor. Select the Node 'File Groups'->'WEB-INF/lib'->'Contributors'. this should give you a list of libraries your project uses. Check if your library has the checkbox checked (is selected fro deployment). If it's not checked, set it.
This should include the library.
Timo

Similar Messages

  • Exception while adding External Jar files in NWDS

    Dear Friends,
                            Actually i am adding an external Jar file in my EJB Module in NWDS.I am using this jar file for converting XML to flat file and i am calling this module from Receiver ommunication channel.For this process, i am importing dom4j.jar file in the EJB Module.
                          Now i have created an external Library project for the cause that i have used the external jar file, and i have made following code in the provider.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
    <provider-descriptor>
         <display-name>
          XML2EDI_Library
        </display-name>
         <component-name>
          XML2EDI_Library
        </component-name>
         <major-version>6</major-version>
         <minor-version>40</minor-version>
         <micro-version>0</micro-version>
         <provider-name>
          dom4j.org
        </provider-name>
         <references>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.Document</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.DocumentException</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.Element</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.io.SAXReader</reference>
         </references>
         <jars>
              <jar-name>EDI_Module.jar</jar-name>
         </jars>
    </provider-descriptor>
    I have included 4 references because i have imported following in my ejb module.
    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.Element;
    import org.dom4j.io.SAXReader;
    I am not sure of wht to include in reference target and provider name, I am getting the following exceptions in Message monitoring:
    1. AO: Document Exception: org.dom4j.DocumentException: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
    2. Nested exception: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
    Help me in this issue..
    Thanks in advance
    N.Jayanth Kumar

    thanks for you help sidharth.
    i have now jar files in the server and the application  referring to the jar files. everything is deployed fine. however, when i start the application..i get the error -"package jcifs.smb does not exist". the jar i am using is jcifs-1.2.7.jar. in my web module when i expand the jar i see the package and the .class files inside. what am i missing?
    Also, i din't define a SharingReference to usermanagement in portalapp.xml as i am working towards a pure j2ee enterprise application. the web module (DC) referes to the jar files. is there any step similar to defining the sharing reference for the web module DC?
    please help. thanks - sowmiyar

  • Adding External Jar files

    Hello,
    I have successfully created and deployed a portal application project (par file) that required adding as an external jar the file com.sap.portal.usermanagementapi.jar. Now I am re-doing the project as a development component in NWDI and I can add the external jar file fine and the source code shows no errors. However as soon as I build the DC I get a  source error that says the import to com.sap.ip.portal.service.ume.IUserManagementEngine can not be resolved. If I go back to the java build path the usermanagementapi.jar is no longer there.
    Do I have to handle the adding of external jar files in a different way for a DC as opposed to a par project?
    Thanks,
    Bert

    thanks for you help sidharth.
    i have now jar files in the server and the application  referring to the jar files. everything is deployed fine. however, when i start the application..i get the error -"package jcifs.smb does not exist". the jar i am using is jcifs-1.2.7.jar. in my web module when i expand the jar i see the package and the .class files inside. what am i missing?
    Also, i din't define a SharingReference to usermanagement in portalapp.xml as i am working towards a pure j2ee enterprise application. the web module (DC) referes to the jar files. is there any step similar to defining the sharing reference for the web module DC?
    please help. thanks - sowmiyar

  • Adding External jar file in webdynpro in CE 7.1 EHP 1

    Hi,
    How to add external jar file in webdynpro component. I am using CE 7.1 EHP 1 SP04 .Public part of external library is used in the webdynpro dc.  I created Enterprise Application and used that in runtime in the wybdynpro dc also.
    I am not getting any error at the time of deploy but at the time of activating getting the following error.
    ERROR: E:\usr\sap\CED\J10\j2ee\cluster\server0\temp\CBS\1\.B\354\t\65FFED04CAA1231EE16A570686EC24D6\gen_wdp\packages\com\sap\home\ovsuser\ovsuserapp\comp\OvsUserComp.java:23: package com.sap.security.api does not exist
         [javac] ERROR: import com.sap.security.api.ISearchAttribute;
         [javac] ERROR:                             ^
         [javac] ERROR: E:\usr\sap\CED\J10\j2ee\cluster\server0\temp\CBS\1\.B\354\t\65FFED04CAA1231EE16A570686EC24D6\gen_wdp\packages\com\sap\home\ovsuser\ovsuserapp\comp\OvsUserComp.java:24: package com.sap.security.api does not exist
         [javac] ERROR: import com.sap.security.api.ISearchResult;
    Please help.
    Raktim

    Hello Raktim
    com.sap.security.api should be available within NWDS plugins and should work fine if you add sap-jee DC as used dc.
    For external jars check this link
    [http://wiki.sdn.sap.com/wiki/display/Java/Externaljarfileerrorand+Solution]
    works fine in netwever 7.01 .
    Regards

  • Adding External Jars in Module development

    Dear Friends,
                            Actually i am adding an external Jar file in my EJB Module in NWDS.I am using this jar file for converting XML to flat file and i am calling this module from Receiver ommunication channel.For this process, i am importing dom4j.jar file in the EJB Module.I have created a jar file for that module,
                          Now i have created an external Library project for the cause that i have used the external jar file, and i have made following code in the provider.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
    <provider-descriptor>
         <display-name>
          XML2EDI_Library
        </display-name>
         <component-name>
          XML2EDI_Library
        </component-name>
         <major-version>6</major-version>
         <minor-version>40</minor-version>
         <micro-version>0</micro-version>
         <provider-name>
          dom4j.org
        </provider-name>
         <references>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.Document</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.DocumentException</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.Element</reference>
              <reference
                   provider-name="dom4j.org"
                   strength="weak"
                   type="library">org.dom4j.io.SAXReader</reference>
         </references>
         <jars>
              <jar-name>EDI_Module.jar</jar-name>
         </jars>
    </provider-descriptor>
    I have included 4 references because i have imported following in my ejb module.
    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.Element;
    import org.dom4j.io.SAXReader;
    I am not sure of wht to include in reference target and provider name, I am getting the following exceptions in Message monitoring:
    1. AO: Document Exception: org.dom4j.DocumentException: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
    2. Nested exception: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
    Help me in this issue..
    Thanks in advance
    N.Jayanth Kumar

    Dear Stefan,
                        I will explain my problem here..in brief
    1. I have created an EJB Module and adding an external jar dom4j.jar
    2. I have the my jndi name as XmltoText
    3. In my application-j2ee-engine.xml in my EAR file...i have included :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
    <reference
         reference-type="weak">
         <reference-target
           provider-name="dom4j.org"
           target-type="application">TEST_LIBRARY
          </reference- target>
    </reference>     
    <fail-over-enable mode="disable"/>
    </application-j2ee-engine>
               TEXT_LIBRARY is name of my Library Project.Please tell me corrections in the above code...i have doubt regarding provider name.
    4. As i have added external jar file in my ejb module..._i have created a Library project and in that project in provider.xml_ file i have included the following code...
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
    <provider-descriptor>
         <display-name>TEXT_LIBRARY</display-name>
         <component-name>TEXT_LIBRARY</component-name>
         <major-version>6</major-version>
         <minor-version>40</minor-version>
         <micro-version>0</micro-version>
         <provider-name>****</provider-name>
    <references>
    <reference
         provider-name="****"
         strength="weak"
         type="library">****</reference>
    </references>
    <jars>
             <jar-name>EJBModule.jar</jar-name> (This is my EJB Module jar file)
    </jars>
    </provider-descriptor>
    Now what should i include in the places of **** in the references above??
    Thanks and Regards,
    N.Jayanth Kumar

  • How to call external jar files in EJB project for CE

    Hi,
    I would be thankful if someone could help me with this -
    I need to call the external jar files into my EJB project - Here is what I have done and am getting runtime exception as  -
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    1. Created a EJB  project" HelloWorld "  using Java perspective in NWDS 7.1 called with client as HelloWorldClient and EAR project as HelloWorldEAR.
    2. Am working on HelloWorld project (1st one).
    3. In my code I am instantiating a class which is a class in one of  the external jar file that I need to refer in my project.
    4. I have set the Java Build path but it works only for the compile time and fails during runtime.
    5. Have read I need to create external library DC and refer in my project "HelloWorld".
    Can anyone help me with exact steps what needs to be done - during creation of external library project and then for my "HelloWorld" EJB project. How would I be able to reference or set the external library project in my EJB project?
    Looking forward to hear from experts.
    Thanks,
    Shiv
    Edited by: Shiv Khullar on Aug 30, 2010 9:39 PM

    Hi Edson,
    I tried it , but it still gives me runtime exception.
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    Steps I performed are -
    1. Created a library project and created 2 Public parts "Compilation" and "Assembly"
    2. Build the library project.
    Now in my EJB project using Project Explorer - set the classpath and added both compilation jar and assembly jar files.
    This is how the classpath entries for external library looks like -
    <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkAssembly/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkAssembly.jar"/>
         <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkCompilation/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkCompilation.jar"/>
    I have also added the jar files I used in my external library project as "User Library" from Java Build Path . I dont do it , then the code fails during compilation itself.
    Regards,
    Shiv

  • Deploying external jar files in CE 7.1

    Hi All,
    I am using CE 7.1 SP01 NWDS to develop my applications.
    Now I want deploy one external jar files to J2ee engine.
    I know how to do the same in NWDS 2004s. But here the steps seems to be little bit different.
    I referred the following blog for doing this in CE 7.1
    /people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-ii
    But, still I am getting Classnotfound exception, when i try to use the jar file in dc applications. There, I posted some queries, but I didnt get any solution.
    Can any one help me on this please.
    Thanks,
    Fahad Hamsa

    Hi  Fahad,
    I am facing the same problem, but am  not able to get the solution.
    I am following the below steps..
    1) Created a Webdynpro DC - "testProj" to which i need to add the external library DC.
    2) Created a DC of type "External Library" called "externaljar"
    3)Added Public Parts of type assembly and compilation to the "externaljar" DC (Component Properties Tab -> Public Parts)
    4) Right click on the  assembly Public Part name -> Manage entities, and added the JAR files as archive.
    5)Right click on the compilation Public Part name -> Manage entities, and added the JAR files as archive.
    6)Go to Webdynpro DC "testProj" .
    Under Component Properties Tab -> Dependencies tab  -> Add -> selected the "externaljar" DC  -> Next ->  for "externaljar" DC checked Deploy time and Run time.
    For assembly Public Part  and compilation Public Part "build" is selected by default.
    7) I did build of both the DC's and deployed it.
    Im getting "Class not found" error.
    Please let me know where i am going wrong.
    Thanks,
    Shilpa.

  • How to use external jar files ??

    Hi all,
    In my user-defined function for mapping (IR) , I want to make use a Class which is available in an external .jar file.
    Our XI is working on Windows2003 OS. I set the classpath in OS environment variables.
    But it is not working.
    Where I should set the classpath ?
    Can anyone help.
    Thanks in Advance
    Chemmanz
    Message was edited by: Chemmanz

    Hi Chemmanz,
    For user defined functions, it is not necessary to use the external jar files.
    Just follow the below steps:
           1.      To create a new user-defined function, choose <b>Create New Function</b> in the data-flow editor at the bottom of the screen, on the left-hand side.
           2.      Specify the attributes of the new function in the subsequent window:
    Name:
    Technical name of the function. The name is displayed in the function chooser and on the data-flow object.
    Description:
    Description of how the function is used.
    Arguments:
    In this table, you specify the number of input values the function can process, and name them. All functions are of type String.
           3.      In the subsequent window, you can create Java source code:
                                a.      You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon:
    You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since all message mappings require these packages and therefore import them.
    In addition to the standard packages, you can also specify Java packages that you have imported as archives and that are located in the same, or in an underlying software component version as the message mapping.
                                b.      Create your Java source text in the editor window or copy source text from another editor.
           4.      Confirm with Save and Close.
           5.      User-defined functions are limited to the message mapping in which you created the function. To save the new function, save the message mapping.
           6.      To test the function, use the test environment.
    The new function is now visible in the User-Defined function category. When you select this category, a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the function to the data-flow editor, choose the arrow next to the button and select from the list box displayed.
    Regards,
    Prasad U

  • Using External JAR file within Web Dynpro DC

    Hi,
    I have created a Web Dynpro DC and I need to use an external JAR file.
    I want to use this external JAR file within the same Web Dynpro DC and NOT creating another DC to house the external JAR file as I can see from the blog.
    I have included the external JAR file in the "lib" folder of the Web Dynpro DC.
    When I tried to perform a DC build, it keeps complaining error....
    How should I solve this problem...
    Thanks.
    mike

    Hi Mike,
    Go through the below which might help you.
    Re: Lookup of RFC Destinations
    Re: Import a Java Bean from a different DC
    Web Dynpro References
    Re: j2ee library with webdynpro
    Re: Web Services :HTTP Destination not getting resloved.
    http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm
    Thanks n Regards,
    Jhansi Miryala

  • Including helper classes in java proxy jar file

    I must not be using the right header search criteria because I'm sure this question
    has been asked before. In a Web Service File (.jws) I've imported a couple of
    helper classes that function as data transfer objects. I did this to maintain
    consistency with other portions of the application. The Java Proxy jar file generated
    by Workshop does not include these files. Is there a way of including these dependencies
    or do I need to distribute another jar file with my helper classes?

    Hi Naichen,
    I was able to successfully run both the autotype and clientgen Ant task, on the
    WSDL you provided. The code behind those Ant tasks are pretty much what the WebLogic
    Web Services test page run. Are you using WLS 8.1 SP2? If not, you might want
    to try with that version.
    Regards,
    Mike Wooten
    "Naichen Liu" <[email protected]> wrote:
    >
    >
    >
    Hi,
    I am having a warning message when trying to generate java proxy jar
    file on weblogic8.1
    webservice test web app, the message is as follows:
    "Warning Failed to generate client proxy from WSDL definition for this
    service.
    Prescription Please verify the <types> section of the WSDL."
    in the mean time, on weblogic starting terminal, I saw the following
    exceptions,
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\AlphaLength4Deserializer.java:36: cannot resolve symbol
    symbol : class FacetUtils
    location: package binding
    weblogic.xml.schema.binding.FacetUtils.checkLengthFacet(__typed_obj,4L);
    ^
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\OSIFieldAnonTypeDeserializer.java:36: cannot resolve
    symbol
    symbol : class FacetUtils
    location: package binding
    weblogic.xml.schema.binding.FacetUtils.checkMaxLengthFacet(__typed_obj,69L);
    ^
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\AlphaLength2Deserializer.java:36: cannot resolve symbol
    symbol : class FacetUtils
    location: package binding
    weblogic.xml.schema.binding.FacetUtils.checkLengthFacet(__typed_obj,2L);
    ^
    C:\DOCUME~1\u252738\LOCALS~1\Temp\wlwproxy37508.jar1533409921\com\ual\www\rcc\cb
    t\schema\modifypnr\FreeFormAnonTypeDeserializer.java:36: cannot resolve
    symbol
    symbol : class FacetUtils"
    Can anybody help me about this issue? I attached WSDL file, also United
    Airlines
    got an enterprise weblogic license deal with BEA, any help will be highly
    appreciated.
    Thanks!!!
    Naichen

  • How to include an external jar file in .EAR project

    Hello All,
    I have created a web service through java class in sap netweaver 7.1.
    For database connection i want to add external jar file as reference. could you all please tell me how to do this or can i get some scenario where it is explained.
    Please Help
    Regards,
    Vanita Jain

    Hi Vanita,
    open your project in nwds > right click on the project > click on properties option from the menu > click on java build path from the left-side navigation of the window > and click on libraries in the right side tab > here you'll get a button called add external jars > clicking to this, will open browser window to select a jar file.
    Regards,
    Sen

  • How to set the classpath for external .jar files after importing?

    Hi techs,
    How to set the classpath in WSAD5.1.2 after importing the .jar file to the WEB-INF/lib folder.
    urgent

    I got it.
    after importing the jar file to the perspective,we need to right click on project name, go to proprties,
    goto java build path,
    there we need to include the external jar files.

  • Adding external jars

    Hi,
    I have a jar file in the ext folder of BPEL. When i use the class in java embedding activity it says class not found error how do i solve it. Or please tell me the procedure of adding external jars
    Edited by: user10545499 on Nov 5, 2008 9:40 PM

    To make external Jar files available in your BPEL PM, you could put the files in:
    [ORACLE_HOME]\bpel\system\classes
    Restart the server, you they are read when BPEL PM is started. If you want them available in the whole J2EE environement, you sould place them in the j2ee enviornment.
    Marc

  • Deploying external jar files to the server

    Hi,
    How can I deploy the external jar files belonging to a simple webdynpro project(no DC) so that it is also available durng the runtime.
    I have no direct access to the WAS server and I am looking for means to deploy directly from NWDS.
    Regards,
    Meesum

    hi meesum,
    There is no direct things to do that. All u need to do is keep the jar files into the lib folder of webdynpro project and also add it from the build-path/classpath by right clicking the project.
    1. Go to navigation perspective
    2. get into the project\lib folder of the your project. copy the jar files into it
    4. right click on the project
    5. click on properties
    6. click on java build path
    7. go to libraries tab
    8. click on Add Jars button
    9. select the jar in you r project
    10. click ok
    11. recompile
    12. deploy
    Hope you got what you want...
    Thanks & Regards,
    Raghavendra Pothula

  • Read images from external jar file (Sun's Java L&F Graphics repository)

    Hi!
    I don't know how to read images from an external jar file. Sun has a Java Look and Feel graphics repository that contains a lot of good images that can be used on buttons and so on. This repository is delivered as a jar file, containing only images, and I want to read the image files from that jar file directly without including them inside my application jar file. The application and image jar files will be in the same directory.
    I have absolutely no clue how to solve this. Is it necessary to include the images inside my application jar file or is it possible to have them separate as I want.
    Would really appreciate some help!
    Best regards
    Lars

    Hi,
    There is two ways :
    1) Add your jarfile to the classpath.
    Use the class loader :
    URL url = ClassLoader.getSystemResource("your/package/image.gif");
    Image im = (new ImageIcon(url)).getImage();
    or
    Image im = Toolkit.getDefaultToolkit().getImage(url);2)If you don't want to add the jar to the classpath you can use this (under jdk 1.4):
    import java.util.*;
    import java.util.jar.*;
    import java.awt.*;
    import java.io.*;
    import java.awt.image.*;
    import javax.imageio.*;
    public class ImageUtilities {
         public static Image getImage(String jarFileName, String fileName) {
              BufferedImage image = null;
              try {
                   JarFile jar = new JarFile(new File(jarFileName), false, JarFile.OPEN_READ);
                   JarEntry entry = jar.getJarEntry(fileName);
                   BufferedInputStream stream = new BufferedInputStream(jar.getInputStream(entry));
                   image = ImageIO.read(stream) ;
              catch (Exception ex) {
                   System.out.println(ex);
              return(image);
    }I hope this helps,
    Denis

Maybe you are looking for