How to deploy jar file in WLS using ant script

Hi,
Im trying to deploy a jar file in weblogic 10.3 using ant script and am running into the below error.
+[wldeploy] weblogic.management.DeploymentException: [J2EE:160177]The application at "/u01//RSJBObjects.jar" was not recognized as a valid application type. If this is an EAR file, please ensure the META-INF/application.xml exists. EJB-JARs should have a META-INF/ejb-jar.xml or corresponding annotations exist. If this is an exploded WAR, the name of directory must be end with ".war". RARs require a META-INF/ra.xml. A JMS deployment should be an XML file whose name ends with "-jms.xml". A JDBC deployment should be an XML file whose name ends with "-jdbc.xml". For other application types, please consult the WebLogic Server documentation.+
When i try to deploy the same manually from the console, i get a warning stating that WLS thought this as a library and hence proceeding to deploy as a library. After this warning the deployment continues and completes.
Problem is when i try to deploy using ant, it breaks at this point.
Is there any means that we can deploy a jar to WLS using ant script. This has to be deployed as a library as other apps would be using this jar.
Im unable to create a ear file for this single jar file.
If there is any suggestion on can this be done, please share.
Thanks,
Vijay.

Hi Sunil,
Thanks for the reply, it worked.
Another doubt on the same lines. Now that the jar has been deployed as a library in WLS, when i try to deploy a WAR which refers to this deployed jar library, im unable to. I run into and error stating that the library is inaccessible.
I have to bounce the server and before doing that, i have to manually copy the library.jar from <WLS_domain>/servers/AdminServer/upload/ directory to <WLS_domain>/lib/ directory, once copied i then try to deploy the WAR, then the deployment goes fine.
Is there any means that this deployed library jar be made available soon after deployment and also to avoid copying the file.
Thanks,
Vijay.

