JNDI name in ejb-jar.xml

Hi all,
I am deploying about 80 beans to WebSphere using the console. I was wondering if it was possible to set the jndi name of my beans in the standard ejb-jar.xml file within my jarfile.
I tried to add the trags <jndi-name> or <jndiname> to my ejb-jar.xml but it is ignored and I still have to input all the jndi names by myself.
Seems like the jndi-name resided in the vendor-specific ejb-jar.xml.
Max.

Perhaps the <jndi-name> in weblogic-ejb-jar.xml:
<?xml version="1.0" ?>
  <!DOCTYPE weblogic-ejb-jar (View Source for full doctype...)>
  <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
      <ejb-name>CurrencyConverterBean</ejb-name>
      <stateless-session-descriptor />
      <jndi-name>conv</jndi-name>
    </weblogic-enterprise-bean>
  </weblogic-ejb-jar>

Similar Messages

  • Reg. Field names in ejb-jar.xml (EJB CMP)

    Hi,
    I am using WAS 5.1 and EJB CMP 2.0.
    I got a error while dealing with the database i.e ORACLE 8.The Scenario in detail,
    I had a table X with filed names 'help' and 'sequence'. When i am generating Jar file using 'ejbdeploy', the name of the field names in Table.ddl changing automatically to 'help1' and 'sequence1'. Due to this i am not able to access data from database.
    Why field names are changing? Are they keywords ? con't we have field names with the above names? If they are keywords tell me the document which contains these details?
    Thanks in Advance.

    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*)>

  • Common lookup for datasource name in ejb-jar.xml for all EJB's??

    I used <env-entry>...</env-entry> in ejb-jar.xml ...but that does not allow me to look the same entry in another EJB ...what is the right place to keep and look for such a information ?
    EJBing recently !!
    Thanks
    Ajay

    I am sorry friend, that is not what i am looking for.
    I have datasource/connection pool and do not want to hardcode the name into all EJB's rather want to access it from xml file. If i use
    <env-entry> that is for a perticular session or entity bean. and i have to write that for all 35 beans. I believe there shoule be a tag to access globaly.
    thanks for considering me to reply.
    Ajay

  • Dynamic jndi-name in weblogic-ejb-jar.xml

    Is there a way to create dynamic (i.e. runtime) jndi-names for EJBs instead of
    (or in addition to) "hard coding" them in the weblogic-ejb-jar.xml file? What
    I'm trying to do is have one WebLogic instance (JVM) host multiple environments
    (our Beta and Training environments) and I simply want to deploy the same .ear
    file twice but have each environment (application - .ear) reference a different
    database schema (jdbc connection pool). I have everything working just fine for
    this scenario except when I define jndi-names for our ejbs. The problem is that
    I am really deploying the same ejbs (jndi-names and actually code base) in each
    applicatoin instance and I get an exception when the WebLogic is trying to deploy
    the second application (.ear) because the jndi-names in it have already been deployed
    by the first application instance. I recieve a jndi error stating that the name
    is already deployed.
    Or is there a better path to go down for what I am trying to do to have one WebLogic
    instance support our beta and training environments? Usually (but not always)
    our code base is the for same for both of these environments, I simply need to
    have each environment use a different database schema.
    Thanks

    A little birdie tells me that BEA does this very thing. Looking at the
    descriptors for WebLogic Portal I see:
    <weblogic-enterprise-bean>
    <ejb-name>LoaderEJB</ejb-name>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>${APPNAME}.BEA_content.LoaderHome</jndi-name>
    </weblogic-enterprise-bean>
    Yes, the ${APPNAME} token really is expanded into the J2EE application
    name at deployment time!
    Sincerely,
    Daniel Selman
    Bryan Dixon wrote:
    Rewriting our build process isn't really much of an option for me. Our current
    build process is too complex and time consuming right now to convert to Ant (we
    eventually will do this but not for a while). So are there any other ideas that
    aren't build related?
    Thanks
    "Eric Ma" <[email protected]> wrote:
    You don't need run-time dynamism in JDNI names and it can't be done anyways.
    You
    need token substitution in XML configuration files when building the
    app. If
    you are using Ant for building, then it is a breeze. If not, first convert
    your
    build process to use Ant.
    Also, a single WLS instance hosting multiple environments sounds really
    INTRIGUING
    to me.
    Eric Ma
    "Bryan Dixon" <[email protected]> wrote:
    Is there a way to create dynamic (i.e. runtime) jndi-names for EJBsinstead
    of
    (or in addition to) "hard coding" them in the weblogic-ejb-jar.xml file?
    What
    I'm trying to do is have one WebLogic instance (JVM) host multiple environments
    (our Beta and Training environments) and I simply want to deploy the
    same .ear
    file twice but have each environment (application - .ear) referencea
    different
    database schema (jdbc connection pool). I have everything working just
    fine for
    this scenario except when I define jndi-names for our ejbs. The problem
    is that
    I am really deploying the same ejbs (jndi-names and actually code base)
    in each
    applicatoin instance and I get an exception when the WebLogic is trying
    to deploy
    the second application (.ear) because the jndi-names in it have already
    been deployed
    by the first application instance. I recieve a jndi error stating that
    the name
    is already deployed.
    Or is there a better path to go down for what I am trying to do to have
    one WebLogic
    instance support our beta and training environments? Usually (but not
    always)
    our code base is the for same for both of these environments, I simply
    need to
    have each environment use a different database schema.
    Thanks

  • Application deployment order with weblogic-ejb-jar.xml and jndi-name

    I have two applicatation working on Weblogic server v. 10.3.6.
    First of them creating one ejb stateless bean and creates JNDI maping for it (in weblogic-ejb-jar.xml file):
    <weblogic-enterprise-bean>
         <ejb-name>ConfigMenegerBean</ejb-name>
         <stateless-session-descriptor>
         <stateless-session-descriptor>
              <business-interface-jndi-name-map>
              <business-remote>package.ConfigurationSessionRemote</business-remote>
              <jndi-name>ConfigMeneger</jndi-name>
              </business-interface-jndi-name-map>
         </stateless-session-descriptor>
         <enable-call-by-reference>true</enable-call-by-reference>
         <jndi-name>ConfigMeneger</jndi-name>
    </weblogic-enterprise-bean>
    Second appication have to refer for this bean by JNDI using spring been lookup :
    <jee:jndi-lookup id="configManager" jndi-name="ConfigMeneger"/>
    I changed deployment order parameter for both apllication(first=100 and second=500) in order to first app start first and share bean by jndi to another application. Unfortuantelly I got an error :
    javax.naming.NameNotFoundException: Unable to resolve 'ConfigMeneger'. Resolved ''; remaining name 'ConfigMeneger'
    How can I configure deployment order that first application make jndi mapping for bean, before the second application will use it ?

    Ok in a way I have solved my problem (even if I am not completely satisfied by the way on how to proceed...). So thanks to message "JBuilder7.0 and Weblogic6.1" on EJB sun forum :
    http://forum.java.sun.com/thread.jsp?thread=285735&forum=13&message=1255488
    I have tried the following actions (mentionned in the other forum messages):
    - To preserve changes to weblogic*.xml, the safest way is to change the ejb-borland.xml.
    (I am not sure that I have applied this advice correctly, because I suppose that syntax is not similar in weblogic file or borland file).
    And you can MANUALLY update the weblogic file in your JAR archive.
    1. Open the EJB JAR file in Winzip and extract the weblogic-ejb-jar.xml file, so that a copy exists in your
    project directory.
    2. Open this file (in Notepad), add the WebLogic specific information, and then save the file.
    3. Now, when you are finished with the build cycle and are ready to deploy, you may open the EJB jar file
    and swap in the weblogic-ejb-jar.xml file."
    Good Luck.

  • JNDI and env. vars. in ejb-jar.xml

    I have been trying for several days now to have my EJB session bean access
    its env. vars. stored in the ejb-jar.xml document. I have been unsuccessful.
    The only place I have been able to store my env. vars. is in the web.xml
    document outside my .jar file. Although workable, it would be preferable to
    store them in the ejb-jar.xml document in my .jar file.
    I am hoping some one can help me. I am using the following code in my ejb:
    Context init = new InitialContext();
    Context env = (Context)init.lookup("java:comp/env");
    m_bTruncCorporate =
    ((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
    m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
    m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
    m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
    My ejb-jar.xml follows:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>MICRworksBean</ejb-name>
    <home>USDataworks.MICRworks.MICRworksHome</home>
    <remote>USDataworks.MICRworks.MICRworks</remote>
    <ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <description>Flag indicating whether to convert corporate
    checks</description>
    <env-entry-name>TruncateCorporate</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Location of the 1For1 exclusion files</description>
    <env-entry-name>OptionFilePath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-value
    >
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 account exclusions file</description>
    <env-entry-name>OptionFileAccount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>account_file.txt</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 routing exclusion file</description>
    <env-entry-name>OptionFileRouting</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>routing_file.txt</env-entry-value>
    </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MICRworksBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and my weblogic-ejb-jar.xml:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0
    EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>MICRworksBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>MICRworksBean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My feeling is that I am missing some sort of reference in the
    weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried several
    things without success.
    I would appreciate any help I can get...especially if it contains specific
    code I can use as I am rather new to writing and deploying ejbs!
    Thanx in advance. Marek :-)

    Thanks for the reference. I was using another book as a reference (Using
    Java 2 Enterprise Edition by Mark Wutka) which had the same sort of example
    and as you can see below, I coded my bean as they suggest...I'm still unable
    to access the env. vars.!
    I deployed by bean using WebLogic's Builder and but didn't create any sort
    of application. I let WebLogic do what it would on its own. The WebLogic
    documentation seemed to indicate for simple testing this would work
    fine...is it wrong?
    btw. MICRworks.MICR_ENV_TRUNCORP equates to "TruncateCorporate" as you
    probably guessed.
    The WebLogic Admin Console shows the environment variables in the EJB
    Descriptors for my EJB but they do not show up when I view the JNDI tree for
    my server. I have taken this to mean that the deployment tool is not
    binding my env. vars. for some reason which would explain why my bean can't
    find them.
    I know it must be something stupid I am doing (or not doing) but I just
    can't see it. Please help!
    "Ryan LeCompte" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello Marek,
    I would suggest that you download the free book "Mastering EJB 2ndEdition" by
    Ed Roman, Scott Ambler, and Tyler Jewell. The source code for the book isalso
    freely available and is meant to be deployed specifically on WebLogic.Look for
    a sample application called "Jasmine", which shows how to use environmententries.
    You will see a concrete example of how they are defined and later accessedfrom
    within EJBs. The book and source code are available at the followingaddress:
    >
    http://www.theserverside.com/books/masteringEJB/index.jsp
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Marek Kossak" <[email protected]> wrote:
    I have been trying for several days now to have my EJB session bean
    access
    its env. vars. stored in the ejb-jar.xml document. I have beenunsuccessful.
    The only place I have been able to store my env. vars. is in the web.xml
    document outside my .jar file. Although workable, it would be preferable
    to
    store them in the ejb-jar.xml document in my .jar file.
    I am hoping some one can help me. I am using the following code in my
    ejb:
    Context init = new InitialContext();
    Context env = (Context)init.lookup("java:comp/env");
    m_bTruncCorporate =
    ((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
    m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
    m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
    m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
    My ejb-jar.xml follows:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>MICRworksBean</ejb-name>
    <home>USDataworks.MICRworks.MICRworksHome</home>
    <remote>USDataworks.MICRworks.MICRworks</remote>
    <ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <env-entry>
    <description>Flag indicating whether to convert corporate
    checks</description>
    <env-entry-name>TruncateCorporate</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Location of the 1For1 exclusion files</description>
    <env-entry-name>OptionFilePath</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-valu
    e
    >>>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 account exclusions file</description>
    <env-entry-name>OptionFileAccount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>account_file.txt</env-entry-value>
    </env-entry>
    <env-entry>
    <description>Name of the 1For1 routing exclusion file</description>
    <env-entry-name>OptionFileRouting</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>routing_file.txt</env-entry-value>
    </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>MICRworksBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    and my weblogic-ejb-jar.xml:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    7.0.0
    EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>MICRworksBean</ejb-name>
    <stateless-session-descriptor>
    <pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>MICRworksBean</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My feeling is that I am missing some sort of reference in the
    weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried
    several
    things without success.
    I would appreciate any help I can get...especially if it containsspecific
    code I can use as I am rather new to writing and deploying ejbs!
    Thanx in advance. Marek :-)

  • No table name specified in ejb-jar.xml file

    Hi, I have an entity bean defined as follows:
    <enterprise-beans>
    <entity>
    <display-name>SponsorEJB</display-name>
    <ejb-name>SponsorEJB</ejb-name>
    <home>com.ultradns.j2ee.components.sponsor.ejb.SponsorHome</home>
    <remote>com.ultradns.j2ee.components.sponsor.ejb.Sponsor</remote>
    <ejb-class>com.ultradns.j2ee.components.sponsor.ejb.SponsorEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
         <resource-ref>
              <res-ref-name>jdbc/jdbc/OracleDS</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>     
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>sponsor</abstract-schema-name>
    <cmp-field>
    <primkey-field>guid</primkey-field>
         <query>
              <query-method>
                   <method-name>findAll</method-name>
                   <method-params></method-params>
              </query-method>
              <ejb-ql>
                   <![CDATA[ SELECT OBJECT(a) FROM sponsor AS a]]>
              </ejb-ql>
         </query>
    </entity>
    </enterprise-beans>
    In the database, I want this entity bean refers to a table named "sponsor", but I could not specify the relation in the ejb-jar.xml file. So when I deployed this bean, it auto created a table called "SponsorEJB". Where is this name come from, from display-name or ejb-name field?
    Basically, how can I specify a bean "SponsorEJB" referes to a table "sponsor"?
    Thanks,

    First thing, to stop OC4J auto-creating tables, edit the file %J2EE_HOME%/config/application.xml. Change the first orion-application tag so that one attribute says autocreate-tables="false"
    The ejb-jar.xml file describes your EJB's to the container. It is not supposed to describe which table each entity bean maps too, as this is an implementation specific property, so would not be portable between databases. Therefore you have to configure the container to point an entity to a table. Sun uses the sun-j2ee-ri.xml file to do this, and this has to be included in the deployment.
    OC4J however uses the file 'orion-ejb-jar.xml', and will generate this for you. Since you have already deployed your application, this will have already been generated. Go to the directory %J2EE_HOME%/application-deployments. There will be a directory corresponding to your application name. In there is a directory corresponding to your ejb module name, and in there is the 'orion-ejb-jar.xml' file. If you open this file, you will see the entity deployment tags, an example of one is below. Edit the tag so that the table attribute points to the table in your database (note that there is a data-source attribute as well, so make sure that this points to the correct schema). The example below points the EJB Emp to the table EMP:
    <entity-deployment name="Emp" max-instances="10" location="Emp" wrapper="EmpHome_EntityHomeWrapper3" table="EMP" data-source="jdbc/rob9iDS" locking-mode="optimistic" update-changed-fields-only="true" min-instances-per-pk="0" max-instances-per-pk="50" disable-wrapper-cache="true">
    Hope this helps,
    Rob

  • Ejb-jar.xml not using fully qualified class names

    HI,
    I am trying yo upgrade my application from weblogic 8.1 to weblogic 9.2.3. My application has both session and enitybeans. I updated weblogic related jars with 9.x version. But while running ejbgen, i am getting the following exception.
    *[java] weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to set the transaction attribute for method 'updateService(abcTO)' on EJB 'AbcService'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Local interface for this EJB.*
    In ejb-jar.xml file, it is not creating the fully qualified class name for abcTo in <method-param>. In component interface, the method signature is not contaning fully qualified class name for the parameters and return values.
    If i change the signature in the bean with the fully qualified class name of the parameter, the ejb-jar.xml file is creating fine. But there are 100's of signatures i need to change if this is the only solution.
    Can you please advice what i need to change when i upgrade from weblogic 8 to 9 series from session and entity bean's point of view?
    Thanks in Advance
    Naveen.
    Edited by: avn_venki on Mar 16, 2009 7:15 AM
    Edited by: avn_venki on Mar 16, 2009 7:15 AM

    ejb-jar.xml has always required fully-qualified class names. If some vendors have accepted unqualified class names unfortunately that
    behavior is non-portable. Your best bet is to fully-qualify the names. Perhaps you can find some tools to help you given the large
    number of components in your application.

  • "Could not locate the bean with the ejb-name XYZ in weblogic-ejb-jar.xml

    Hi,
    Please someone help me on this...
    I'm trying to deploy an application on WLS 8.1 SP4
    on HPUX IA64 arch. From the ear file WLS is able to
    deploy 3 jars but for the last two jars it's throwing
    the below error:
    Could not locate the bean with the ejb-name xyz in weblogic-ejb-jar.xml
    But ejb with name xyz is defined in the the weblogic-ejb-jar.xml file and it's also present in the
    META-INF/ejb-jar.xml file.
    I have no clue what's going wrong.
    Any help is appreciated.
    Thanks
    Mouli

    oops! Pls ignore my previous mail. It was for a different problem.
    FOr the original problem of "couldn ot locate the bean with the ejb-name XZY in weblogic-ejb-jar.xml":
    This happens if you don't have the below files defined
    for a JAR/EAR file:
    weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml (needed if you have any Datasource mapped)
    These two are basic files required for any JAR/EAR file.
    If you dont' have it already you can generate them using
    $WLS_HOME/bin/startWLBuilder.sh GUI tool bundled along
    with WLS (I used 8.1 SP4) to generate these files ! This tool is really helpful.
    - Mouli

  • Failed to load weblogic-ejb-jar.xml

    Hi,
    I try to deploy an EJB on Weblogic 9.1, but the weblogic-ejb-jar seems to cause this exception :
    ======================================================
    [wlappc] <30 oct. 2006 12 h 13 CET> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    [wlappc] com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/910
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:325)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:292)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:302)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:283)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    [wlappc] at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:138)
    [wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:271)
    [wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:240)
    [wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:300)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:344)
    [wlappc] at weblogic.application.descriptor.CachingDescriptorLoader.createDescriptor(CachingDescriptorLoader.java:188)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:328)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.getDescriptor(AbstractDescriptorLoader.java:237)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.getRootDescriptorBean(AbstractDescriptorLoader.java:217)
    [wlappc] at weblogic.ejb.spi.EjbJarDescriptor.parseWeblogicEjbJarBean(EjbJarDescriptor.java:171)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.processWLEjbJarXMLWithSchema(DDUtils.java:706)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.parseWLDD(DDUtils.java:535)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:358)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.createReadOnlyDescriptorFromJarFile(DDUtils.java:141)
    [wlappc] at weblogic.ejb.container.ejbc.EJBCompiler.parseDescriptors(EJBCompiler.java:1345)
    [wlappc] at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:431)
    [wlappc] at weblogic.application.compiler.AppcUtils.compileEJB(AppcUtils.java:292)
    [wlappc] at weblogic.application.compiler.EJBCompiler.compile(EJBCompiler.java:95)
    [wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:113)
    [wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:43)
    [wlappc] at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:55)
    [wlappc] at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    [wlappc] at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:24)
    [wlappc] at weblogic.application.compiler.Appc.runBody(Appc.java:151)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:158)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:115)
    ======================================================
    Here is my weblogic-ejb-jar.xml file :
    ======================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/910"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.bea.com/ns/weblogic/910
              http://www.bea.com/ns/weblogic/910/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>MyMDB</ejb-name>
    <message-driven-descriptor>
         <resource-adapter-jndi-name>ActiveMQRA</resource-adapter-jndi-name>
         <connection-factory-jndi-name>myQCF</connection-factory-jndi-name>
    </message-driven-descriptor>
    <resource-description>
    <res-ref-name>jms/factory</res-ref-name>
    <jndi-name>myQCF</jndi-name>
    </resource-description>
    <resource-env-description>
    <resource-env-ref-name>jms/queue</resource-env-ref-name>
    <jndi-name>queue.out</jndi-name>
    </resource-env-description>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ======================================================
    So, it looks like this problem : http://forums.bea.com/bea/message.jspa?messageID=600018030&tstart=0
    I just need a confirmation :
    - is the "res-ref-name" format incorrect with '/' character ?
    - is the jndi-name format incorrect with '.' character ?
    Else, what is the problem with this DD ?
    Thanks,
    Rudy

    "shubha" <[email protected]> wrote:
    >
    hi ,
    Ejb with ejb-name 'hellobean' in ejb-jar.xml
    should be specified in weblogic-ejb-jar.xml with <weblogic-enterprise-bean></weblogic-enterprise-bean>
    i am having problem in deploying the most simple bean on wls7.0 .
    when i try to open the bean module with the weblogic builder i get the
    following
    message
    weblogic.ejb20.WLDeploymentException: Could not locate bean with ejb-name
    'hellobean'
    in weblogic-ejb-jar.xml
         at weblogic.ejb20.deployer.CompositeMBeanDescriptor.initialize60(CompositeMBeanDescriptor.java:249)
         at weblogic.ejb20.deployer.CompositeMBeanDescriptor.init(CompositeMBeanDescriptor.java:180)
         at weblogic.ejb20.deployer.CompositeMBeanDescriptor.<init>(CompositeMBeanDescriptor.java:171)
         at weblogic.marathon.model.EJBJarCMBean.setup(EJBJarCMBean.java:408)
         at weblogic.marathon.tasks.OpenModuleTask.figureOutModule(OpenModuleTask.java:76)
         at weblogic.marathon.tasks.OpenModuleTask.figureOutModule(OpenModuleTask.java:109)
         at weblogic.marathon.tasks.OpenModuleTask.runBackground(OpenModuleTask.java:64)
         at weblogic.jellybeans.core.task.TaskThread.execute(TaskThread.java:114)
         at weblogic.jellybeans.core.task.TaskThread.run(TaskThread.java:55)
    Could not locate bean with ejb-name 'hellobean' in weblogic-ejb-jar.xml
    Module hello1 descriptors failed to load
    if anyone has come across the same problem and have debugged it please
    help me
    out
    thanks in advance

  • Use of externally-defined/ in weblogic-ejb-jar.xml

    I am trying to use Global Roles defined via the Weblogic console to control access to EJB methods.
    I am using the <externally-defined/> tag in security role assignments, however when I deploy to Weblogic I get the following error :
    <8/09/2004 04:21:42 PM GMT+10:00> <Error> <Deployer> <BEA-149205> <Failed to initialize the application appsdirmars-marketdata_ear due to error weblogic.manag
    ement.ApplicationException: Prepare failed. Task Id = null
    Module Name: ejb-marketdata.jar, Error: [EJB:011024]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:
    Error parsing file 'META-INF/weblogic-ejb-jar.xml' at line: 51 column: 26. Element type "externally-defined" must be declared..
    at weblogic.j2ee.J2EEApplicationContainer.checkForErrors(J2EEApplication
    Container.java:1612)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:1207)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:1051)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:823)
    at weblogic.management.deploy.slave.SlaveDeployer$Application.prepare(Sl
    aveDeployer.java:2925)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareAllApplications
    (SlaveDeployer.java:967)
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.j
    ava:349)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
    e(DeploymentManagerServerLifeCycleImpl.java:229)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
    at weblogic.Server.main(Server.java:32)
    I am running Weblogic 8.1 SP3 on Windows XP Pro.
    The XML is valid for the specified DTD according to my XML editor.
    The relevevant fragment from weblogic-ejb-jar.xml is included below.
    Any help much appreciated.
    Gavin.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <security-role-assignment>
    <role-name>MarsAdmin</role-name>
    <externally-defined/>
    </security-role-assignment>
    <security-role-assignment>
    <role-name>MarsViewer</role-name>
    <externally-defined/>
    </security-role-assignment>
    </weblogic-ejb-jar>

    I tried using the <global-role/> tag instead - this does deploy without any errors - but when I call the secure EJB method I get the Security Violation error below.
    The DTD says using the <global-role/> tag is fine, albeit deprecated, but the Weblogic 8.1 manual says this has been replaced by <externally-defined/>, so I'm not sure if this should work or not.
    [EJB:010160]Security Violation: User: 'ghughes' has insufficient permission to access EJB: type=<ejb>, application=_appsdir_mars-marketdata_ear, module=ejb-marketdata.jar, ejb=marketdata.MarketDataManager, method=getEnergyOverview, methodInterface=Remote, signature={java.util.Date}.
    So on the whole I'd prefer to work out why Weblogic isn't recognising <externally-defined/> - I've included the full deployment descriptor below - I'm generating it using the latest snapshot of XDoclet - is the DTD specified correct for Weblogic 8.1 SP3 ? (It matches the one specified in http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html - but I can't think of anything else that could be wrong).
    Any tips much appreciated as I need to enable an administrator to customise these roles at runtime rather than hard-coding the role - group mappings into the deployment descriptors.
    Thanks,
    Gavin.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <description><![CDATA[Generated by XDoclet]]></description>
    <weblogic-enterprise-bean>
    <ejb-name>marketdata.MarketDataManager</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <jndi-name>marketdata.MarketDataManager</jndi-name>
    <local-jndi-name>marketdata.MarketDataManagerLocal</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>marketdata.MessageManager</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>5</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>FileTopic</destination-jndi-name>
    <connection-factory-jndi-name>JMSConnectionFactory</connection-factory-jndi-name>
    <jms-polling-interval-seconds>10</jms-polling-interval-seconds>
    <jms-client-id>1</jms-client-id>
    </message-driven-descriptor>
    <transaction-descriptor>
    <trans-timeout-seconds>10</trans-timeout-seconds>
    </transaction-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    </weblogic-enterprise-bean>
    <!--
    To add enterprise beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called weblogic-enterprise-beans.xml that contains
    the <weblogic-enterprise-bean></weblogic-enterprise-bean> markup for those beans.
    -->
    <!-- xdoclet merge file -> weblogic-ejb-jar.xml -->
    <security-role-assignment>
    <role-name>MarsAdmin</role-name>
    <externally-defined/>
    </security-role-assignment>
    <security-role-assignment>
    <role-name>MarsViewer</role-name>
    <externally-defined/>
    </security-role-assignment>
    <idempotent-methods>
    </idempotent-methods>
    </weblogic-ejb-jar>
    Message was edited by [email protected] at Sep 8, 2004 8:45 PM

  • ejb-local-ref where to put this tag in ejb-jar.xml ??

    I have an ejb-jar.xml that looks like this. I have had no problem with remote interfaces. Now I want the bean to have a local interface too.
    Just let me know where the tag I have mentioned for the <ejb-local-ref> has to be put into.
    When I compile this file it throws me an error which i have shown below the output of the ejb-jar.xml file
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <query>
         <query-method>
              <method-name>findAllIDMasters</method-name>
              <method-params/>
         </query-method>
         <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    I have also added the following tag in the weblogic-jar.xml
    <local-jndi-name>IDMasterEJB.IDMasterLocalHome</local-jndi-name>
    Just let me know whether I am correct
    On compilation (using ant utility) the error thrown is like this :
    ejbc:
    [java] ERROR: Error parsing 'ejb-jar.xml' line 47: The content of element type "entity" must ma
    tch "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,e
    jb-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-schema-name?,cmp-field*,pri
    mkey-field?,env-entry*,ejb-ref*,ejb-local-ref*,security-role-ref*,security-identity?,resource-ref*,r
    esource-env-ref*,query*)".
    [java] ERROR: ejbc found errors
    [java] Java Result: 1
    Kindly Help !!!
    Thanks n regards
    Sajiv

    This should take care of it
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <query>
    <query-method>
    <method-name>findAllIDMasters</method-name>
    <method-params/>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • Deployment issues, how is weblogic-ejb-jar.xml linked to ejb-jar.xml

    Hey guys,
    I'm getting the following error I think because i have something configured incorrectly in my xml files. Instead of yousing activationConfig properties in my MDB I wanted to set them in the ejb-jar.xml file manually. The following error I'm getting is...
    Unable to deploy EJB: MyMDB from MDBtest2:
    [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
    weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'inQueue' declared in the ejb-jar.xml descriptor has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor.
         at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:330)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1097)
         at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:991)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
         <display-name>MDBtest2</display-name>
         <enterprise-beans>
              <message-driven>
                   <ejb-name>MyMDB</ejb-name>
                   <ejb-class>cms.crown.mdb.MyMDB</ejb-class>
                   <transaction-type>Container</transaction-type>
                   <message-destination-link>omg</message-destination-link>
                   <resource-ref>
                        <res-ref-name>weblogic.jms.XAConnectionFactory</res-ref-name>
                        <res-type>javax.jms.XAConnectionFactory</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
                   <resource-env-ref>
                        <resource-env-ref-name>inQueue</resource-env-ref-name>
                        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
                   </resource-env-ref>
              </message-driven>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <method>
                        <ejb-name>MyMDB</ejb-name>
                        <method-name>onMessage</method-name>
                        <method-params>
                             <method-param>javax.jms.Message</method-param>
                        </method-params>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    weblogic-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-ejb-jar xmlns:wls="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
    <!--weblogic-version:10.0-->
    <wls:message-destination-descriptor>
    <!--lookup-method:JNDI-->
    <wls:message-destination-name>omg</wls:message-destination-name>
    <wls:destination-jndi-name>inQueue</wls:destination-jndi-name>
    <wls:initial-context-factory>weblogic.jms.XAConnectionFactory</wls:initial-context-factory>
    <wls:provider-url>http://localhost:8010</wls:provider-url>
    </wls:message-destination-descriptor>
    </wls:weblogic-ejb-jar>
    Hope this is readable, thanks for any assistance

    Hi,
    It looks like first thing you are using EJB3 but your XML files are still pointing to version="2.1" and very old.
    <font color=red>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    </font><br>
    *try this: In below "ejb-jar.xml" file*
    QCF = your Connection factory JNDI Name
    TestQ = your Queue JNDI Name
    Transaction Attribute is ByDefault = Required ...so no need to add it here.
    <?xml version='1.0' encoding='UTF-8'?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="true">
    <enterprise-beans>
    <message-driven>
    <ejb-name>MyMDB</ejb-name>
    <mapped-name>TestQ</mapped-name>
    <ejb-class>cms.crown.mdb.MyMDB</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <transaction-type>Container</transaction-type>
    <activation-config>
    <activation-config-property>
    <activation-config-property-name>destinationType</activation-config-property-name>
    <activation-config-property-value><b><font color=maroon>javax.jms.Queue</font></b></activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>
    <activation-config-property-value><b><font color=maroon>QCF</font></b></activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>destinationJndiName</activation-config-property-name>
    <activation-config-property-value><b><font color=maroon>TestQ</font></b></activation-config-property-value>
    </activation-config-property>
    </activation-config>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor></assembly-descriptor>
    </ejb-jar>
    "weblogic-ejb-jar.xml":
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
    <font color=maroon><b> Now u need to Just define the Provider URL here...if you want a remote provider...else not required<BR> JNDI names are already defined in the ejb-jar.xml file</b></font><BR>
    </weblogic-ejb-jar>
    Some Links which you can refer:
    To Generate the Deployment Descriptors ...in case of EJB3 Applications: *http://jaysensharma.wordpress.com/2010/04/02/generating-ejb3-clientjar/*
    MDB3.0 Sample: *http://jaysensharma.wordpress.com/2009/08/17/mdb3-0-sample-for-weblogic-application-server/*
    Thanks
    Jay SenSharma

  • Sample weblogic-ejb-jar.xml for Resource-ref EJB 3.0

    I am trying to create an MDB that can be re-used under different names.
    @MessageDriven(description = "An MDB that transfers messages from one Queue to another", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class TransferMdb implements MessageListener {
    private static final Logger LOG = Logger.getLogger(TransferMdb.class);
    @Resource(name = "jms/connfactory")
    private ConnectionFactory connectionFactory;
    @Resource(name = "jms/targetDestination")
    private Queue targetDestination;
    <ejb-jar version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd">
    <enterprise-beans>
    <message-driven>
    <ejb-name>TransferMdb</ejb-name>
    <ejb-class>TransferMdb</ejb-class>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TransferMdb</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>200</max-beans-in-free-pool>
    <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>test_queue</destination-jndi-name>
    <transaction-descriptor>
    <trans-timeout-seconds>20</trans-timeout-seconds>
    </transaction-descriptor>
    </message-driven-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jms/connectionfactory</res-ref-name>
    <jndi-name>connectionfactory</jndi-name>
    </resource-description>
    <resource-description>
    <res-ref-name>jms/targetDestination</res-ref-name>
    <jndi-name>reply_queue</jndi-name>
    </resource-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    However when I deploy the above, I get exceptions such as:
    problem: cvc-complex-type.2.4a: Expected elements 'initial-context-factory@http://www.bea.com/ns/weblogic/weblogic-ejb-jar provider-url@http://www.bea.com/ns/weblogic/weblogic-ejb-jar connection-factory-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-polling-interval-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar generate-unique-jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar durable-subscription-deletion@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-messages-in-transaction@http://www.bea.com/ns/weblogic/weblogic-ejb-jar distributed-destination-connection@http://www.bea.com/ns/weblogic/weblogic-ejb-jar use81-style-polling@http://www.bea.com/ns/weblogic/weblogic-ejb-jar init-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar security-plugin@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element message-driven-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
    problem: cvc-complex-type.2.4a: Expected elements 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar iiop-security-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-env-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar ejb-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar service-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar enable-call-by-reference@http://www.bea.com/ns/weblogic/weblogic-ejb-jar network-access-point@http://www.bea.com/ns/weblogic/weblogic-ejb-jar clients-on-same-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar run-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar create-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remove-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar passivate-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar local-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar dispatch-policy@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remote-client-timeout@http://www.bea.com/ns/weblogic/weblogic-ejb-jar stick-to-first-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'reference-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element weblogic-enterprise-bean@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
    Truncated. see log file for complete stacktrace
    I am clearly missing items in the weblogic-ejb-jar.xml. If anyone has a sample or tips, that would be awesome as a starting point.

    Those tags just declare that you are using our CMP provider and that
    your descriptor is in META-INF/weblogic-cmp-rdbms-jar.xml.
    FWIW, you might also want to check out EJBGen. It tends to keep more up
    to date with WLS than xdoclet.
    -- Rob
    Gen wrote:
    I am using xdoclets to generate descriptor file weblogic-ejb-jar.xml
    for a BMP entity bean. Xdoclet is generating the descriptor file
    alright, but is putting the following extra tags. This happens even
    for samples which come with the download, so my tags in java file are
    not wrong.
    My question is, are the extra tags below harmless, or should I
    manually go to each desciptor file and remove them?
    Thanks.
    ----------- EXTRA TAGS GENERATED START ---------
    persistence> <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    ----------- EXTRA TAGS GENERATED END ---------
    ----------- TAGS I PUT IN JAVA CLASS START --------
    * @ejb:bean name="com.ejb.entity.Customer"
    * jndi-name="com.ejb.entity.CustomerHome"
    * view-type="remote"
    * type="BMP"
    * primkey-field="com.ejb.entity.CustomerPK"
    * reentrant="false"
    * @weblogic:cache
    * max-beans-in-cache="1000"
    * read-timeout-seconds="900"
    * concurrency-strategy="ReadOnly"
    ----------- TAGS I PUT IN JAVA CLASS END --------

  • Webllogic8to10migration-SAXValidationExc Couldnot locate bean ejb-jar.xml

    Please help me out here..
    Failed to parse descriptor at 'META-INF/weblogic-ejb-jar.xml' for module 'PAMaintenanceBean.jar': javax.xml.stream.XMLStreamException: weblogic.xml.process.SAXValidationException: Could not locate bean with ejb-name "PAMaintenance" in ejb-jar.xml
    ejb-jar.xml
    ==========
    <?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>PAMaintenance</ejb-name>
         <home>com.bear.coreapps.pa.ejb.maintenance.PAMaintenanceHome</home>
         <remote>com.bear.coreapps.pa.ejb.maintenance.PAMaintenance</remote>
         <ejb-class>com.bear.coreapps.pa.ejb.maintenance.PAMaintenanceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
         <method>
         <ejb-name>PAMaintenance</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>*</method-name>
         </method>
         <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    <?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>PAFeatures</ejb-name>
         <home>com.bear.coreapps.pa.ejb.features.PAFeaturesHome</home>
         <remote>com.bear.coreapps.pa.ejb.features.PAFeatures</remote>
         <ejb-class>com.bear.coreapps.pa.ejb.features.PAFeaturesBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
         <env-entry>
         <env-entry-name>myString</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
         <env-entry-value>anything at all</env-entry-value>
         </env-entry>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
         <method>
         <ejb-name>PAFeatures</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    weblogic-ejb-jar.xml
    ===============
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>PAMaintenance</ejb-name>
    <caching-descriptor>
         <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </caching-descriptor>
    <enable-call-by-reference>false</enable-call-by-reference>
    <jndi-name>com.bear.coreapps.pa.ejb.maintenance.PAMaintenance</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>PAFeatures</ejb-name>
    <caching-descriptor>
         <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </caching-descriptor>
    <jndi-name>statelessSession.PAFeaturesHome</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    my web.xml
    ========
    <ejb-ref>
    <ejb-ref-name>PAFeatures</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.bear.coreapps.pa.ejb.features.PAFeaturesHome</home>
    <remote>com.bear.coreapps.pa.ejb.features.PAFeatures</remote>
    <ejb-link>../PAFeaturesBean.jar#PAFeatures</ejb-link>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>PAMaintenance</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.bear.coreapps.pa.ejb.maintenance.PAMaintenanceHome</home>
    <remote>com.bear.coreapps.pa.ejb.maintenance.PAMaintenance</remote>
    <ejb-link>../PAMaintenanceBean.jar#PAMaintenance</ejb-link>
    </ejb-ref>
    Application.xml
    ===========
    <module>
    <ejb>PAFeaturesBean.jar</ejb>
    </module>
    <module>
    <ejb>PAMaintenanceBean.jar</ejb>
    </module>
    config.xml
    ===========
    <app-deployment>
    <name>emsApp</name>
    <target>mngCTK_dbctkapp01</target>
    <module-type>ear</module-type>
    <source-path>applications/emsApp</source-path>
    <sub-deployment>
    <name>/</name>
    <target>mngCTK_dbctkapp01</target>
    </sub-deployment>
    <sub-deployment>
    <name>PAMaintenanceBean.jar</name>
    <target>mngCTK_dbctkapp01</target>
    </sub-deployment>
    <sub-deployment>
    <name>PAFeaturesBean.jar</name>
    <target>mngCTK_dbctkapp01</target>
    </sub-deployment>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>nostage</staging-mode>
    </app-deployment>

    Hi,
    Nothing stands out as being configured incorrectly. I copy and pasted the descriptors below, put them in a jar file and ran weblogic.appc on it. The descriptors loaded properly and appc only complained that the EJB classes couldn't be found (as expected). Are you sure the weblogic-ejb-jar.xml containing the 'PAMaintenance' reference is in the same ejb-jar file as the ejb-jar.xml containing the 'PAMaintenance' definition? That's the only thing I can think of.
    - Matt

Maybe you are looking for

  • Apple mobile device service not started please help

    Each time i try to sync my iphone to itunes it keeps on saying "apple mobile device service not started" I know how to start it and everything its that when i start it it says "Windows could nt start the Aplle Mobile Device service on local computer"

  • Unable to install soa suite 10.1.3.1.0 in windows XP

    hello when i install SOA Suite10.1.3.1.0 in my windows XP, Configuration Assistant "Oracle Web Services Manager Configuration Assistant" failed, the following is the log: install.configApps.setUpLogging: [copy] Copying 1 file to D:\Oracle\10.1.3.1\Or

  • Stuck .pdf file on desktop

    I have a Preview .pdf file on my desktop that is stuck. I can't move it, I can't delete it. When I try to put it in the trash I get a message saying that it "can't be moved to the trash because it can't be deleted." I can click on the file and select

  • Syncing iCal and iPhone

    My MacBook and iPhone are not syncing properly,especially in iCal...there's intermittent syncing. This started happening after I installed Lion. Does anyone have any suggestions?

  • Accessing Child Dynamic MovieClips

    Dev Environment: Flash 9 Pro Alright, I have a movie that has one movieclip (imageHolder, this is defined in the Library and is an empty movieClip used as a place holder) which is on the stage. I read in and load images to the flash file, and create