EJB deployement: jar versus ear

WLS 6.1 SP2, NT4
Hi,
if I deploy an ejb-jar-1 to be used by a Java client for instance and
have requirements for a new web client using ejb-jar-1 and a new ejb-jar-2
six months later,
what should I do ?
1/ Deploy a newapp.ear including my war file, my ejb-jar-2 and again
ejb-jar-1.
This ejb-jar-1 will be referenced as newapp.ear\ejb-jar-1.jar compared
to the one previously deployed (ejb-jar-1)
In this case, how does JNDI work if I lookup "MyBean" especially if both
ejb-jar-1
and newapp.ear\ejb-jar-1 have one common JNDI entry. Do have I to
include a new ejb-jar-1-bis instead and change the
jndi entry in its descriptor ?
2/ Deploy a newapp.ear including my war file and only my new ejb-jar-2.
3/ Deploy a newapp.ear including my war file and only my new ejb-jar-2 but
referencing/attaching the ejb-jar-1.
4/ Anything else ?
Generally speaking, I am a bit confused when comes the deployment of several
applications
potentially using common components. Can we have duplicate deployed
components ? Is there any JNDI issues
associated with such practice ?
Could somebody clarify how does it work when comes to deploy single EJBs
versus applications including EJB ?
What is the best practice etc ... ?
Thanks
Arnaud

STARTMODE is only available in WLS 6.1 and not WLS 6.0.
Deepak Vohra wrote:
Tom
Edit the startWeblogic Command Script.
set STARTMODE=false
Deepak
Tom Gerber wrote:
Is STARTMODE available in 6.0??? I thought that was new to 6.1.
I'm running on NT so do I set this on the Java command line as a
-DSTARTMODE=false or is it a regular environment variable?
Tom
Deepak Vohra wrote:
Tom
In startWebLogic script set STATRTMODE=false
STARTMODE=false starts server in development mode.
Deepak
Tom Gerber wrote:
We are using wl 6.0 sp2 rp2 - with 2 WL instances on the same box.
We have always seemed to have had this headache with WL - getting EJB's
to reload consistently.
Does anyone have a sequence of steps they follow to get good consistent
reloading results from both an EJB in its own JAR or an EAR file?
If we just copy the file over sometimes it seems to reload and sometimes
not.
If we try to use the console to "install an application" again sometimes
it deploys the EJB's to the wrong server instance!
Also is there anyway in the Weblogic deployment descriptor to specify
which instance the EJB should be deployed against?
Thanks
Tom
Rajesh Mirchandani
Developer Relations Engineer
BEA Support

