Ejb-ref element references to other beans

Hello,
Can anyone tell me what ejb references to other beans are for? (ejb-ref element).
I am completely missing the point and would be grateful if someone could tell me why I should have the overhead of writing this:
<ejb-ref>
<ejb-ref-name>ejb/waUserMgr</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.reuters.pds.webapp.bl.user.api.WAUserMgrHome</home>
<remote>com.reuters.pds.webapp.bl.user.api.WAUserMgr</remote>
<ejb-link>WAUserMgrEJB</ejb-link>
</ejb-ref>
Any comment welcome..
Julien.

Hi,
The <ejb-ref> element is optional, you could use the actual JNDI name instead.
The advantage with using <ejb-ref> is that, if you deploy the bean on another server, probably with a different JNDI name,
your code can still continue using the same name as defined by <ejb-ref-name>.
Internally, the <ejb-ref-name> will be mapped to the actual JNDI location, maybe using symbolic links.

Similar Messages

  • More information about the ejb-ref element of ejb-jar.xml

    Hello,
    I am currently studying ejbs and I came across the ejb-ref element of the ejb-jar.xml file. I am in reference to O'Reilly Entreprise JavaBeans book. The book says that, thanks to the ejb-ref element it is possible to access one ejb from another ejb with the following client code:
    InitialContext jndiContext = new InitialContext();
    Object ref = jndiContext.lookup("java:comp/env/ejb/ProcessPaymentHomeRemote");
    ProcessPaymentHomeRemote home = (ProcessPaymentHomeRemote) PortableRemoteObject.narrow(ref, ProcessPaymentHomeRemote.class);I thought one could invoke the above client code without the ejb-ref element being present in the ejb-jar.xml... I am right or wrong?
    Then why the need for the ejb-ref element? Can anyone give me a concrete example of usage of the ejb-ref element where the ejb-ref element really is useful? What are the advantages of using the ejb-ref element?
    Thanks in advance,
    Julien Martin.

    Hi Julien,
    The main reason is portability. It's true that in many J2EE implementations it is possible to access an EJB's Home object without going through the component context (java:comp/env), but all such approaches are NOT portable. In the J2EE programming model, all resource access is made via the private component namespace. Using this level of indirection allows the bean developer to code the application without having to know which physical resource will be used at runtime. Each J2EE implementation can use a different scheme to identity physical resources, so by sticking to logical references in your code, you guarantee portability. Finally, you have the advantage that you can change which physical resource is mapped at deployment time without having to change your code.
    So, the bottom line is, whenever you have any J2EE component (ejb, servlet, jsp, Application Client) that looks up an ejb, data source, queue, connection factory, etc., always use the environment reference type that J2EE defines for it and look it up via java:comp/env.
    --ken
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • Help needed - why we use ejb-ref element in ejb-jar.xml

    hi all
    can anyone tell me what is the purpose of this element in the ejb deploy descriptor? thanks

    Suppose u have bean A, which needs to look up another bean B. Normally you wud need to use the jndi lookup using the initial context to access the bean B's home interface. If you use ejb-ref element you dont need to know the JNDI name of bean B. You can use ejb-ref-name instead. So you can say this is a short cut method of looking up and getting a reference to a bean's home object.

  • Web.xml question -- ejb-ref

    Can anyone explain the reasons for using the <ejb-ref> tag in the web.xml file?
    Currently, I have a context-param that matches a param-name to a param-value. My code looks up the param-value and, via JNDI, gets the EJB referenced.
    Does the <ejb-ref> tag provide an easier, more standard method for doing this or is it there just to show that particular EJB is referenced?
    Any information would be very helpful.

    Thanks, but this makes no sense to me. Why should a
    web app be different than any other app? Why make a
    special tag?
    Is this tag required? Is it possible to use an EJB
    without it or is this someone required?Your webapp can access the ejb without this tag at all but using its jndi name. This tag (<ejb-ref>) is just a standard way of accessing ejb's within the webapp.
    For eg. consider this WEB.XML,
    <ejb-ref>
    <description>Reference to DEPT bean</description>
    <ejb-ref-name>EJB-DeptRecord</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.test.DeptHome</home>
    <remote>com.test.DeptRemote</remote>
    </ejb-ref>
    You can lookup like this using the ejb-reference name.
    Context ctx = new InitialContext();
    Object obj = ctx.lookup("java:comp/env/EJB-DeptRecord"); <-------
    Since JNDI names usually have directory structure (eg. /test/ejb/..),
    this ejb-ref tag provides a convenient way to do the lookup without the jndi-name cluttering up your code.

  • Defining ejb references to other servers

    Hello,
    I'm using ejbs in a distributed environment and I haven't found any info on how to define bean references
    between servers on deploy.
    My problem is as follows:
    Session bean A needs to use session bean B which is located on another server.
    A doesn't know the location of server for B nor the fact that B even is on different server.
    A asks B from the local jndi environment using the name ejb/B.
    How can I define on deploy that the location of B is actually sess_iiop://serverB.com:port:sid/context/B?
    Is it somehow possible to define this mapping in the deployment descriptors?
    null

    Hi,
    The <ejb-ref> element is optional, you could use the actual JNDI name instead.
    The advantage with using <ejb-ref> is that, if you deploy the bean on another server, probably with a different JNDI name,
    your code can still continue using the same name as defined by <ejb-ref-name>.
    Internally, the <ejb-ref-name> will be mapped to the actual JNDI location, maybe using symbolic links.

  • Using ejb-ref tag for EJB toEJB reference

    Hello all respected members,
    I am using weblogic 5.1 (sp 9).
    I have two Session EJBs - a client and another is the referenced by
    the client.
    The client is using services of the referenced EJB.
    The two EJBs are in two very different packages.
    Now say I am trying to deploy the client EJB first, without deploying
    the referenced EJB.
    What I expect (rather, want)is, when the client EJB is being deloyed,
    it should give a notification somehow (let's say, by throwing an
    exception) that the referenced EJB is not yet deployed.
    First of all, is this possible ?
    Secondly, I am aware of the of the <ejb-ref> tag. In order to meet my
    requirement, I have added the same tag in the client's ejb-jar.xml and
    corresponding <ejb-reference-description> tag in the
    weblogic-ejb-jar.xml file.
    When I start the weblogic server, I can see that the referenced EJB is
    not deployed. But the client EJB is being deployed, it does not give
    any notification that the referenced EJB is not yet deployed and gets
    deployed successfully.
    In other words, I expect <ejb-ref> tag to let me know that the
    referenced EJB is not yet deployed. Is my understanding of <ejb-ref>
    tag correct ?
    It is clear to me that when the client EJB tries to instantiate the
    referenced EJB to use its services, it would throw an exception
    (during the lookup) since the referenced EJB is not deployed. But I
    want to avoid this exception at this stage. I want to get a
    notification of this, much before i.e. when the weblogic is deploying
    my client EJB. I think the <ejb-ref> tag does this. Hence I am using
    it.
    If I am going in wrong direction, is there any other way to fulfil my
    requirement ?
    Please advise.
    Neelesh.

    The <ejb-ref> element is used at deployment to map the bean references.
    The beans referred to should already be deployed.
    Neelesh wrote:
    Hello all respected members,
    I am using weblogic 5.1 (sp 9).
    I have two Session EJBs - a client and another is the referenced by
    the client.
    The client is using services of the referenced EJB.
    The two EJBs are in two very different packages.
    Now say I am trying to deploy the client EJB first, without deploying
    the referenced EJB.
    What I expect (rather, want)is, when the client EJB is being deloyed,
    it should give a notification somehow (let's say, by throwing an
    exception) that the referenced EJB is not yet deployed.
    First of all, is this possible ?
    Secondly, I am aware of the of the <ejb-ref> tag. In order to meet my
    requirement, I have added the same tag in the client's ejb-jar.xml and
    corresponding <ejb-reference-description> tag in the
    weblogic-ejb-jar.xml file.
    When I start the weblogic server, I can see that the referenced EJB is
    not deployed. But the client EJB is being deployed, it does not give
    any notification that the referenced EJB is not yet deployed and gets
    deployed successfully.
    In other words, I expect <ejb-ref> tag to let me know that the
    referenced EJB is not yet deployed. Is my understanding of <ejb-ref>
    tag correct ?
    It is clear to me that when the client EJB tries to instantiate the
    referenced EJB to use its services, it would throw an exception
    (during the lookup) since the referenced EJB is not deployed. But I
    want to avoid this exception at this stage. I want to get a
    notification of this, much before i.e. when the weblogic is deploying
    my client EJB. I think the <ejb-ref> tag does this. Hence I am using
    it.
    If I am going in wrong direction, is there any other way to fulfil my
    requirement ?
    Please advise.
    Neelesh.

  • Error starting WL - weblogic.xml.dom.ChildCountException: missing child home in ejb-ref

    hi,
    i get this following error when i start the WL 7.0. The web application fails
    to start but the ejbs are started properly. This is an example from the Monson
    Haefel book, on the CMP: Entity bean relationships.
    Can anybody tell me what is happening ??
    -thanks
    -vasanth
    Error log:
    =============
    <Error> <HTTP> <101179> <[HTTP] Error parsing des criptor in Web appplication
    "C:\bea\user_projects\mydomain\.\myserver\.wlnotdele
    te\titan\titan.war" [Path="C:\eclipse\workspace\titan4\dist\titan.ear", URI="tit
    an.war"
    weblogic.xml.dom.ChildCountException: missing child home in ejb-ref
            at weblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
            at weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
            at weblogic.servlet.internal.dd.EJBReference.<init>(EJBReference.java:61
            at weblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
    .java:247)
            at weblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(Descri
    ptorLoader.java:540)
            at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    .java:253)
            at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    .java:215)
            at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.ja
    va:282)
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:714)
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
            at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
            at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
            at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
            at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
            at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
            at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
            at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
            at weblogic.Server.main(Server.java:32)
    >
    <Jun 23, 2003 10:10:51 AM CDT> <Error> <Deployer> <149205> <The Slave Deployer
    f
    ailed to initialize the application titan due to error weblogic.management.Appli
    cationException: Prepare failed. Task Id = null
    Module Name: titan.war, Error: Could not load web application from 'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    weblogic.management.ApplicationException: Prepare failed. Task Id = null
    Module Name: titan.war, Error: Could not load web application from 'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:720)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
    at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
    at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >

    It is working now.
    For a local entity bean, i was using <ejb-ref> instead of <local-ejb-ref>
    Once i changed that, it worlked.
    thanks
    -vasanth
    "Sanjeev Chopra" <[email protected]> wrote:
    correct url for doc...
    http://e-docs.bea.com/wls/docs81/webapp/web_xml.html#1020090
    "Sanjeev Chopra" <[email protected]> wrote in message
    news:[email protected]...
    Seems like titan.war's WEB-INF/web.xml has an ejb-ref element witha
    missing
    <home> element .
    see http://e-docs/wls/docs81/webapp/web_xml.html#1020090
    "Vasanth" <[email protected]> wrote in message
    news:[email protected]...
    hi,
    i get this following error when i start the WL 7.0. The web applicationfails
    to start but the ejbs are started properly. This is an example from
    the
    Monson
    Haefel book, on the CMP: Entity bean relationships.
    Can anybody tell me what is happening ??
    -thanks
    -vasanth
    Error log:
    =============
    <Error> <HTTP> <101179> <[HTTP] Error parsing des criptor in Webappplication
    "C:\bea\user_projects\mydomain\.\myserver\.wlnotdele
    te\titan\titan.war" [Path="C:\eclipse\workspace\titan4\dist\titan.ear",URI="tit
    an.war"
    weblogic.xml.dom.ChildCountException: missing child home in ejb-ref
    atweblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
    at
    weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
    atweblogic.servlet.internal.dd.EJBReference.<init>(EJBReference.java:61
    atweblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
    java:247)
    atweblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(Descri
    ptorLoader.java:540)
    atweblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    java:253)
    atweblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
    java:215)
    atweblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.ja
    va:282)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:714)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
    atweblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
    atweblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
    atweblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
    atweblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >
    <Jun 23, 2003 10:10:51 AM CDT> <Error> <Deployer> <149205> <The SlaveDeployer
    f
    ailed to initialize the application titan due to errorweblogic.management.Appli
    cationException: Prepare failed. Task Id = null
    Module Name: titan.war, Error: Could not load web application from'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    weblogic.management.ApplicationException: Prepare failed. Task Id
    = null
    Module Name: titan.war, Error: Could not load web application from'C:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:720)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:555)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:458)
    atweblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
    ations(SlaveDeployer.java:490)
    atweblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
    er.java:253)
    atweblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
    alize(DeploymentManagerServerLifeCycleImpl.java:150)
    atweblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
    ava:54)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
    at weblogic.Server.main(Server.java:32)
    >

  • Ejb-ref questions:

    1.if an entity-A is referece to entity-B , and entity-B
    is referece to entity-C (and that is
    declared in entity-B 'ejb-jar.xml' !) , when adding
    'ejb-local-ref' to entity-A ,beside of adding
    entity-B,should entity-C be added too ,or a one can
    assume that the EJB container will use the already define
    reference between entity-B and entity-C.
    This is a simple situation , what about a whole graph
    of references ? should one keep track on the whole graph
    or let the container do that for him ?!
    2.I got several entity beans.
    I wrapped the session beans in a java class as a manager.(through the local interfaces) - and now i created a session bean that uses the data managers layer - I defined an ejb ref to all related entity beans (in the seiion bean ejb - jar file) ....when i run the sesiion functions i get EJBException - not bound (refering the entity bean local home) ?????
    Thanks,
    Liat

    In jboss xml the entity is defined like this:
    <entity>
             <ejb-name>User</ejb-name>
             <local-jndi-name>ejb/persistence.UserLocal</local-jndi-name>
             <jndi-name>ejb/persistence.User</jndi-name>
          </entity>and in the ejb jar the local ref is:
    <ejb-local-ref>
                    <ejb-ref-name>Permission</ejb-ref-name>
                    <ejb-ref-type>Entity</ejb-ref-type>
                    <local-home>persistence.PermissionLocalHome</local-home>
                    <local>persistence.PermissionLocal</local>
                    <ejb-link>Permission</ejb-link>
                </ejb-local-ref>I am looking for the object - in the data manager (which used by the session bean) this way:
    permissionLocalHome = (PermissionLocalHome) locator.getEjbLocalHome("java:comp/env/ejb/persistence.PermissionLocal");thanks for the help

  • What are ejb-ref entries for?

    Why is there an <ejb-ref> element in the web.xml descriptor? I can just as simply
    reference an EJB from a webapp using the code:
    InitialContext ctx = new InitialContext();
    SpecialHome home = (SpecialHome) ctx.lookup("jndi.path.to.home");
    Special special = home.create();
    As I can using the code:
    InitialContext ctx = new InitialContext();
    SpecialHome home = (SpecialHome)
    ctx.lookup("java:comp/env/ejb/ejb-ref-specified-item");
    Special special = home.create();
    So... what's the benefit of using an <ejb-ref> element to add indirection to my ejb
    references as opposed to resolving them by absolute JNDI name? Is it faster? Or
    is it just that the indirection allows me to theoretically swap out naming servers/contexts/names
    at some future point (in which case it seems like an awful lot of trouble). Or is
    there something else I'm missing?
    Thanks!

    The ejb-ref is an ejb standard to be implemented across all the different application servers. You
    have to use this if you are going to support multiple application servers. I don't think there is any
    performance benefit using this.
    Shiva.
    Joshua Davies wrote:
    Why is there an <ejb-ref> element in the web.xml descriptor? I can just as simply
    reference an EJB from a webapp using the code:
    InitialContext ctx = new InitialContext();
    SpecialHome home = (SpecialHome) ctx.lookup("jndi.path.to.home");
    Special special = home.create();
    As I can using the code:
    InitialContext ctx = new InitialContext();
    SpecialHome home = (SpecialHome)
    ctx.lookup("java:comp/env/ejb/ejb-ref-specified-item");
    Special special = home.create();
    So... what's the benefit of using an <ejb-ref> element to add indirection to my ejb
    references as opposed to resolving them by absolute JNDI name? Is it faster? Or
    is it just that the indirection allows me to theoretically swap out naming servers/contexts/names
    at some future point (in which case it seems like an awful lot of trouble). Or is
    there something else I'm missing?
    Thanks!

  • What are the necessary elements in ejb-jar.xml with CMP entity bean

    What are the necessary elements in ejb-jar.xml with CMP entity bean
    Actually i am using webligic 8.1 and while deployment getting the error that
    some elements r missing
    Thanks
    Anand Pritam

    According to the ejb-jar.xml dtd ejb-name, ejb-class, persistence-type, prim-key-class, reentrant are the required elements for an entity bean.
    <!ELEMENT entity (description?, display-name?, small-icon?,
              large-icon?, ejb-name, home?, remote?, local-home?,
              local?, ejb-class, persistence-type, prim-key-class,
              reentrant, cmp-version?, abstract-schema-name?,
              cmp-field*, primkey-field?, env-entry*, ejb-ref*,
              ejb-local-ref*, security-role-ref*, security-identity?,
              resource-ref*, resource-env-ref*, query*)>

  • How to lookup EJB3 beans using JNDI names without defining ejb-ref in DD?

    Hi Kenneth,
    I am just continuing the topic:
    How Lookup SLSB from other SLSB? <HELP>
    http://forum.java.sun.com/thread.jspa?threadID=5117484&tstart=0
    (my original forums account failed, so I am using new one)
    if I am not seeking portability I should be able to lookup a bean directly through JNDI without using the ejb-ref. (I just want to see how it can be done)
    http://forum.java.sun.com/thread.jspa?forumID=13&threadID=751907
    http://www.theserverside.com/discussions/thread.tss?thread_id=16402
    I am using SJSAS PE 9.0 I am failing to lookup my beans from other beans directly without ejb-ref.
    Is there some sample code to look at?
    Thanks!

    Global JNDI names are vendor-specific and not known until deployment time. That is one
    of the main reasons the Java EE component environment model defines a level of
    indirection for accessing component dependencies. It is best to use either an ejb-ref
    or @EJB annotation when accessing EJBs from a Java EE component.
    If you choose not to, you just have to make sure the global JNDI name you use matches
    the one assigned to the target EJB. We have a lot of information on how this works
    in our EJB FAQ.
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    If you're still encountering an error, please provide more specifics about your application,
    the code you're using for the lookup, and the error message you're receiving. Just
    saying "my looking fails" doesn't help us diagnose the problem :-)
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Ejb-ref in the deployment descriptor

    Could someone help me on how to configure an ejb-reference in the 3 xml
    files.
    ejb-jar.xml, weblogic-ejb-jar.xml and web.xml
    These are the entries for my application, but I get some exception. Can
    somebody help me pls?
    ejb-jar.xml
    <enterprise-beans>
    <session id="Abcd">
    <small-icon></small-icon>
    <ejb-name>ABCD</ejb-name>
    <home>AbcdHome</home>
    <remote>AbcdRemote</remote>
    <ejb-class>AbcdBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    web.xml contains the foll,
    <ejb-ref>
    <ejb-ref-name>ejb/abcd</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>AbcdHome</home>
    <remote>AbcdRemote</remote>
    <ejb-link>ABCD</ejb-link>
    </ejb-ref>
    weblogic.ejb-jar.xml contains,
    <weblogic-enterprise-bean>
    <ejb-name>ABCD</ejb-name>
    <caching-descriptor>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </caching-descriptor>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/abcd</ejb-ref-name>
    <jndi-name>ejb/ABCD</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    But when i run the application, I get the foll exception,
    In EJB RemotePlatform, a session or entity bean that has a remote home m
    ust be given a JNDI name in the weblogic-ejb-jar.xml descriptor file.
    at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChe
    cker.java:256)
    at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJ
    BComplianceChecker.java:220)
    at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:4
    52)
    at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:409)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:202)
    at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:296)
    at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:676)
    at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:843)
    at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy34.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2706)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:360)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy48.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    >
    <Jan 31, 2002 3:56:18 PM PST> <Error> <J2EE> <Error deploying application
    Defaul
    tVoiceApp: Could not load DefaultVoiceApp>
    java.lang.reflect.UndeclaredThrowableException:
    weblogic.xml.dom.DOMProcessingEx
    ception: Could not setup environment for EJBReference or ResourceReference.
    Can
    not find WEB-INF/weblogic.xml in the Web application.
    at weblogic.servlet.internal.WebAppServletContext.initFromDescriptors(We
    bAppServletContext.java:1509)
    at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletCont
    ext.java:871)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
    ntext.java:806)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:144)
    at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
    r.java:76)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy35.addWebDeployment(Unknown Source)
    at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
    ployment(WebServerMBean_CachingStub.java:1093)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:315)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy34.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2706)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:360)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy48.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    --------------- nested within: ------------------
    weblogic.j2ee.DeploymentException: Could not load DefaultVoiceApp - with
    nested
    exception:
    [weblogic.xml.dom.DOMProcessingException: Could not setup environment for
    EJBRef
    erence or ResourceReference. Cannot find WEB-INF/weblogic.xml in the Web
    applic
    ation.]
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:416)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:144)
    at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
    r.java:76)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy35.addWebDeployment(Unknown Source)
    at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
    ployment(WebServerMBean_CachingStub.java:1093)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:315)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy34.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2706)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:360)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy48.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    Can someone help me on what to set in sequence please. Any help would highly
    be appreciated.
    Thanks in advance.
    Regards
    Aru

    Aaru,
    Verify the document structure @
    http://e-docs.bea.com/wls/docs61/ejb/reference.html#1026457
    jndi-name is of the ejb is missing in your WEJ.xml
    and the jndi-name defined under
    <reference-descriptor><ejb-reference-description>
    </reference-descriptor></ejb-reference-description>
    is the reference jndi-name(referenced by this bean)
    For more info refere
    the weblogic 6.x dtd
    http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd
    Venki..
    Aru wrote:
    As per the doc that you referred, the doc too says that the jndi-name should
    be within the ejb-reference-description which in turn is inside the
    reference-descriptor. I don't get what you tried to say. Am I missing
    anything? Could you please make sure that for me.
    Just with curiosity I even tried your suggestion but it gives me the
    exception as expected,
    The XML parser encountered an error in your deployment descriptor. Please
    ensure
    that your deployment descriptor corresponds to the format in the DTD. The
    error
    was:
    org.xml.sax.SAXParseException: The content of element type
    "ejb-reference-descr
    iption" is incomplete, it must match "(ejb-ref-name,jndi-name)".
    "Venki Seshaadri" <[email protected]> wrote in message
    news:[email protected]...
    Aaru,
    <jndi-name> should be outside <reference-descriptor>
    refer to http://e-docs.bea.com/wls/docs61/ejb/reference.html#1026457
    <weblogic-enterprise-bean>
    <reference-descriptor>...</reference-descriptor>
    <jndi-name>ejb/ABCD</jndi-name>
    </weblogic-enterprise-bean>
    Hope this helps,
    Venki
    [email protected]
    Aru wrote:
    FYI, I am using Weblogic 6.1
    "Aru" <[email protected]> wrote in message
    news:[email protected]...
    Could someone help me on how to configure an ejb-reference in the 3 xml
    files.
    ejb-jar.xml, weblogic-ejb-jar.xml and web.xml
    These are the entries for my application, but I get some exception. Can
    somebody help me pls?
    ejb-jar.xml
    <enterprise-beans>
    <session id="Abcd">
    <small-icon></small-icon>
    <ejb-name>ABCD</ejb-name>
    <home>AbcdHome</home>
    <remote>AbcdRemote</remote>
    <ejb-class>AbcdBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    web.xml contains the foll,
    <ejb-ref>
    <ejb-ref-name>ejb/abcd</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>AbcdHome</home>
    <remote>AbcdRemote</remote>
    <ejb-link>ABCD</ejb-link>
    </ejb-ref>
    weblogic.ejb-jar.xml contains,
    <weblogic-enterprise-bean>
    <ejb-name>ABCD</ejb-name>
    <caching-descriptor>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </caching-descriptor>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/abcd</ejb-ref-name>
    <jndi-name>ejb/ABCD</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    But when i run the application, I get the foll exception,
    In EJB RemotePlatform, a session or entity bean that has a remote home m
    ust be given a JNDI name in the weblogic-ejb-jar.xml descriptor file.
    at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChe
    cker.java:256)
    at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJ
    BComplianceChecker.java:220)
    at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:4
    52)
    at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:409)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:202)
    at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:296)
    at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:676)
    at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:843)
    at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy34.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2706)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:360)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy48.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    <Jan 31, 2002 3:56:18 PM PST> <Error> <J2EE> <Error deploying
    application
    Defaul
    tVoiceApp: Could not load DefaultVoiceApp>
    java.lang.reflect.UndeclaredThrowableException:
    weblogic.xml.dom.DOMProcessingEx
    ception: Could not setup environment for EJBReference or
    ResourceReference.
    Can
    not find WEB-INF/weblogic.xml in the Web application.
    at weblogic.servlet.internal.WebAppServletContext.initFromDescriptors(We
    bAppServletContext.java:1509)
    at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletCont
    ext.java:871)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
    ntext.java:806)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:144)
    at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
    r.java:76)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy35.addWebDeployment(Unknown Source)
    at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
    ployment(WebServerMBean_CachingStub.java:1093)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:315)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy34.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2706)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:360)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy48.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    --------------- nested within: ------------------
    weblogic.j2ee.DeploymentException: Could not load DefaultVoiceApp - with
    nested
    exception:
    [weblogic.xml.dom.DOMProcessingException: Could not setup environment
    for> >>>>EJBRef>>>>erence or ResourceReference. Cannot find WEB-INF/weblogic.xml in the Web>>>>applic>>>>ation.
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:416)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:329)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:144)
    at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
    r.java:76)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy35.addWebDeployment(Unknown Source)
    at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
    ployment(WebServerMBean_CachingStub.java:1093)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
    oymentTarget.java:315)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
    loymentTarget.java:279)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
    ments(DeploymentTarget.java:233)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
    DeploymentTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy34.updateDeployments(Unknown Source)
    at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
    yments(ServerMBean_CachingStub.java:2706)
    at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
    er(ApplicationManager.java:360)
    at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
    nManager.java:152)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
    eanImpl.java:606)
    at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
    .java:590)
    at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
    ionMBeanImpl.java:350)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    55)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
    23)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
    at $Proxy48.start(Unknown Source)
    at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
    .start(ApplicationManagerMBean_CachingStub.java:479)
    at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
    at weblogic.management.Admin.finish(Admin.java:561)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
    at weblogic.Server.main(Server.java:35)
    Can someone help me on what to set in sequence please. Any help would
    highly
    be appreciated.
    Thanks in advance.
    Regards
    Aru

  • ejb-ref related question

    I've developed a stateful session ejb. It has the following entry in
    "ejb-jar.xml":
    <session>
    <display-name>L2CustomerBroker</display-name>
    <ejb-name>L2CustomerBroker</ejb-name>
    <home>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</home>
    <remote>com.brighthaul.ste.server.brokers.L2CustomerBroker</remote>
    <ejb-class>com.brighthaul.ste.server.brokers.L2CustomerBrokerBean</ejb-class
    >
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-ref>
    <ejb-ref-name>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</ejb-re
    f-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</home>
    <remote>com.brighthaul.ste.server.brokers.L2CustomerBroker</remote>
    <ejb-link>L2CustomerBroker</ejb-link>
    </ejb-ref>
    </session>
    Its matching entry in "weblogic-ejb-jar.xml" is:
    <weblogic-enterprise-bean>
    <ejb-name>L2CustomerBroker</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-clustering/>
    <allow-concurrent-calls>true</allow-concurrent-calls> <!-- Is this
    right?!! -->
    </stateful-session-descriptor>
    <transaction-descriptor/>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</ejb-re
    f-name>
    <jndi-name>L2CustomerBroker</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    <jndi-name>L2CustomerBroker</jndi-name>
    </weblogic-enterprise-bean>
    When a simple test application tries to locate the L2CustomerBroker bean
    via:
    context.lookup("com.brighthaul.ste.server.brokers.L2CustomerBroker");
    a NamingException is thrown:
    javax.naming.NameNotFoundException: Unable to resolve
    'com.brighthaul.ste.server.brokers.L2CustomerBrokerHome' Resolved: ''
    Unresolved:'com' ; remaining name
    'com.brighthaul.ste.server.brokers.L2CustomerBroker'
    at
    weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
    java:109)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :263)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :230)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown
    Source)
    at
    weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
    at
    weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at
    com.brighthaul.ste.common.util.EJBHomeFactory.lookUpHome(EJBHomeFactory.java
    :77)
    at
    com.brighthaul.ste.server.brokers.DeleteMe.main(DeleteMe.java:15)
    Exception in thread "main"
    What am I doing wrong?
    I'm able to locate the home interface via the "usual" way (looking up
    "L2CustomerBroker"). Does this form of lookup can be applied from another VM (standalone application)?
    Why do I have to declare the <ejb-ref> inside a <session> element?

    "One suggestion though, use simple names for EJB references.. something like "CustomerBroker""
    Since the consumer of the JNDI lookup must narrow the object to a known type, the simple name adds an unnecessary layer of indirection, and a subsequent maintenace hassle. The most straight-forward naming system is to use the fully-qualified name of the home interface, as the original poster has done.

  • Ejb-ref error when deploying a previously working ear on weblogic 8.1

    when deploying an ear module on weblogic 8.1 i get the following error:
    The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
    or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
    not be resolved. The target EJB for the ejb ref could not be found.
    The ear is composed of two sub-modules:
    CustomMessaginBrick.jar
    cmbrick.war.
    The same ear was deployed on weblogic 6.1.
    Every reference in the ear seems in the right place so i am really clueless.
    Hereafter i include the relevant portions of the deployment descriptors.
    the web.xml for cmbrick.war contains the following data:
    <ejb-local-ref>
    <ejb-ref-name>ejb/Service2</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
    <local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
    <ejb-link>CustomMessagingBrick</ejb-link>
    </ejb-local-ref>
    its weblogic.xml file is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
    "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/Service2</ejb-ref-name>
    <jndi-name>Service2</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-web-app>
    while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
    <weblogic-enterprise-bean>
    <ejb-name>CustomMessagingBrick</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>Service2</jndi-name>
    </weblogic-enterprise-bean>....

    when deploying an ear module on weblogic 8.1 i get the following error:
    The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
    or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
    not be resolved. The target EJB for the ejb ref could not be found.
    The ear is composed of two sub-modules:
    CustomMessaginBrick.jar
    cmbrick.war.
    The same ear was deployed on weblogic 6.1.
    Every reference in the ear seems in the right place so i am really clueless.
    Hereafter i include the relevant portions of the deployment descriptors.
    the web.xml for cmbrick.war contains the following data:
    <ejb-local-ref>
    <ejb-ref-name>ejb/Service2</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
    <local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
    <ejb-link>CustomMessagingBrick</ejb-link>
    </ejb-local-ref>
    its weblogic.xml file is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
    "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name>ejb/Service2</ejb-ref-name>
    <jndi-name>Service2</jndi-name>
    </ejb-reference-description>
    </reference-descriptor>
    </weblogic-web-app>
    while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
    <weblogic-enterprise-bean>
    <ejb-name>CustomMessagingBrick</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>Service2</jndi-name>
    </weblogic-enterprise-bean>....

  • Ejb-ref-mapping in orion-ejb.jar missing location attribute after deployment

    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.

    If the 'location' value is same as the 'name' value, then even though the location attribute is missing, it is ok and should work. If they are not the same, then you should have defined the ejb-link element in your ejb-jar.xml when defining this ejb-ref and that would make the location attribute appear in the generated orion-ejb-jar.xml.
    If the referenced bean is from a different application (EAR), then you should have used the -parent option when deploying the application.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Kris Trujillo ([email protected]):
    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.<HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • An Intel iMac AND a MacBook Pro for Logic Pro?

    I am torturing myself over this issue lately so any input you guys could offer would be welcome! This is the situation: After 3 months of serious debating whether to purchase a 20" Intel iMac or a MacBook Pro for Logic Pro, I went ahead about 3 weeks

  • Can i install snow leopard on Macbook without using Time Machine?

    Hi, I've backed up my files using SuperDuper and made 2 copies of my data on 2 usb sticks. Do I also need to use Time Machine to back up my files aswell, in order to update osx and install snow leopard?? If I've already got my 2 copies of my files on

  • I need a logic for the version management report

    HI Here with sending my req. Please give me the posible solution,its urgent, 1.     Get all the objects included in a transport request by using function module  /DGN/ITC_TRANSPORT_TO_OBJECT. 2.     Find the Objects which have the versions maintained

  • Not enough space error on ipad since installing itunes 11

    hi i installed the new version of iTunes (V11) tonight but since then have been unable to sync new video files to my ipad. The ipad has 8.61 GB free and I'm trying to add 8 x 235mb files to the device but each time it gets to Step 5 (determining trac

  • Illustrator CS4 keeps clearing preferences?

    Hi all, My copy of Illustrator CS4 is now clearing my preferences whenever I open a new file. For example, my colour swatches will disappear, my unit preference will revert from inches to points, and the Roland VersaWorks Swatches I need for using a