Ear or war or jar not created

1. when I build the examples, it builds the class files but does not create
ear or war files....
2. how do I stop the default service and run the example server... the
beasvc is not in the service list...... just have to kill in the task
manager??
Thx

Java ARchive (JAR) files contain Java classes and Enterprise JavaBeans.
Web Application Archive (WAR) files contain servlet Java code, libraries used by the servlets and possibly static content such as HTML files and JPEGs.
Enterprise Application Archive (EAR) files contain JAR files (EJBs) and WAR files (Servlets).
I hope that answers your question. :)
For more detailed information have a look at the Enterprise JavaBeans Specification and the Servlet Specification:
http://java.sun.com/products/ejb/docs.html
http://java.sun.com/products/servlet/2.2/

Similar Messages

  • EAR has WAR has JAR in WEB-INF\lib NoClassDefFoundError

    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?

    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?

  • Classloading [EAR] - [webapp.war+ejb.jar]

    Hi.
    I've got a problem with the classloader hierarchy in WL 6.0.
    When I deploy my war/ejb application as an EAR, everything works fine.
    But I want (for several reasons) to deploy
    EJB jars and WebApp wars (or exploded Web Apps) seperately.
    WL 6.0 EJB classloader doesn't export remote/home interfaces and
    helper classes,
    so my web app can't find them.
    When I include that interfaces/classes in my Web App, I get
    occasionally ClassCastExceptions (I assume depending on classloader
    caching).
    Is there a way to configure the classloader hierarchy, or do you have
    any other solution for this?
    Thanks,
    Roman

    Hello,
    I have a big application to do.
    So, one solution should be to use an EAR for one
    module, containing the WAR for the web-tier and the
    EJB-JAR for the business-tier.
    It would be better doing like this than creating a
    big WAR, in order to avoid to deploy a big WAR when a
    modification is done in one module.Are you using local EJBs or remote EJBs? The only way for a war to talk to a local EJB is to package the war along with the ejb-jar in an EAR file because they need to be collocated. You can not simply bundle EJB classes in a war file.
    If you are using remte EJBs, then you can package the EJB client view classes along with the servlets and JSPs in the war file and deploy the war separately. But again your war will be one big war.
    If your EJBs are just entity beans, then Java EE 5 (see http://weblogs.java.net/blog/ss141213/archive/2005/12/using_java_pers.html) allows you some nice options.
    >
    What about the problem of the session ?
    In fact, I have to declare a context-root for one
    EAR.
    And at each context-root is created an object
    HttpSession on the server.
    So, I have some questions about this :
    - How can I configure my WARs in order to use only
    one HttpSession object for every WARs ?
    There is no standard way to do this. Relying on any application server specific feature can only make your app non-portable. So I strongly recommend you not to do this.
    - Can I put multiple WARs in one EAR ?Of course you can.
    If yes, what about the context-root ? This solution would resolve
    the session problem.Can't be solved using any standard way. So I suggest you stick to one big war, if that's what your business requirement is.To speed up development-deployment-test cycle, any appserver allows a rapid deployment option where in you can deploy incremental changes to server. Use this facility during development. DON'T sacrifice portability of your app by using any product specific configuration that you may not find any where else.
    Thanks,
    Sahoo

  • Are JDev autogenerated paths needed to create ear, war and jar files ?

    Hi
    We want to create ear, war and jar files from Ant build script generated from JDeveloper 11.1.1.7.
    We also like to use ojdeploy with it.
    In the process of creating build.xml files from projects, we see these paths.
    We also have standalone Weblogic installed with ADF runtime 11.1.1.7
    Questions:
    1- Do we need these path ids to generate ear, jar, war files properly and then deploy the ear to our standalone Weblogic so that our webapp can run ok ?
    2- Why are they generated, if they are not needed
    From research, it appears that we don't need these paths except to keep ant targets of init, compile, exec etc with ojdeploy.
    3- Is that true ?
    We are afraid that because no paths are listed in the build.xml, then when we deploy the ear app, it cant use the ADF runtime on the standalone WLS.
    Thanks in advance for answering.
    Sincerely
    eg of paths generated below:
      <path id="library.SOA.Designtime"/>
      <path id="library.SOA.Runtime"/>
      <path id="library.BPEL.Runtime"/>
      <path id="library.Mediator.Runtime"/>
      <path id="library.MDS.Runtime">
        <pathelement location="{oracle.middleware}/oracle_common/modules/oracle.mds_11.1.1/mdsrt.jar"/>
      </path>
      <path id="library.BC4J.Service.Runtime">
        <pathelement location="{oracle.middleware}/oracle_common/modules/oracle.adf.model_11.1.1/adfbcsvc.jar"/>
        <pathelement location="{oracle.middleware}/oracle_common/modules/oracle.adf.model_11.1.1/adfbcsvc-share.jar"/>
        <pathelement location="{oracle.middleware}/oracle_common/modules/commonj.sdo_2.1.0.jar"/>
        <pathelement location="{oracle.middleware}/modules/org.eclipse.persistence_1.1.0.0_2-1.jar"/>
        <pathelement location="{oracle.middleware}/oracle_common/modules/oracle.webservices_11.1.1/wsclient.jar"/>
        <pathelement location="{oracle.middleware}/oracle_common/modules/oracle.web-common_11.1.1.jar"/>
      </path>
      <path id="library.TopLink">
        <pathelement location="{oracle.middleware}/modules/com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar"/>
        <pathelement location="{oracle.middleware}/modules/org.eclipse.persistence_1.1.0.0_2-1.jar"/>
        <pathelement location="{oracle.middleware}/modules/com.bea.core.antlr.runtime_2.7.7.jar"/>
        <pathelement location="{oracle.middleware}/modules/javax.persistence_1.0.0.0_2-0-0.jar"/>
      </path>
      <path id="library.Oracle.Rules"/>
      <path id="classpath">
        <path refid="library.SOA.Designtime"/>
        <path refid="library.SOA.Runtime"/>
        <path refid="library.BPEL.Runtime"/>
        <path refid="library.Mediator.Runtime"/>
        <path refid="library.MDS.Runtime"/>
        <path refid="library.BC4J.Service.Runtime"/>
        <path refid="library.TopLink"/>
        <path refid="library.Oracle.Rules"/>
      </path>

    There are two different things here. Using ant to build the class files and then building an ear from the class files and other resources.
    The building part needs the libraries if you use javac as compiler. Building an ear file only needs the path to the jar files which are packed into the ear.
    In this sense you need the pages you see in the build.xml.
    Then Jdev offers another way: ojdeploy. This tool is a Jdev without a gui.
    You can use this tool and build the classes for each project of a workspace and to build build war and ear file. This is just like you click the rebuild button for each project and then the deploy the projects and application. If you use this approach you don't need the generated path ids as the whole build process is done inside Jdev as it's done on your developer pc.
    Timo

  • War is not created after creating ear of module.

    Hi,
    I am facing the following problem-
    I am creataing the ear of my application using following command-
    runAssembler -server AdminServer C:\ATG\ATG10.0.3\home\cimEars\MyModule.ear -m DafEar.Admin DPS DSS B2BCommerce DCS.AbandonedOrderServices MyModule
    But I am not seeing any war file created under MyModule.ear directory like MyModule.war.
    There are only atg_admin.war,atg_bootstrap.war,atg_bootstrap_ejb.jar,atglib and META-INF folders but not the war folder of my application.
    What is the problem with that?
    Please help to resolve this!
    Thanks & Regards,
    Meera

    Hi,
    Did you create a WAR folder while creating the MyModule ATG project. Do you have web content in the module. It'll come up if you have created a WEB module.
    Regards,
    RahulV

  • Can not create i.war using java -jar ords.war static

    C:\glassfish4\ords>java -jar ords.war static "c:\app\sybrandb\apex_4.2.6\apex\im
    ages"
    WAR Generation complete
    WAR location     : C:\glassfish4\ords\i.war
    Context path     : /i
    Static resources : c:\app\sybrandb\apex_4.2.6\apex\images
    Ensure the static resources are available at path: c:\app\sybrandb\apex_4.2.6\ap
    ex\images
    on the server where the WAR is deployed
    I downloaded ORDS from OTN yesterday
    Needless to say this directory does exist (it works when I run the listener standalone, providing this path)
    Why is everything which Oracle releases in this area always broken and badly documented?
    HELP!
    Sybrand Bakker
    Senior Oracle DBA

    To create the manifest, you use the constructor
    JarOutputStream(OutputStream out, Manifest man).
    However, I am having problems with creation of my files and I came here to look for answers. No .war file i have created has been deployable.

  • Compiled Tomcat Servlet Example & got JAR, not WAR?

    Is there a basic reference on how to create a simple servlet with NetBeans 4.1 and deploy it to Tomcat?
    When I created the project I chose Samples->Web->Tomcat Servlet Example, and yet it does not create a WAR file on compilation.
    And of course once I'm past that I have to figure out how to edit the XML file, I gather.
    I need a reference that will hold me by the hand and walk me through it once to kick start me.
    After that I think I can make it without having to ask such newbie questions.

    Hi,
    not sure to what extent you are clear in build.xml file (done thru ant).
    what i can tell you is, ant creates any archive file (be it .jar, .war, .ear) with the tasks named "jar" (<jar jarfile="yourfilename.jar"..>), "war" and "ear". But both war and ear are the extensions of the jar only.
    You can achieve creation of any archive file with the jar task itself.
    you need to take care of the following...
    (1) you can /should edit the extension of the files at every stage.. first .jar and then .war and then .ear (if necessary) => basic flow
    (2) at every step, you have to have a file inclusion inside the corresponding archive file..
    say for example, for a .jar file you should include all the compiled .class files, and ejb-jar.xml (incase you use ejbs) and other built-in jar files....
    In case of .war files (web archive) you should include the web.xml file, any static files (html, jsp etc), any tld files - it goes with your application's nature and requirement.....
    fyi, i m including a sample build.xml file which i use for a webapplication, so it deals with war...
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="ServletsReqDispFwd" default="deploy">
         <property name="top" value="."/>
         <property name="webinf" value="${top}/WEB-INF"/>
         <property name="lib" value="${webinf}/lib"></property>
         <property name="classes" value="WEB-INF/classes"/>
         <property name="jboss.dir" value="D:\jboss-3.2.2RC3\server\default\deploy"></property>
         <property name="tomcat.dir" value="D:\jakarta-tomcat-4.1.27\webapps"></property>
         <property name="warfile" value="ServletsReqDispFwd.war"></property>
         <property name="src" value="${top}/src"/>
         <property name="web.xml" value="WEB-INF/web.xml"/>
         <target name="package">
              <javac srcdir="${src}" destdir="${classes}"
                     listfiles="true" debug="true"  verbose="true"
                          classpath="${lib}/*.jar"/>
              <war warfile="${warfile}" webxml="${web.xml}">
                   <webinf dir="${top}">
                        <include name="**/*web*.xml"/>
                        <include name="**/*application*.xml"/>
                        <exclude name="src/**/*.xml"/>
                   </webinf>
                   <lib dir="${lib}">
                        <include name="*.jar"/>
                   </lib>
                   <fileset dir="." includes="**/*.html"/>                    
                   <classes dir="${classes}" includes="**/*.class"></classes>                         
              </war>
         </target>
         <target name="deploy" depends="clean,package">
              <copy file="${warfile}" todir="${tomcat.dir}" overwrite="true"></copy>
         </target>
         <target name="clean">
                <delete dir="${classes}">
                     <filename name="*.class"/>
              </delete>
              <delete>
                   <fileset dir="${top}" includes="${warfile}"/>
              </delete>
              <delete>
                   <fileset dir="${tomcat.dir}" includes="${warfile}"/>
              </delete>
         </target>
    </project>hope this contribues to a certain extent to help you edit the buildfile (xml file as you go) to meet your requirement.....

  • Explain about JAR,EAR and WAR files

    Explain :what is JAR,EAR and WAR files and how is useful in creating archive files in java with more example?

    Please look up this type of information on your own.
    http://java.sun.com/reference/glossary/index.html

  • Ant not creating jar file

    i'm really stuck into it.
    i've done everything but of no use.
    My problem is that i created a simple build.xml file and tried to make it through the Ant tool.
    It is creating and deleting directories, compiling the files successfully but not creating the jar file. also it is not running the program.
    Here is my class and here is my build.xml file.
    i've put all files in directory : c:\usingant
    <project default="compile">
    <property name="src" location="src"/>
    <property name="jar" location="jar"/>
    <property name="classes" location="classes"/>
    <property name="build" location="."/>
    <target name="init">
    <delete dir="${jar}"/>
    <delete dir="${classes}"/>
    <mkdir dir="${jar}" />
    <mkdir dir="${classes}" />
    </target>
    <target name="compile" depends="init">
    <javac srcdir="${src}" destdir="${classes}" />
    </target>
    <target name="run" depends="compile">
    <java classname="AntTest" classpath="${classes}" fork="true"/>
    </target>
    </project>
    the java file is placed in the src directory
    public class AntTest{
         public static void main( String ar[] ){
              System.out.println("This program is testing Ant");
    Please help me what's wrong
    thanking you in advance

    Ant do magic, but you must tell it to do it.
    You are missing the "tasks" for doing the jar and running it.
    <target name="compile" depends="init">
    <javac srcdir="${src}" destdir="${classes}" />
    <jar destfile="${jar}/app.jar" basedir="${classes}" />
    <java classname="AntTest">
    <classpath location="jar/app.jar"/>
    </java>
    </target>

  • Creating ear and war file from deploy file programatically

    Hi All,
    Is there any API available in oc4j to create an ear or war file from a .deploy file...........??
    Thanx in advance.

    There isn't a public API that let's you hook up to the deploy file in JDeveloper.
    You might be able to achieve this with the JDeveloper Ant task:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/anttasks/index.html

  • Single EAR multiple WAR model - faces-config not loading

    Hi
    I am deploying my application on weblogic 10.3 My application is in form of a Single-EAR-Multiple-WAR model. The application starts up correctly but when i bavigate from one module (WAR) to another (WAR), it doesnt initializes the managed beans. It is not able to load the faces-config from the second WAR.
    can anyone please let me know ehat am i missing?
    Thanks a lot
    -Ankur

    Hi,
    This is not an issue caused by having multiple wars inside same ear.
    This looks like a runtime exception when trying to render the jsp (The jsp is compiled to a sevlet and the inside the service method of the servlet you are getting this exception). Double check you jsp for the possible cause of this exception.
    Thanks,
    Gopinath Ramasamy

  • Jar file: log file is not created!

    Hi, I create a log file with these instructions:
    //logger
              FileHandler fh = new FileHandler(LOG_FILE,true); //append mode
              fh.setFormatter(new SimpleFormatter());
              logger = Logger.getLogger(this.getClass().getName());
              logger.addHandler(fh);It works well as long I execute it normally, but when I create a .jar file and put this logger class inside logger file is not created..how come?

    Hi, I create a log file with these instructions:The code extract creates a Logger object, sure, but does that mean it creates a log file? The log file creation could be deferred until the first usage of the logger...
    It works well as long I execute it normally,Let's clarify: do you mean, when executing from your IDE, or when executing via a command line?
    but when I create a .jar file and put this logger class inside logger file is not created..how come?Let's clarify: do you mean, when you execute the same code packaged in a jar file?
    The most likely issue is configuration: apparently the various ways in which you run your program use different logging configurations.
    J.

  • Error when deploying ear with war module.

    Can somebody help me with a problem? This problem is realy strange.
    I have three projects: ordinary project (jar project), war project and ear project.
    The war project uses classes form jar project and it is a part of ear project.
    There is an abstract class in jar:
    public abstract class MyDataTable {
    public abstract String method1();
    public abstract String method2();
    //And some others abstract methods
    Class MyResultSetTable extends MyDataTable class:
    public class MyResultSetTable extends MyDataTable {
    private ResultSet rs;
    public MyResultSetTable(ResultSet resSet) {
    rs = resSet;
    //Implementation of abstract methods
    In jar there is another class MyDataPacket, which performs transformation between MyDataTable and XML document (Delphi data packet):
    public class MyDataPacket {
    public static String tableToXML(MyDataTable table) {/Implementation}
    public static MyDataTable xmlToTable(String xmlSource) {/Implementation}
    In war there is a simple Web service which interact with clients by means of the data packets:
    @WebService
    public class MyWebService {
    @WebMethod
    public String myMethod(){
    //Creating connection and opening ResultSet rs
    MyDataTable t = new MyResultSetTable(rs);
    return MyDataPacket.tableToXML(t);
    This war application belongs to Enterprise Application (ear project). I use Sun Java System
    Application Server Platform Edition 9.0_01 (build b02-p01). When I deploy ear into server an
    error occurs:
    Exception occured in J2EEC Phase
    java.lang.NoClassDefFoundError: jarSource/MyDataTable
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
    at java.lang.Class.privateGetPublicMethods(Class.java:2519)
    at java.lang.Class.getMethods(Class.java:1406)
    When I change abstract class MyDataTable on MyResultSetTable in static method
    tableToXML, the error disappears. I think that the problem is that I use abstract
    class in this method. Please, can somebody explanes me this situation.
    PS: Sorry for my bad English. I jast start to study this language.
    PSS: You can copy-past these classes for simple testing this misunderstanding:
    jar:
    public abstract class MyDataTable {
    public abstract String method1() throws Exception;
    public abstract String method2() throws Exception;
    public class MyResultSetTable extends MyDataTable{  
    public String method1() throws Exception {return "method1";}
    public String method2() throws Exception {return "method2";}
    public class MyDataPacket {
    public static String tableToXML(MyDataTable t) {return "tableToXML";}
    war:
    import jarSource.MyDataPacket;
    import jarSource.MyDataTable;
    import jarSource.MyResultSetTable;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    @WebService()
    public class MyView {
    @WebMethod
    public String myMethod1(){
    MyDataTable t = new MyResultSetTable();
    return MyDataPacket.tableToXML(t);
    ear: Adding war to ear.

    I beleive this is a classpath problem, namely the classespath does not exist for the .jar file when the .war is trying to access the files. I would think if the .jar file is in WEB-INF/classes in your .war your error would go away. If you are placing the .jar in the root of the .ear then you must set the classpath.

  • Javax ejb CreateException: Could not create stateless EJB

    Hi,
    I have a JavaEE (EJB3.0) project deployed on glassfish2.1 as -.ear (exported from eclipse3.4 to the autodeploy-folder) with -.ejb.jar, -.webui.war, general-lib-base.jar (some other...)
    The session bean is invoked by a jsf-managed bean. Have a pure annotation +@ejb+ in managed bean (identifiing the ejb-interface (+@Remote+) ...the ejb is annotated with +@stateless+
    get the following error message:
    *...nested exception is: javax.ejb.CreateException: Could not create stateless EJB*
    as beginner in the JavaEE-field I'm looking for some help concerning the possible causes.
    thank's for any comment...
    (also posted in the Enterprise JavaBeans-forum possibly better there)

    problem fixed: in the deployment-descriptor ejb-jar.xml a spezification of the session-bean hung around ...very annoying!

  • One EAR , multiple WARs - CLASSPATH problem

    Hi there,
    According to [url http://e-docs.bea.com/wls/docs92/programming/splitcreate.html#wp1102496]WL 9 documentation, any thid-party library of my EAR located at APP-INF/lib can be referenced anywhere.
    Unfortunately that's not happening ... :-(
    This is my EAR scenario:
    APP-INF\lib\log4j.jar
    APP-INF\lib\struts.jar
    APP-INF\lib\many-others.jar
    ejb1.jar
    ejb2.jar
    web1.war (no jars inside)
    web2.war (no jars inside)
    web3.war (no jars inside)
    There is no problem with EJB, but no web application can reach any jar from APP-INF\lib\ .
    If I copy all jars to WEB-INF\lib inside a WAR, everything works fine. That won't be an option because I have 7 web modules and creating an EAR with the same jars 7 times is out of the question.
    So, dear WL9 gurus, anyone could pull this off ? :-)

    You may try to use JSP compiler class. Please specify 'compilerclass'
              option in weblogic.xml. This option specifies name of a Java compiler
              that is executed in WebLogic Servers's virtual machine. (Used in place of
              an executable compiler such as javac or sj.)
              Please see
              http://e-docs.bea.com/wls/docs61/webapp/weblogic_xml.html#jsp-descriptor.
              Paco Garcia wrote:
              > oops!
              >
              > >$WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
              > >/wlap#####/ejbjarname.jar
              >
              > >with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
              > >you get:
              > >/w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar:
              >
              > please read SERVERNAME instead of EARNAME
              >
              > PacoG.
              Regards,
              Ann
              Developer Relations Engineer
              BEA Support
              

Maybe you are looking for

  • HP Laserjet 5200tn Print Quality Issue

    Hi I am looking for some help with my HP LaserJet 5200tn. The problems all started back when I was getting a printer error 51.2 turned the printer off and on for a while to clear the error. Like the Tech manual says. This went on for a week showing b

  • Is there a better way to position a flash movie than ap div?

    I'm creating a new website(not yet active) and have a great flash movie for the home page.  I've place it in an ap div and of course it moves to a different position in different browsers. Is there any way I can get it to display correctly, or is the

  • Do I need to make a new table?

    I pasted in a small table from excel. Three columns and 10 rows. I now need to add rows but don't know if I can. Can I, or do I have to start a new table from scratch. thanks.

  • JAVA version for NW2004s

    Hi, I wanted to install XI NW2004s on windows2003enterprise edition 64bit. Do i required JAVA also 64bit ? Or any JAVA will it work. for NW2004s what is the java verion compatablety ? Please suggest . - Lisa

  • Change role name after copying

    I copied a role (Business Explorer) and want to rename the role. Changing the name does not help, because only changes to other languages than the original language are taking effect. Changing the ID is possible, but there I am not allowed to change