Similar Messages

  • Remote deploy a war file in weblogic using ant script

    Hi,
    How do I remote deploy a war file in weblogic using ant script
    Thanks

    http://download.oracle.com/docs/cd/E13222_01/wls/docs100/programming/wldeploy.html

  • How TO DEPLOY JAR FILES INTO XI Server using SDM

    Hi XI Gurus,
       im working on adapter development. we have created jar file in NWDS.
       now going ahead to deploy into XI server through SDM.
       can we deploy jar files directly into xiserver through SDM. or it needs to convert to any other formate like EAR, SDA. then how would i convert to SDA.
      i any have clear idea on this... pls throw the ways how to convert........
               JAR File to EAR format
               JAR file to SDA format
               EAR file to SDA format         
       can any one explain the procedure step by step how to convert jar file into deployment archive file in order to succesfully into XI server.
              thanks  i advance. points will be rewarded.
      Regards
      Rajesh

    Hi Rajesh,
    JAR file in itself in not deployable.
    So v need to envelop this jar file into an EAR file and then v deploy this EAR file on SDM.
    Creating Jar
    Inside NWDS --> Windows --> Open perspective --> J2EE Development --> right click on ur proj --> Build EJB Archive
    Converting .EAR file to .SDA
    Converting .EAR file to .SDA
    Regards,
    Prateek

  • How to deploy jar file for use within mapping user-defined fcn

    Hi all,
    I have a java class I'd like to called from a mapping user-defined function.
    Here's what I've done (but hasn't worked)
    1. Added 'package com.<mycompany>.xi.util.base64 to the source class file and compiled it.
    2. Created a sda with a plain provider.xml file, i.e. no references were made to any other library files.
    3.  Deployed the sda to the xi 3.0 j2ee server successfully using SDM.
    4.  Under the Visual Admin tool, I see that the library was deployed successfully.
    5.  In the import text box in the user-defined function (design time), I enter com.<mycompany>.xi.util.base64.*.
    A syntax check returns an error indicating the package could not be found. 
    Can anyone give me pointers as to how I can get this working?
    Thanks,
    --jtb

    Hey James,
    No! That's not the right way!
    What you have done is for accessing external JMS & JDBC drivers in their corresponding adapters. For the access inside a mapping user defined function, it's enough if you import the jar files.
    Look at this blog and you will be very clear!
    /people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
    regards,
    Felix

  • How to deploy jar file in ebs12?

    hi, now I want deploy a jar file in ebs12.
    for example, my oaf code using jdom to parse xml file. so I need to deploy jdom.jar
    into ebs12 server.
    Where shall I put this jdom.jar.
    Does I need change some configuration.
    btw, in ebs11i, I can change Jserv.properties to support this.
    thanks
    tamsun

    Hi Sunil,
    Thanks for the reply, it worked.
    Another doubt on the same lines. Now that the jar has been deployed as a library in WLS, when i try to deploy a WAR which refers to this deployed jar library, im unable to. I run into and error stating that the library is inaccessible.
    I have to bounce the server and before doing that, i have to manually copy the library.jar from <WLS_domain>/servers/AdminServer/upload/ directory to <WLS_domain>/lib/ directory, once copied i then try to deploy the WAR, then the deployment goes fine.
    Is there any means that this deployed library jar be made available soon after deployment and also to avoid copying the file.
    Thanks,
    Vijay.

  • How to deploy jar file into oc4j

    Hi,
    I am new to jdeveloper.
    I deployed a application as .ear file by creating new coneection from the Connection navigator which is having web, ejbs amd client progrms. I dont have any problem with that.
    But for my feature modification on my ejbs or client programs, i want to deploy only its related jar file in the existing application in the server. But when i try to do the same, the client module or ejb module is deploying as new .ear file in to the server insterd of .jar file.
    How to overcome this in jdeveloper?
    Thanfully,
    Satish KC.

    I consider complete EAR deployment as a feature, because you can build self-contained versions, archive them and redeploy them in case of support situations.
    However, if you like to develop in incrementally you can run, test, show your complete application within JDeveloper. No extra deployment is necessary for that.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to make jar file of application using JMF

    Hi
    i developed an application which uses JMF it works well during compilation and displays audio and video too.
    but after builting jar file it doesn't works.
    abdul

    Well you've found the root of your problem. It's not necessary the JMF. It's when you make a jar file, you need to include the dependencies. I don't think it' legal to include the JMF in a program you sell or distribute, so be careful there.
    However, to include dependencies in jar files is not a hard task. The simplest method is to unjar the dependency and place it at the top or your classpath; then make a jar that includes both your program, and the dependency.
    A more long term solution is to use a build system such as ant or maven to create the package using available scripts or plugins. The "Uberjar" plugin for maven comes to mind.
    -vito

  • Deploying Jar file in Tomcat 4.1

    Any guys knoe how to deploy jar files in tomcat4.1.
    i know that it should be in the "install_dir/WEB-INF/lib" folder.
    but after i develop an applcaiton using packages and zip it to a jar file how do i deploy it?

    You want it in a WAR file, not a JAR file - i.e. a zip file just like a JAR file but with a .war extension and the following path structure:
    ./WEB-INF/classes
    ./WEB-INF/lib
    ./WEB-INF/web.xml
    Where your JARs go in the lib directory, plain classes in their package structure under the classes directory and your JSPs, HTML etc anywhere you like other than WEB-INF.
    Then you just put the WAR in Tomcat/webapps.

  • Deploying BPEL project using ant script in 11g

    Hi,
    i am just trying to deploy a single BPEL project using ant script.
    please specify what are all the needed jar's to be needed for deploying the project using ant
    and where exactly they have to placed, i mean into which directory i need to place those jar's...
    if u have any specific blog which describes step by step procedurs for single project deployment via ant, please tell me...
    its very urgent..
    thanks in advance...

    Hi',
    The .jar file required will be of the project/composite you want to deploy to server, this jar is inside deploy folder (11G).
    This .jar file gets created when you try to deploy your composite using right click on the project in JDev.
    This .jar can be picked from any location.
    Try this its little more descriptive.
    http://shrikworld.blogspot.com/2011/03/deploying-soa-11g-application-using-ant.html
    -Yatan

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • Help! How to create Jar file for a packaged class?

    Hi!
    I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
    But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
    Really Thanx!

    Call the Jar from the commandline to see the exceptions thrown.
    java -jar <jarFileName> <className>

  • Error in deploying .jar file from JDeveloper 10.1.3.5

    Hello,
    I want to deploy .jar file in a machine, instead of having to install JDeveloper to run the application (it contains: Web Services and Data Base).
    I have followed the following steps in JDeveloper to create the .jar file:
    1) Right click over the project: New... --> General (All Technologies option selected) --> Deployment Profiles --> JAR File
    2) I have selected "Include Manifest File" option specifying the application's main class
    3) In JAR Deployment Profile Properties window: File Groups --> Project Output --> Contributors are selected: "Project Output Directory" and "Project Dependencies"
    4) With the previous steps, JDeveloper generates a .deploy file. It is created in Resources folder. From this folder, I have selected the .deploy file and right click and I have selected "Deploy to JAR file"
    The .jar is created succesfully. In this point, I try to execute with the command:
    java -jar NAME_OF_THE_DIRECTORY_WHERE_THE FILEIS_DEPLOYED\NameFile.jar
    and I have the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceFactory
    at project.proxy.AccountClient.<init><AccountClient.java>
    at project.proxy.AccountClient.main<init><AccountClient.java>
    The Manifest File content is:
    Manifest-Version: 1.0
    Created-By: Oracle JDeveloper 10.1.3.5.0
    Main-Class: project.proxy.AccountClient
    I have tested with differents variables to create the .jar file, but always the error is the same. And I haven't found information to solve it. For this reason, I appreciate any help.
    Thank you and regards.
    Edited by: user1634407 on 31-mar-2010 8:27
    Edited by: user1634407 on 31-mar-2010 8:47

    If you are just building a client that access a Web service you need a JAR and not a WAR.
    Ok!
    One thing to try is look at the command line that JDeveloper uses to run your client (it's in the log window) - specifically look at the classpath used.
    Then try and run the same thing from a command line and see if it works.
    Nowadays, the application is running with a .BAT file, it contains the statement released from the JDeveloper console, and it is working perfectlly.
    I try to do the same from a command line, and it works too.
    Assuming it is - you can either use that, or you'll need to make sure that your JAR includes all the mentioned jars that were in the class path - this is done through the library type file group.
    To create the .JAR file I have choosen the following options (JAR Deployment Profile Properties):
    1) Include Manifest File --> I have selected the class that contains the main class (from the Browse option)
    2) I left the default File Groups (Project Output) --> it has: Project Output Directory + Project Dependencies
    3) As you said me, I have created a new File Group (type: Libraries) --> and here, I have selected all the possible Contributors. These match those specified in the project (Oracle XML Parser v2, J2EE, JAX-RPC Client, Commons Logging 1.0.3, Ojdbc14.jar).
    4) Deployment to JAR File successfully.
    The resulting MANIFEST.MF is:
    Manifest-Version: 1.0
    Created-By: Oracle JDeveloper 10.1.3.5.0
    Main-Class: project.proxy.Execution
    It hasn't definied "Class-Path", althought to especified a new File Group with the libraries... Is it an error?
    If I extract the .JAR file, I see all libraries, and I have two folders: one with .class files of my project and other one is META-INF with MANIFEST.MF file.
    5) From command line I executed:
    C:\jdevstudio10135\jdk\bin > java -jar C:\jdevstudio10135\jdev\mywork\project\project\deploy\NameFile.jar
    And the result is an error:
    Exception in thread "main": java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceFactory
    I think the error is because it can not find the library ServiceFactory, but it is especified inside JAX-RPC Client library. What is wrong?
    *6)* I have tried too to insert in "JAR Deployment Profile Properties" (in JAR options) an additional Manifest File to merge into MANIFEST.MF, to include "Class-Path" with all libraries's project (the same JAR from the statement released from the JDeveloper console), but I think that it is a limit, because if I insert all libraries the "Class-Path" doesn't inserted in MANIFEST.MF. The maxim is:
    Class-Path: C:\jdevstudio10135\jdev\mywork\project\project\classes C:\jdevstudio10135\lib\xmlparserv2.jar C:\jdevstudio10135\lib\xml.jar C:\jdevstudio10135\j2ee\home\lib\activation.jar C:\jdevstudio10135\j2ee\home\lib\ejb.jar C:\jdevstudio10135\j2ee\home\lib\jms.jar C:\jdevstudio10135\j2ee\home\lib\jta.jar C:\jdevstudio10135\j2ee\home\lib\mail.jar C:\jdevstudio10135\j2ee\home\lib\servlet.jar C:\jdevstudio10135\webservices\lib\jaxrpc-api.jar
    The following libraries afther the previous one aren't allowed to include because I think that is exceeding the maximum size.
    I have tested to create various MANIFEST.MF with different PATHs libraries, but it isn't work to include in the MANIFEST.MF file all libraries...
    (C:\jdevstudio10135\webservices\lib\wsclient.jar
    C:\jdevstudio10135\webservices\lib\wsserver.jar
    C:\jdevstudio10135\webservices\lib\wssecurity.jar
    C:\jdevstudio10135\webservices\lib\wsdl.jar
    C:\jdevstudio10135\webservices\lib\orasaaj.jar
    C:\jdevstudio10135\webservices\lib\saaj-api.jar
    C:\jdevstudio10135\webservices\lib\orawsdl.jar
    C:\jdevstudio10135\webservices\lib\orawsrm.jar
    C:\jdevstudio10135\webservices\lib\jaxr_api.jar
    C:\jdevstudio10135\webservices\lib\orajaxr.jar
    C:\jdevstudio10135\webservices\lib\relaxngDatatype.jar
    C:\jdevstudio10135\webservices\lib\jaxb-impl.jar
    C:\jdevstudio10135\webservices\lib\jaxb-libs.jar
    C:\jdevstudio10135\webservices\lib\xsdlib.jar
    C:\jdevstudio10135\webservices\lib\mdds.jar
    C:\jdevstudio10135\jlib\jaxen.jar
    C:\jdevstudio10135\jlib\oraclepki.jar
    C:\jdevstudio10135\jlib\ojpse.jar
    C:\jdevstudio10135\jlib\osdt_core.jar
    C:\jdevstudio10135\jlib\osdt_cert.jar
    C:\jdevstudio10135\jlib\osdt_xmlsec.jar
    C:\jdevstudio10135\jlib\osdt_wss.jar
    C:\jdevstudio10135\jlib\osdt_saml.jar
    C:\jdevstudio10135\jlib\repository.jar
    C:\jdevstudio10135\jlib\ojmisc.jar
    C:\jdevstudio10135\j2ee\home\lib\http_client.jar
    C:\jdevstudio10135\j2ee\home\jazncore.jar
    C:\jdevstudio10135\j2ee\home\oc4jclient.jar
    C:\jdevstudio10135\rdbms\jlib\xdb.jar
    C:\jdevstudio10135\diagnostics\lib\ojdl2.jar
    C:\jdevstudio10135\jakarta-taglibs\commons-logging-1.0.3\commons-logging-api.jar
    C:\jdevstudio10135\jakarta-taglibs\commons-logging-1.0.3\commons-logging.jar
    C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.jar
    C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14_g.jar
    C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14dms.jar
    C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14dms_g.jar)
    With this .MF file (or including only "C:\jdevstudio10135\jdev\mywork\project\project\classes") I have solved the other problem (not found the libraries), but it still not working, the error is a little different:
    Exception in thread "main": java.lang.NoClassDefFoundError: project/proxy/Execution
    The path where the main class is: C:\jdevstudio10135\jdev\mywork\project\project\classes\project\proxy\Execution.class
    I have tried to insert directlly the following paths in "Main Class" option of "Include Manifest File":
    C:\jdevstudio10135\jdev\mywork\project\project\classes\project\proxy\Execution
    C:\\jdevstudio10135\\jdev\\mywork\\project\\project\\classes\\project\\proxy\\Execution
    And with these values, the error is the same: Exception in thread "main": java.lang.NoClassDefFoundError
    I am not sure if the error is a bug of JDeveloper 10.1.3.5 or it is something that I don't correctly. Any idea?
    Thank you again and regards.
    Edited by: user12085357 on 08-abr-2010 1:31
    Edited by: user12085357 on 08-abr-2010 1:38
    Edited by: user12085357 on 08-abr-2010 6:58

  • How to make Jar files in JBuilder

    I would like to know how to make jar files using JBulider. I have a problem with a project that I am working with in Swing. I have made the project on JBuilder and when I make a jar file it will not run upon clicking.
    Any body with an answer, please help
    Abhi

    It sounds like your Main-Class is not set properly in your manifest. To set your Main-Class, please follow these directions:
    http://java.sun.com/docs/books/tutorial/jar/basics/run.html

  • How to add jar files which point to project

    when i create project in jse8 i added jar files form system.
    then when i move that project to another system it is asking for jar files.it is pointing to location from where we added.
    how to make jar files available locally so that i can move anywhere.

    This might be a CRUDE solution, but it helps :-)
    1. Create a new folder (e.g. lib) under your project
    2. Copy the interested Jars to the folder. ( I am not sure how to do from within the IDE, I just copied the jars using Explorer.
    3. Right-Click on the Libraries Node to add the Jars and Add them from the folder created in step 1.
    This works... :-)

Maybe you are looking for