META-INF/MANIFEST.MF Question

Hi,
I have a deployment profile for an EJB project.. when I generate the jar file, jdeveloper automatically includes the MANIFEST.MF...but it does not include the Class-Path entry with the project library dependencies I have...
Is there a way to tell the jar deployment profile automatically adds the Class-Path entry in the MANIFEST.MF file.... I'm trying to avoid ant related task by just using jdev ide.
thanks for your help..

You can also add a fragment just containing the Class-Path tag and add this fragment to the Manifest.mf in the Project Settings -> JAR Options -> Additional Manifest Files to Merge into MANIFEST.MF -> Add.
--olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • WAR meta-inf/manifest Class-Path jars use which classloader ?

    If using an expanded EAR structure, my Web App requires some utility classes. I
    can either put these in my :-
    meta-inf/manifest.mf
    Class-Path : utility.jar
    OR
    web-inf/lib
    can contain the utility.jar
    Is there any difference in terms of which classloader is used to load these classes,
    the EAR/EJB classloader or the Web App child classloader ?
    What is recommended ?

    If have found out the answer myself by testing it :-
    A jar in the meta-inf/manifest.mf e.g. Class-Path : utility.jar
    will be loaded by the EAR/EJB level classloader
    whereas
    web-inf/lib containing utility.jar
    will be loaded by the Web App level child classloader.
    Dimitri Rakitine <[email protected]> wrote:
    I have this question too - it appears that 6.1sp2 attempts to use Class-Path
    in jars in WEB-INF/lib - what this Class-Path: is supposed to do ???
    Pete <[email protected]> wrote:
    If using an expanded EAR structure, my Web App requires some utilityclasses. I
    can either put these in my :-
    meta-inf/manifest.mf
    Class-Path : utility.jar
    OR
    web-inf/lib
    can contain the utility.jar
    Is there any difference in terms of which classloader is used to loadthese classes,
    the EAR/EJB classloader or the Web App child classloader ?
    What is recommended ?--
    Dimitri

  • How to use ClassPath defined in META-INF/MANIFEST.MF in an EAR

    Hi,
    We have an EAR Shared Library (Name = AA) deployed in Weblogic. EAR contents are like ->
    APP-INF/lib/directoryA/<<50 JAR Files>>
    META-INF/MANIFEST.MF --->> Has Class Path to above JAR files, Spec Version, Impl Version etc
    META-INF/application.xml
    META-INF/weblogic.application.xml
    This EAR is deployed as Shared Library, and our EJB (name = BB) refers to this EAR. Now the problem we are facing is that the JARs are not reachable by EJB BB. If we restructure the Shared Library project so that all the JARS are under APP-INf/lib/ directory, we are able to access the JARS from EJB BB. (This means that we are referring the shared library correctly, using "library-ref" tag correctly.
    Is there a way we can specify EJB BB to look for CLASS PATH as present in the MANIFEST.MF file of the Shared Library ??
    Thanks,

    WebLogic specifies a separate classloader for the APP-INF/lib directory that is why it gets loaded
    When you have some.jar file placed in an arbitrary directory, for example, somewhere. You can either
    use application.xml, for example,
    <application ...>
        <module>
            <ejb>EJB.jar</ejb>
        </module>
        <module>
            <web>
                <web-uri>Web.war</web-uri>
                <context-root>MiddlewareMagic</context-root>
            </web>
        </module>
         <library-directory>somewhere</library-directory>
    </application> Or by using the manifest Class-Path entry option which requires adding a META-INF/MANIFEST.MF file with the following contents:
    Manifest-Version: 1.0
    Class-Path: somewhere/some.jarMore information on class loading and application packaging can be found here: http://middlewaremagic.com/weblogic/?p=6725

  • WEB-INF/lib (.war) Vs META-INF/MANIFEST.MF (.ear)

    What are the Class loading differences between libraries that are in a web application web-inf/lib and that are in class-path entry of META-INF/manifest.mf of a ear.
    I recently developed a web services application with a ejb endpoint.Then
    packaged it in a ear file with the classpath entry .The problem occured when I placed the weblogic.jar(and other third party jars) in the ear file which my ejb.jar uses as utility jar's. Jboss starts behaving weird.Some of the classes of jboss are overwritten and class cast exception errors started coming up.
    Overnight I changed the application to a servlet end point and placed all my jars in the WEB-INF/lib then everything started working smooth.
    Can any body help me , understand what is happening. Why doesn't j2ee have something like META-INF/lib

    What did you do to resolve this issue .. I'm having the exact same problem.
    What a nightmare.
    I found approximately 40 forums on this topic (and
    there are probably more), but noone has the definitive
    answer!
    Here's the problem....
    My servlet uses a utility class that resides in some
    other jar. That jar is then placed into the
    WEB-INF\lib directory of the WAR which in turn goes
    into the EAR. This is supposed to be all that is
    needed in order for the utility class to be found on
    the classpath.
    In fact, if you run the war in Tomcat as a standalone
    WAR it does in fact find it.... its when in an EAR
    deloployed to app server that the problem arises.
    I have had no luck with using any combination of
    putting the jar ANYWHERE in the EAR or WAR no matter
    if I specify the Class-Path: in the manifest(s) or
    not.
    I thought maybe that I was missing some config in the
    application.xml or web.xml but I couldn't find
    anything to support that.
    Maybe its dependent on the app server? I am using
    Orion, but the same problem can be found on J2EE RI
    release 1.3
    Work arounds:
    1. Simply put the utility jar in the lib directory of
    the server you're using
    2. Add an ejb module to the application.xml naming the
    utility jar as the ejb jar. Of course this is NOT an
    EJB jar and error messages/warnings will appear
    accordingly, but on Orion at least, it will load the
    classes needed... hooray!!
    Anyone got a definitive answer?

  • Unable to read Class from META-INF/MANIFEST.MF file

    Hi,
    One of my EJB Bean is referencing a class file "test.class".
    So, I placed the test.class file under app-servers's
    "<root-dir>/lib/test.class". And added this in MANIFEST.MF file under "Class-Path" property.
    But the app servers is not recognising this Class and displaying "NoClassDefFoundException".
    Any help is appreciated.
    Thanks in advance

    If it is saying this abt main MIDlet class then it is
    a JAD file problem. try to check "MIDlet-n" attibute
    (including package info if any).Yes - the KToolbar project/package updates the jad file as well as creating the jar file.
    Cheers

  • Persistence.xml under classes/META-INF makes other jar references to miss

    Hi,
    When I am adding persistence.xml to classes/META-INF folder where classes folder got other packages under it, classes in such packages are not getting reference to respective jar files in lib folder. So, deployment of the web project in OAS (Oracle application server) 10g fails mentioning NoClassDef found for classes from library jars referred. If I remove persistence.xml from here, the war file is getting deployed. Deployment fails even when the persistence.xml is available anywhere in classpath (like WEB-INF).
    What is the reason & how to correct it?Any alternative approach like manifest or use some settings in OAS?

    Hi,
    To be accessible to the EJB JAR, WAR, or EAR file, a class or a JAR file must be on the deployment classpath. You can achieve this in one of the following ways:
    Put the JAR file in the manifest classpath of the EJB JAR or WAR file. Do this by adding a classpath entry to the META-INF/MANIFEST.MF file in the JAR or WAR file. You may specify one or more directories or JAR files, separating them by spaces. The following example shows how the manifest file classpath entry adds the employee/emp-classes.jar file and the employee/classes directory to the classpath of the JAR file that contains the manifest file:
    Class-Path: employee/emp-classes.jar employee/classes
    Place the JAR file in the library directory of the EAR filethis will make this JAR file available on the application classpath and accessible by all of the modules deployed within the EAR file. By default, this would be the lib directory of the EAR file, although you may configure it to be any directory in the EAR file using the library-directory element in the application.xml deployment descriptor. The following example shows the application.xml file:
    <application ...>
    <library-directory>myDir/jars</library-directory>
    </application>
    Java EE allows for persistence support in a variety of packaging configurations. You can deploy your application to the following module types:
    EJB modules: you can package your entities in an EJB JAR. When defining a persistence unit in an EJB JAR, the persistence.xml file is not optionalyou must create and place it in the META-INF directory of the JAR alongside the deployment descriptor, if it exists.
    Web modules: you can use WAR file to package your entities. In this case, place the persistence.xml file in the WEB-INF/classes/META-INF directory. Since the WEB-INF/classes directory is automatically on the classpath of the WAR, specify the mapping file relative to that directory.
    Persistence archives: a persistence archive is a JAR that contains a persistence.xml file in its META-INF directory and the managed classes for the persistence unit defined by the persistence.xml file. Use a persistence archive if you want to allow multiple components in different Java EE modules to share or access a persistence unit. The following example shows how to package entities in a persistence archive:
    emp.ear
    emp-persitence.jar
    META-INF/persistence.xml
    META-INF/orm.xml
    examples/model/Employee.class
    examples/model/Phone.class
    examples/model/Address.class
    examples/model/Department.class
    examples/model/Project.class
    Once you created a persistence archive, you can place it in either the root or the application library directory of the EAR. Alternatively, you can place the persistence archive in the WEB-INF/lib directory of a WAR. This will make the persistence unit accessible only to the classes inside the WAR, but it enables the decoupling of the definition of the persistence unit from the web archive itself.
    Regards,
    Vinay

  • Problem deploying connector: META-INF/ejb-jar.xml not found in jar file

              Has anyone seen this problem:
              I built Sun's Blackbox implementation and packaged
              it identical to the BlackBoxNoTx.rar included with
              Weblogic's 'jconnector' sample (even using the same
              ra.xml and weblogic-ra.xml). When I try to deploy
              it, the server reports:
              java.io.FileNotFoundException:
              META-INF/ejb-jar.xml not found in jar file
              I have no idea why the server thinks my connector
              is an EJB. If I deploy the BlackBoxNoTx.rar included
              with the sample, everything works without a hitch.
              The only variable that I'm changing in my BlackBoxNoTx.rar
              is that I build the Blackbox classes myself--otherwise,
              the RAR packagings are identical. Any assistance is
              greatly appreciated since I'm banging my head against
              a wall...
              Thanks,
              -jason
              

              I was finally able to resolve this one. On the odd chance that someone else encounters
              the same problem, here's what went wrong:
              My RAR file had two directories: 'META-INF' and 'meta-inf'. The first was created
              by the jar tool and contained the manifest.mf file. The second I created manually
              and it contained my ra.xml and weblogic-ra.xml. When I examined the RAR using
              any tools or I extracted the contents, it looked like it only contained one directory:
              META-INF (because NT is case-insensitive).
              "Jason L" <[email protected]> wrote:
              >
              >Has anyone seen this problem:
              >
              >I built Sun's Blackbox implementation and packaged
              >it identical to the BlackBoxNoTx.rar included with
              >Weblogic's 'jconnector' sample (even using the same
              >ra.xml and weblogic-ra.xml). When I try to deploy
              >it, the server reports:
              >
              >java.io.FileNotFoundException:
              >META-INF/ejb-jar.xml not found in jar file
              >
              >I have no idea why the server thinks my connector
              >is an EJB. If I deploy the BlackBoxNoTx.rar included
              >with the sample, everything works without a hitch.
              >The only variable that I'm changing in my BlackBoxNoTx.rar
              >is that I build the Blackbox classes myself--otherwise,
              >the RAR packagings are identical. Any assistance is
              >greatly appreciated since I'm banging my head against
              >a wall...
              >
              >Thanks,
              >
              >-jason
              

  • Contents of META-INF/services/javax.xml.parsers.DocumentBuilderFactory?

    I am currently working on an applet that solves Sudoku puzzles, allowing you to build your own in a Constructor and then solve them in a seperate Solver. To do this, we are implementing the puzzles files as XML documents.
    I have the code completely complied and on the server ( [sudoku.unl.edu|sudoku.unl.edu]) and it runs NEARLY perfectly, however when trying to access the server to save the xml code, the apache error_log presents this message: "File does not exist: classes/META-INF/services
    /javax.xml.parsers.DocumentBuilderFactory"
    Looking at the Java Doc here it says that the program should look for that in the jars. I am unsure of exactly how the applet is interacting with the server, but typing "java -version" yields:
    java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)Notably, the code works PERFECTLY in NetBeans, contacting the server using SCP and uploading the file and such, so the code doesn't seem to be the problem, unless I need to direct the DocumentBuilder code somehow. This is the code that I believe is causing the trouble (I have tried to include all relevant imports that are in my code):
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    DocumentBuilderFactory factoryBuilder;
              DocumentBuilder builder;
              Document doc;
              Element docElement;
              try
                   factoryBuilder  = DocumentBuilderFactory.newInstance( );
                   builder = factoryBuilder.newDocumentBuilder();
                   doc = builder.parse( indexLocation );
                   docElement = doc.getDocumentElement();
                   NodeList children = docElement.getChildNodes();          
                   for(int i =0; i < children.getLength(); i++)
                        if(children.item(i).getNodeType() == 1)
                             if((children.item(i).getNodeName()).equals("directory"))
                                  if ((children.item(i).getAttributes().getNamedItem("name").getNodeValue()).equals("UsersInput")) {
                                       Node firstChild = findNodeItem(children.item(i), "Difficulty0.." + this.upperField.getText());
                                       Node secondChild = findNodeItem(firstChild, "Level" + this.levelField.getText());
                                       Node thirdChild = findNodeItem(secondChild, (String)suTypeList.getSelectedItem());
                                       Element newFile = doc.createElement("file");
                                       newFile.setAttribute("name", fileName);                              
                                       thirdChild.appendChild(newFile);                              
                   SshParameters params = new SshParameters("cse.unl.edu", "consystlab","A/tutti");
                // create new Scp instance
                Scp scp = new Scp(params);
                // register event listener
                scp.addListener(this);
                // establish connection
                scp.connect();
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   Transformer transformer = tFactory.newTransformer();
                   DOMSource source = new DOMSource(doc);
                   StringWriter sw=new StringWriter();
                   StreamResult result = new StreamResult(sw);
                   transformer.transform(source, result);
                   String xmlString=sw.toString();
                // upload file
                  scp.upload(xmlString.getBytes(), indexPath, "libraryIndex.xml");
                 // disconnect
                scp.disconnect();
              catch (IOException e)
                   System.out.println("IO ERROR7");
                   System.out.println(e);
              catch (TransformerException tranE){
                   tranE.printStackTrace();               
              catch (ParserConfigurationException e)
                   System.out.println("IO ERROR8");
                   System.out.println(e);
              catch (SAXException e)
                   System.out.println("IO ERROR9");
                   System.out.println(e);
              }So my question is, what exactly are the contents of the file in the META-INF/services folder? I have manually created this file in my classes directory, where the program is searching. When I place text in it, it appends the text with .class and searches for that file, but doesn't seem to do anything with the file. I attempted directing it to the "DocumentBuilderFactory.class" file that I extracted from the classes.jar included with the JDK.
    I feel like all I need is this file to contain the correct content and the code will FINALLY work, but I have not been able to find anything out there on it.
    Thank for you for your help, sorry this was such a long message.
    -Jason

    Thanks!
    Thanks for the fast reply. I don't know if I made my point clear.
    I do not want to determine the parser by myself. I want the client system use the default parser, so I do not have the hit of downloading the fairly large parser jar.
    However, I want it not to do an empty request to the server for nothing. This turn around time kills an Applet. I want a fast loading applet!
    I'll go in trial and error mode, when I find the time next week.
    Thanks again, I appreciate it!
    K<o>

  • Where to place /META-INF/context.xml ?

    Hi,
    Apologies, but this is a newbie question. In the tomcat docs, it states that
    "A /META-INF/context.xml file can be used to define Tomcat specific configuration..."
    Could you please tell me where /META-INF/context.xml is placed relative to web application root? In other words, if I have a web application in a directory /MyWebApp, should the /META-INF dir be in /MyWebApp/META-INF or should it be under /WEB-INF?
    Thanks.
    Ben

    You seem to think that you can have only one META-INF directory; this is simply not true. Keep both your META-INF directories and put the files where they are expected. Yay for using overlapping names :/

  • How to include AdfcExceptionHandler entry from adf\META-INF\services\

    I am referring to this article from Frank : http://thepeninsulasedge.com/frank_nimphius/2010/02/01/how-to-create-custom-adfc-exception-handler/
    As mentioned in the blog, everything works , exception handler handles the exception , but
    When I create AdfLib JAR, it does not include adf\META-INF\services\ folder
    Thanks,

    Frank,
    Can we use AdfcExceptionHandler in our code directly with out worrying about any backward compatibility issues in future release of ADF? The reason I am asking this question is , it is from oracle.adfinternal. package and ORACLE can change it any time in future.
    What is the alternative if we can not use it?
    Thanks,
    Rama

  • How to get and read a file from META-INF directory

    how to get and read a file from META-INF directory in a EJB project

    Use this.getClass().getResourceAsStream("/META-INF/filename");This should work. Probably, you would need to set the Manifest Class-Path attribute.

  • Jar file META-INF content

    Hi,
    How can I specify what are the files will reside inside the META-INF folder while creating a jar file? What are command line options to be passed for jar utility in this regard.
    Thanks in advance,

    If you want stuff other than the manifest in there, just include it like any other file path. Create a META-INF directory in the tree you are going to jar.

  • How to package log configuration into META-INF folder of an SDA

    Hi all,
    I work with Developer Studio 2.0.20. After some struggle I managed to configure my DCs by a a deployed log-configuration.xml.
    I use a "Portal Application Standalone (Packed in SDA)" DC to package and deploy. The created SDA contains a META-INF folder and a PAR file. If I copy the log-configuration.xml file manually into the META-INF folder of the SDA then the log-configuration.xml is used by the server.
    Now, my problem is, that I did not manage to have the log-configuration.xml automatically included in the META-INF folder of the SDA. Does anyone now how this can be accomplished with Dev Studio 2.0.20?
    Thanks for your attention,
    --Stefan

    You may add any .txt file as add manifest file or you click the "edit manifest" toolbar button to add comtent for manifest file...
    it will create meta-inf folder automatically.
    At least the tool can save lot of your time.

  • Deploying EJB JAR and Application EAR, META-INF directory name

    To all:
    I had a problem the last couple of days with deploying an EJB and application.
    I'm new to WebLogic, maybe this is common knowledge, but I researched it and
    didn't find any reference to what I discovered.
    I'm using WebLogic Server 7 Service Pack 2 (7.02), on Windows 2000.
    My problem was that the application that I was trying to deploy would not deploy
    successfully, because a dependent class was not found for the EJB. I tried everything,
    but the only thing I could get to work was placing the dependent jar files in
    the classpath of the WebLogic server, within the start script. I correctly had
    the Class-Path manifest line correct, but the dependent classes were not being
    found.
    Through trial and error I discovered that the META-INF directory within the JAR
    and EAR archives HAS TO BE ALL UPPERCASE for the app server to successfully find
    the manifest.mf file and the application.xml file.
    As soon as I changed the directory name in both the EJB JAR file and the application
    EAR file, the EJB deployed successfully, all dependent classes were then found.
    I'm posting this here to help anybody that might have the same problem. There
    is not any documentation that I could find that had this directory name requirement
    explicitly stated.
    Regards,
    JD

    What does the manual for the OC4J application server have to say about it all?

  • What is META-INF directory for ?

    Hi Techies..
    can any one please tell me, What is META-INF directory for ?
    thanx in adv.
    Regards
    Nitin.V

    One thing found in an 'executable' jar file META-INF directory if the manifest file:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.)
    Main-Class: com.sdl.ArgsTest
    Class-Path:
    X-COMMENT: Main-Class will be added automatically by buildwhich, among other things, tells the JVM where the main class is.

Maybe you are looking for

  • The usage about "vendor line item display"(FBL1N)

    Hi, The field of "amount in local currency" in the above list is a amount including tax, Is there any way to display the amount tax amount and AP amount without tax respectively ? Thank you !

  • How to build a website container with JSF...

    Hi, most simple websites have static and dynamic areas, e.g. header and menue are static areas, always at the same place and then there is a dynamic area somewhere in the middle... :) Whats a good way to build websites using the JSF framework? At the

  • Any difference in the architecture of VC 7.0 and VC 7.1

    Hi All, Can anyone explain me if there is any difference in the architecture of VC 7.0 and VC 7.1 Also, is there any diff in terms of browsers for the applications deployed on Adobe Flex and WD HTML Nikhil Bansal

  • Adobe error and we could not able to solve this

    If we select a single item in the comment field, multiple edits were selected in the page. Please refer the attached screenshot. Number 1 and 2 indicates the edits that highlights when we select 1 item in the comment field which is indicated by numbe

  • Process Order - Collective Close Technically

    Hi Gurus! I have two doubts: 1) I would like to know if there is any transaction code that I can close tecnically an process order. I know that this activity can be executed when we work with production order in the transaction COHV... But I didn't f