Similar Messages

  • Unable to find ejb-jar with uri X.jar in ear at c:/Y/split_src

    Stack trace is below, but the ejb does exist at the location that the FileNotFoundException states. I've checked that application.xml, org.eclipse.wst.common.component both have the correct name for this dependency.
    java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail.
      at oracle.eclipse.tools.weblogic.server.internal.DeploymentProgressListener.watch(DeploymentProgressListener.java:190)
      at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.deploy(WlsJ2EEDeploymentHelper.java:506)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishWeblogicModules(WeblogicServerBehaviour.java:1466)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:898)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:686)
      at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:539)
      at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
      at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3153)
      at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
    Caused by: weblogic.application.ModuleException:
      at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:334)
      at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
      at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:312)
      at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:325)
      at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:378)
      at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
      at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
      at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)
      at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
      at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: java.io.FileNotFoundException: Unable to find ejb-jar with uri ***.jar in ear at C:\***\split_src
      at weblogic.ejb.spi.EJBJar.<init>(EJBJar.java:81)
      at weblogic.ejb.container.deployer.EJBModule.buildClassFinder(EJBModule.java:201)
      at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:313)

    Hi Ten,
    FYI, just by placing the ejb jar inside EAR project it will not be picked up for deployment. The EJB module has to be defined on EAR Module Assembly, and the steps are:
    > EAR Project | Properties, Deployment Assembly - Add EJB module
    NOTE: To verify the dependency you could try to export the EAR project to an .ear file. If the exported .ear file bundles ejb jar then deployment should work fine.
    As far as the deployment mode, OEPE supports WebLogic Split-source (default) and Exploded archive. In the default split-source mode, the .beabuild.txt contains the mapping to the actual files whereas in exploded archive the files are copied over to deployment staging location.
    Steps to modify deployment mode:
    > In the server view, right click on server configuration | Properties, select WebLogic | Publishing
    Please make sure the ejb module is defined appropriately and let me know if this resolves the issue.
    Thanks,
    Ram

  • Unable to publish - Unable to find ejb-jar with uri itr-ejbs.jar in ear

    I'm using Weblogic 10.3.4 with Eclipse Juno before i was with Eclipse Galileo. Since the update i'm not able to publish my ear anymore.
    I search on the internet the explanation of this stacktrace but i don't find a understandable answer so i ask to you :D
    <5 oct. 2012 12 h 30 CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1349433008242' for task '0'. Error is: 'weblogic.application.ModuleException: '
    weblogic.application.ModuleException:
         at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:334)
         at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
         at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
         at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:298)
         at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:330)
         Truncated. see log file for complete stacktrace
    Caused By: java.io.FileNotFoundException: Unable to find ejb-jar with uri itr-ejbs.jar in ear at D:\dev\workspaces\.metadata\.plugins\org.eclipse.core.resources\.projects\itr-ear\beadep\citron_domain\itr-ear\split_src
         at weblogic.ejb.spi.EJBJar.<init>(EJBJar.java:81)
         at weblogic.ejb.container.deployer.EJBModule.buildClassFinder(EJBModule.java:201)
         at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:313)
         at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
         at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
         Truncated. see log file for complete stacktrace
    >
    <5 oct. 2012 12 h 30 CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'itr-ear'.>
    <5 oct. 2012 12 h 30 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException:
         at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:334)
         at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
         at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
         at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:298)
         at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:330)
         Truncated. see log file for complete stacktrace
    Caused By: java.io.FileNotFoundException: Unable to find ejb-jar with uri itr-ejbs.jar in ear at D:\dev\workspaces\.metadata\.plugins\org.eclipse.core.resources\.projects\itr-ear\beadep\citron_domain\itr-ear\split_src
         at weblogic.ejb.spi.EJBJar.<init>(EJBJar.java:81)
         at weblogic.ejb.container.deployer.EJBModule.buildClassFinder(EJBModule.java:201)
         at weblogic.ejb.container.deployer.EJBModule.init(EJBModule.java:313)
         at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:167)
         at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:285)
         Truncated. see log file for complete stacktrace
    >Thank You

    Hi,
    It seems one of your ejb jar is missing from the current file location.
    D:\dev\workspaces\.metadata\.plugins\org.eclipse.core.resources\.projects\itr-ear\beadep\citron_domain\itr-ear\split_src
    you can make it manually copied to this location and build the project again so that it can able to deploy propertly.
    Now one more thing you can do open a ticket with oracle support for better assistance.
    Regards,
    Kal

  • How to access ejb jar in ear package from other war web package?

    How to access ejb in jar packed in ear package from other war web package?

    Typically you would just look the EJB Home up in JNDI. If you're
    looking for example code, the medrec example in WLS 8.1 or petstore has
    plenty of webapps calling EJBs.
    -- Rob
    CottonXu wrote:
    How to access ejb in jar packed in ear package from other war web package?

  • Using JMX to read ejb manifest jar and ejb-jar.xml in ejb jar inside ear

    Hello,
    I have an ear deployed on weblogic console. I need to check contents of manifest file and ejb-jar.xml of a jar that is present in the deployed ear.
    Currently I am using below code to access jar inside ear deployed :
    Hashtable env = new Hashtable(5);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,
    url);
    env.put(Context.SECURITY_PRINCIPAL, user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    Context ctx = new InitialContext(env);
    mBeanHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    String type = "EJBComponentRuntime";
    Set beans = mBeanHome.getMBeansByType(type);
    try{
    for(Iterator it=beans.iterator();it.hasNext();)
    EJBComponentRuntimeMBean rt = (EJBComponentRuntimeMBean)it.next();
    if(rt.getParent().getName().equals("xxx")){
    System.out.println(rt.getName());
    l.add(rt.getName());
    Here xxx is the ear. Now I need to get inside the jar (represented) by variable rt and access its manifest file,ejb-jar.xml
    Does anyone have an idea how to do this?
    regards
    Sameer

    Isn't it possible to put them there manually? :)

  • EJB Client JAR Creation - Workspace Studio (ALSB 3.0/WLS 10)

    hi
    I'm trying to create an EJB Client JAR for an 2.1 Session Bean EJB Created in a WLS 10 domain using BEA Workspace Studio (i.e. this is the Aqualogic Service Bus 3.0 Product install).
    I'm doing this in preparation for testing the ALSB EJB Transport which requires a client JAR.
    I simply can't get a useful JAR from the facility provided in the Workspace IDE. The Workspace help is pointing to an IBM generated page and I'm following the procedure there.
    I have configured the EJB for an EJB Client Project.
    If I export an EAR from the Application containing the EJB, the EAR only contains the EJB JAR (with a Manifest entry to a non-existent Client JAR).
    If I export the EJB Client Project to a JAR the JAR is simply empty i.e. contains some descriptor type artefacts but no classes.
    I have tried this quite a few times with the same outcome. Can anyone from BEA or the user community confirm whether or not this facility actually works!
    Thanks
    Jim Nicolson

    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/ejbTransport/ejbtransport.html#wp1079062 . This is document for OSB 10xx and yours is a a version or two older than this (So it will be applicable).
    Can you please check if your EJB are complying to 2.1specification?
    However the latest version of service has support for both EJB 2.1 and EJB 3.0 specification
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/ejb.htm#CCGIFFCI
    Thanks
    Manoj

  • Ejb-client.jar

    Hi,
    I've got an EJB system that until now have been packaging as just a
    bean jar and not bothering with a ejb-client.jar. I now want to
    package as follows
    a). A bean EAR file (containing bean jar, and dependency jars) - for
    deploying on EJB server.
    b). An app EAR file (containing WAR, containing ejb-client.jar).
    The first part is done. The second raised questions about the contents
    of the ejb-client.jar. I have packaged the Home/Remote interfaces and
    all necessary utility classes (i.e omitting the Local/LocalHome/EJB
    classes). What I need to know is what goes in there in terms of
    descriptors.
    Do I just package the exact same ejb-jar.xml, jboss.xml,
    jbosscmp-jdbc.xml, weblogic-ejb-jar.xml, weblogic-cmp-rdbms-jar.xml ?
    or do I have to change these in some way ?
    Do I also add the ejb-client-jar tag to the ejb-jar.xml ? (would this
    also go in the ejb-jar.xml that goes in the bean jar ?) ... and indeed
    what would I put in there ... just the name of ejb-client-jar file
    even though its only being packaged into any application WAR (what
    purpose does it serve) ?
    TIA

    The ejb-link value should include pathnames relative to the top level of the EAR
    file.
    <ejb-link>../my_beans-client.jar#CurrencyExchange</ejb-link>
    Andy Jefferson <[email protected]> wrote:
    Deepak Vohra wrote:
    An ejb-client.jar contains the class files, the home and remote interfaces
    and the primary key class, a client program needs to call the EJBs
    contained in the ejb-jar file.
    Also, ejb-client.jar contains a copy of any classes from the ejb-jarfile
    that
    are referenced by the home and remote interfaces and the primary key
    class. Deployment descriptors are not required in the ejb-client.jar.
    ejb-client-jar element is not a required element in ejb-jar.xml. If
    ejb-client-jar.xml is specified in ejb-jar.xml ejbc generates the
    ejb-clent.jar file.
    Thx. I'm not interested in using any server-specific tools (like ejbc)
    since
    I'm deploying to multiple servers and so am generating the ejb-client
    jar
    myself in my build process. In this context, what purpose does the
    <ejb-client-jar> tag in the ejb-jar.xml descriptor have ? Why does the
    beans jar need to know anything about where the client stubs are ?
    As far as I can tell I'm including the right things in my ejb-client.jar,
    and I've tried deploying my web-app EAR to WebLogic 7.0 and I always
    get
    that it can't find the ejb-link elements. What i've got in my EAR is
    my_app.war
    META-INF/application.xml
    and in the WAR
    my JSP files
    WEB-INF/web.xml
    WEB-INF/jboss-web.xml
    lib/my_beans-client.jar
    In the WEB-INF I have ejb-ref's like the following
    <ejb-ref >
    <ejb-ref-name>ejb/CurrencyExchangeHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>my_domain.CurrencyExchangeHome</home>
    <remote>my_domain.CurrencyExchangeRemote</remote>
    <ejb-link>my_beans-client.jar#CurrencyExchange</ejb-link>
    </ejb-ref>
    Should I be putting the my_beans-client.jar in the EAR and not the WAR
    Seems I am missing something, but not sure what exactly.

  • EJB Client JAR project produces empty JAR

    I've built an EJB module in WorkSpace Studio using the "WebLogic EJB Project" type, which is part of an EAR. I created a couple stateless session beans within this project, and then created an EJB Client JAR project using the "EJB Client JAR-->Create EJB Client Jar" menu item on the EJB project's hidden menu.
    According to the documentation, exporting an EAR file from the EAR project will cause the client JAR to be generated. I exported the EAR file from the EAR project, and sure enough, it included the client JAR (in /APP-INF/lib/). I extracted the client JAR from the EAR and opened it up to make sure it contained all of the client-side classes. I discovered that the client JAR was empty, the only contents being the MANIFEST.MF file. The interface classes were instead contained in the EJB JAR itself.
    How can I get the EJB client code to actually be included in the EJB client JAR?
    Thanks,
    Eric

    Well I have tried this with 6.1 and first
    1. One would expect the jar name to be the name in the ejb-jar.xml -
    ejb-client-jar section
    2. It outputs the file XXXEJB_Compiled.jar but it is same size as base jar
    this is 6.1 sp3
    whats up?
    Matthew Shinn wrote:
    Hi Sanjay,
    There is a bug in the documentation. The client-jar name should never be part of the
    ejbc command line. Step 3 below should be something like:
    java weblogic.ejbc xxxEJB.jar xxxEJB_Compiled.jar
    If you have an ejb-client-jar entry in your ejb-jar.xml, the client jar should be placed
    in the directory from which you ran ejbc. Make sure that the classes that you want to be
    put in the client-jar are not loaded from the classpath. This is very important or your
    client-jar won't be created correctly. The client-jar will only contain classes loaded
    from the input jar to ejbc. A bug for the incorrect documentation has already been filed
    and should be fixed soon.
    - Matt
    Sanjay Dwivedi wrote:
    Hi,
    I am trying to use the
    <ejb-client-jar> sub-element of the Sun's <ejb-jar> (EB 2.0 DTD) element of the
    ejb-jar.xml to generate the ejb-client.jar. I followed the step as documented
    by WebLogic but the files in EJB jars and ejb-client jars are identical. Here
    is what I am doing:
    1. Build the xxxEJB.jar for my EJB by running the WebLogic.ejbc on the standard
    EJB jar file.
    2. My ejb-jar.xml file has following line:
    <ejb-jar>
    <ejb-client-jar>xxxEJBClient.jar</ejb-client-jar>
    </ejb-jar>
    3. Next I used the following command to generate the ejb-client.jar file
    java weblogic.ejbc xxxEJB.jar xxxEJBClient.jar
    My xxxEJBClient.jar files consists of exactly same files (with same sizes) as
    the xxxEJB.jar file. Only difference is that the xxxEJB.jar file includes generated
    java source files for the bean implementation class and home/remote classes.
    In my opinion the xxxEJBClient.jar should not contain the EJB implementation classes.
    Any experience using the ejb-client-jar for generating the ejb-client.jar?
    Thanks,
    Sanjay.
    [att1.html]

  • ejb-client-jar example from the core specification

    Hello all,
    the ejb3.0 specification says (chapter 60 page 241):
    the jar file that contains the client should contain one of the following: 
    • a reference to the ejb-client JAR file 
    • a reference to the ejb-jar file that contains the client view classes 
    • a copy of the client view classes  There is also an example on page 242:
    In this example, the Bean Provider has chosen to package the enterprise bean client view classes in a
    separate jar file and to reference that jar file from the other jar files that need those classes. Those classes
    are needed both by ejb2.jar, packaged in the same application as ejb1.jar, and by ejb3.jar,
    packaged in a different application. Those classes are also needed by ejb1.jar itself because they
    define the remote interface of the enterprise beans in ejb1.jar, and the Bean Provider has chosen the
    by reference approach to making these classes available.
    The deployment descriptor for ejb1.jar names the client view jar file in the ejb-client-jar
    element. Because ejb2.jar requires these client view classes, it includes a Class-Path reference to
    ejb1_client.jar.
    The Class-Path mechanism must be used by components in app2.ear to reference the client view jar
    file that corresponds to the enterprise beans packaged in ejb1.jar of app1.ear. Those enterprise
    beans are referenced by enterprise beans in ejb3.jar. Note that the client view jar file must be
    included directly in the app2.ear file.
        app1.ear:
            META-INF/application.xml
            ejb1.jar Class-Path: ejb1_client.jar
                deployment descriptor contains:
                    <ejb-client-jar>ejb1_client.jar</ejb-client-jar>
            ejb1_client.jar
            ejb2.jar Class-Path: ejb1_client.jar
        app2.ear:
            META-INF/application.xml
            ejb1_client.jar
            ejb3.jar Class-Path: ejb1_client.jarNow finally my questions are:
    1. Why did we need to include the ejb1_client.jar in app2.ear (or even in app1.ear), wasn't it enough to deploy the ejb1_client.jar separately then refer to it (using class-path in Manifest, or may be just by using <ejb-client-jar>) as the bullets quoted first suggest?
    2. How come we didn't need to use <ejb-client-jar> for ejb2.jar
    3. Since both of ejb1.jar and ejb2.jar are packaged in app1.ear couldn't we simply refer to the ejb1_client.jar in the Manifest file of app1.ear?
    Please, I appreciate your input on this

    I am guessing here and please correct me if I am wrong:
    ejb1.jar uses interfaces in ejb1_client.jar as the interface for some of the beans so we needed to use ejb-client-jar and we needed a reference in the manifest file.
    ejb2.jar uses some of the claess/interfaces as may be a return type but not as an interface for one of its beans so we didn't need to use ejb-client-jar but we needed an entry in the manifest file.
    regarding app1.ear, we can put the ejb1_client.jar in the META-INF/lib app1.ear without the need for any entries in the manifest files.
    Edited by: malrawi on Jun 14, 2009 11:59 PM

  • JAR,WAR,EAR...

    HI,
    EJB modules are packaged as JAR files with a .jar extension.
    Web modules, are packaged as WAR file (though it can be .jar )
    Why we need to make it as .war file ?We can do it as .jar ?
    But anyway why at time of delivry we create a EAR file ?what are the significance of making file differently ? Is it not posssible to make everything .jar and deliver it.

    EJB modules are packaged as JAR files with a .jar
    extension.
    Web modules, are packaged as WAR file (though it can
    be .jar )
    Why we need to make it as .war file ?We can do it as
    .jar ?To tell the servlet container what to do with it. It has to extract the WARs after all. I don't think it'd extract a JAR file if it were in te deployment directory.
    Also keep in mind that WAR have additional content, like the Web.xml.
    But anyway why at time of delivry we create a EAR
    file ?Because it can contain more than just WARs. It also contains deployment modules for application servers.
    what are the significance of making file
    differently ? Is it not posssible to make everything
    .jar and deliver it.Why do you care whether it's called .jar or .ear? Especially since there's a clear semantic difference, even if they all are just ZIP files.

  • Ejbc -  creating deployable jar file

    Hi ...
    I have created the home/remote interface and the bean...I deployed them thru the Webogic 5 GUI and its working fine.
    I try to do it from the console ...i create 2 xml files ..keep it in the meta-inf folder...create a jar file with C:>jar cvf ..... command..
    When i try to create a deployable jar file with C:> ejbc command it gives the folloing error
    "ERROR: Error from ejbc: Unable to load a class required by your EJB: hello.HelloHome
    ERROR: ejbc found errors"
    My ejb-jar.xml file is as follows ->
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>Hello</ejb-name>
    <home>hello.HelloHome</home>
    <remote>hello.Hello</remote>
    <ejb-class>hello.HelloBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Also if I remove the package and then try to create the deployable jar file it works perfectly fine...
    Any idea..why's the problem coming...
    Replies awaited!
    Thanks in advance...

    set classpath for j2ee.jar, jar files that comes with weblogic 5.1
    then try it out..

  • Adding dependency jars to EAR

    Can anyone advise me on how to add a normal jar file to my EAR file? I have deployed
    the EAR on weblogic but the ejb does not get deployed becuase it cannot find a
    class. The class is included within a seperat jar file which does not have any
    EJBs in it. How do I add this to the application xml so it is available to all
    the ejb modules within the ear?
    Thanks in advance

    hi,
    unfortuantely i am using weblogic 7 thus have to put the class path entries into
    the manifest.
    I have done this but it still throws the classdefnotfound exception. I will outline
    what i have done if anyone can help. I have an Ear file called a.Ear. In it
    there is one EJB module called BEJB.jar. This jar has a dependecy on another
    jar called c.jar.
    The BEJB.jar and c.Jar are both contained within the EAR file and in the application.xml
    file I have put the following for the EJb module
    <module>
    <ejb>BEJB.jar</ejb>
    </module>
    In the manifest file I have added the following entry. This is the manifest file
    which is within the BEJB.jar
    Manifest-Version: 1.0
    Class-Path: c.jar
    The manifest file for the EAR i have not touched. I have built all the jars using
    ant. I have checked the manifest files and they are within the correct directory
    within the appropriate jar i.e meta-inf and contain the above information.
    This still throws the classdefnotfounderror.......Any ideas what i am missing?
    Thanks
    "Pat Bumpus" <[email protected]> wrote:
    >
    Hi,
    You don't add anything to your application.xml. I'm assuming that you
    are using
    WLS 8.1. In your EAR add an APP-INF/lib directory and place the jar
    there. Then
    when your EAR is deployed WLS will load the classes from that jar file.
    Before, WLS 8.1 you have to add class-path entries to your MANIFEST.MF
    file which
    is kind of a pain.
    Hope this helps,
    pat
    "fez" <[email protected]> wrote:
    Can anyone advise me on how to add a normal jar file to my EAR file?
    I have deployed
    the EAR on weblogic but the ejb does not get deployed becuase it cannot
    find a
    class. The class is included within a seperat jar file which does not
    have any
    EJBs in it. How do I add this to the application xml so it is available
    to all
    the ejb modules within the ear?
    Thanks in advance

  • Manifest to ejb-client-jar ??

    Hi,
    I have an EAR with an EJB module. Into the EJBmodule.jar my Manifest.mf lists many jars in "Class-path:".
    In EJB1.1 it's deprecated (if I understood it well...), can I specify many jars in the ejb-jar.xml <ejb-client-jar> element?? (If yes, how to write them??)
    Example:
    -- Manifest
    Class-path: myjar1.jar myjar2.jar
    --> <ejb-client-jar>myjar1.jar myjar2.jar</ejb-client-jar> ?

    I realized that class-path has not to do with ejb-client-jar... but is this a kind of filter on the client view of beans (i.e. another jar with only stubs and interfaces?? this should be a deploy-tool yield..)?

  • Unable to deploy EJB: pipeline.jar from pipeline.jar:

    Hi
    While startng server i get this error. but from server console i see it is deployed
    properly.
    Why it is happeing ?
    Can anyone please gie insight into this ?
    Appreciate your time.
    Thanks,
    Nishant
    ####<Sep 8, 2003 9:34:18 AM EDT> <Info> <Data Synchronization> <kreme> <claimsportalserver>
    <main> <kernel identity> <> <00000
    0> <Application: portalApp; Data Repository of type Pipeline Data Repository created
    with persistence manager of type com.bea.
    p13n.appflow.pipeline.internal.PipelinePersistenceManager.>
    ####<Sep 8, 2003 9:34:18 AM EDT> <Error> <J2EE> <kreme> <claimsportalserver> <main>
    <kernel identity> <> <160001> <Error deplo
    ying application pipeline:
    Unable to deploy EJB: pipeline.jar from pipeline.jar:
    java.lang.AbstractMethodError
    at weblogic.jdbc.pool.ResultSet.getClob(ResultSet.java:957)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.getClob(ResultSetImpl.java:1021)
    at weblogic.jdbc.rmi.SerialResultSet.getClob(SerialResultSet.java:1356)
    at com.bea.p13n.util.jdbc.GenericDatabase.getClob(GenericDatabase.java:457)
    at com.bea.p13n.management.data.repository.persistence.JdbcDataSource.createDataItems(JdbcDataSource.java:565)
    at com.bea.p13n.management.data.repository.persistence.JdbcDataSource.refresh(JdbcDataSource.java:495)
    at com.bea.p13n.management.data.repository.persistence.JdbcPersistenceManager.refresh(JdbcPersistenceManager.java:106)
    at com.bea.p13n.management.data.repository.internal.AbstractDataRepository.<init>(AbstractDataRepository.java:186)
    at com.bea.p13n.management.data.repository.internal.MasterDataRepository.<init>(MasterDataRepository.java:46)
    at com.bea.p13n.management.data.repository.DataRepositoryFactory.getMasterDataRepository(DataRepositoryFactory.java:27
    1)
    at com.bea.p13n.appflow.pipeline.internal.PipelineExecutorImpl.initialize(PipelineExecutorImpl.java:620)
    at com.bea.p13n.appflow.pipeline.internal.PipelineExecutorImpl.<init>(PipelineExecutorImpl.java:124)
    at com.bea.p13n.appflow.pipeline.internal.PipelineExecutorImpl_x8bn7v_Impl.<init>(PipelineExecutorImpl_x8bn7v_Impl.jav
    a:27)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at weblogic.ejb20.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:128)
    at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:265)
    at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:148)
    at weblogic.ejb20.pool.Pool.createInitialBeans(Pool.java:188)
    at weblogic.ejb20.manager.StatelessManager.initializePool(StatelessManager.java:375)
    at weblogic.ejb20.deployer.EJBDeployer.initializePools(EJBDeployer.java:1507)
    at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:1392)
    at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:254)
    at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:85)
    at weblogic.j2ee.Application.addComponent(Application.java:294)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:164)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:303)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:256)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:207)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:732)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:714)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:417)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
    at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:952)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:470)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:198)
    at $Proxy44.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:4114)

    Hi
    While startng server i get this error. but from server console i see it is deployed
    properly.
    Why it is happeing ?
    Can anyone please gie insight into this ?
    Appreciate your time.
    Thanks,
    Nishant
    ####<Sep 8, 2003 9:34:18 AM EDT> <Info> <Data Synchronization> <kreme> <claimsportalserver>
    <main> <kernel identity> <> <00000
    0> <Application: portalApp; Data Repository of type Pipeline Data Repository created
    with persistence manager of type com.bea.
    p13n.appflow.pipeline.internal.PipelinePersistenceManager.>
    ####<Sep 8, 2003 9:34:18 AM EDT> <Error> <J2EE> <kreme> <claimsportalserver> <main>
    <kernel identity> <> <160001> <Error deplo
    ying application pipeline:
    Unable to deploy EJB: pipeline.jar from pipeline.jar:
    java.lang.AbstractMethodError
    at weblogic.jdbc.pool.ResultSet.getClob(ResultSet.java:957)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.getClob(ResultSetImpl.java:1021)
    at weblogic.jdbc.rmi.SerialResultSet.getClob(SerialResultSet.java:1356)
    at com.bea.p13n.util.jdbc.GenericDatabase.getClob(GenericDatabase.java:457)
    at com.bea.p13n.management.data.repository.persistence.JdbcDataSource.createDataItems(JdbcDataSource.java:565)
    at com.bea.p13n.management.data.repository.persistence.JdbcDataSource.refresh(JdbcDataSource.java:495)
    at com.bea.p13n.management.data.repository.persistence.JdbcPersistenceManager.refresh(JdbcPersistenceManager.java:106)
    at com.bea.p13n.management.data.repository.internal.AbstractDataRepository.<init>(AbstractDataRepository.java:186)
    at com.bea.p13n.management.data.repository.internal.MasterDataRepository.<init>(MasterDataRepository.java:46)
    at com.bea.p13n.management.data.repository.DataRepositoryFactory.getMasterDataRepository(DataRepositoryFactory.java:27
    1)
    at com.bea.p13n.appflow.pipeline.internal.PipelineExecutorImpl.initialize(PipelineExecutorImpl.java:620)
    at com.bea.p13n.appflow.pipeline.internal.PipelineExecutorImpl.<init>(PipelineExecutorImpl.java:124)
    at com.bea.p13n.appflow.pipeline.internal.PipelineExecutorImpl_x8bn7v_Impl.<init>(PipelineExecutorImpl_x8bn7v_Impl.jav
    a:27)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at weblogic.ejb20.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:128)
    at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:265)
    at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:148)
    at weblogic.ejb20.pool.Pool.createInitialBeans(Pool.java:188)
    at weblogic.ejb20.manager.StatelessManager.initializePool(StatelessManager.java:375)
    at weblogic.ejb20.deployer.EJBDeployer.initializePools(EJBDeployer.java:1507)
    at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:1392)
    at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:254)
    at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:85)
    at weblogic.j2ee.Application.addComponent(Application.java:294)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:164)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:303)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:256)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:207)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:732)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:714)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:417)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
    at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:952)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:470)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:198)
    at $Proxy44.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:4114)

  • Unable to resolve 'app/ejb/Common.jar#SequenceInstrument'

    I have developed a module with weblogic6.1 , but when I migrate it to weblogic
    7 ,it alway appears errors as following.
    I have build with weblogic 7 for many times , but nothing change , please help
    me.
    ------error info ----
    weblogic.management.ApplicationException: Prepare failed. Task Id = 7
    Module Name: Common, Error: Exception while rollback of module : EJBModule(Common,status=NEW)
    Common.jar; nested exception is:
         javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/Common.jar#SequenceInstrument'
    Resolved: 'app/ejb' Unresolved:'Common.jar#SequenceInstrument' ; remaining name
    'Common.jar#SequenceInstrument'
    TargetException: weblogic.ejb20.UnDeploymentException: Common.jar; nested exception
    is:
         javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/Common.jar#SequenceInstrument'
    Resolved: 'app/ejb' Unresolved:'Common.jar#SequenceInstrument' ; remaining name
    'Common.jar#SequenceInstrument'
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:661)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:552)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1056)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:724)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

    Hello Sanjay,
    This should work without any problems. Can you provide your manifest.mf file?
    Meanwhile, refer to the following link for more documentation about WebLogic classloading
    and how to specify a manifest.mf file to do what you're trying to achieve:
    http://edocs.bea.com/wls/docs70/programming/classloading.html#1073491
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Sanjay <[email protected]> wrote:
    Hi,
    I have an .ear file which as an ejb.jar and dependent.jar file. Now
    i set the classpath in MANIFEST.MF of ejb.jar and tried to deploy in
    weblogic server7.0 but my ejb is not able to identity my dependent.jar
    its throwing class not found error. I even tried setting up classpath
    even @ my MANIFEST.MF of ear also. still not able to resolve.
    So let me know does dependent.jar in ear is suppoted are not?

Maybe you are looking for