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.

Similar Messages

  • Weblogic 10.3.0 Deployment error when using ejb-jar.xml

    Hi,
    I am getting the following error while deploying my EJB3 application on Weblogic 10.3.0. This is happening only if I include ejb-jar.xml.
    As per the EJB3 descriptor spec, Remote Home or Local home are not exists.
    Is this a issue in Weblogic 10.3.0 or am I missing any special setup ?
    Please help.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(egm-poc.jar)
    Unable to deploy EJB: C:\appsrv\domains\WeblogicRS1.1-domain\servers\admin\tmp\_WL_user\_appsdir_egmear_ear\ot2591\egm-poc.
    jar from egm-poc.jar:
    In EJB JPATestBean, both the remote home and remote component interface must be specified. Currently, only one of them is spec
    ified.
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
    My ejb-jar.xml is
    - <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 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">
    <description>JPA Test Application</description>
    <display-name>JPATest</display-name>
    - <enterprise-beans>
    - <session>
    <ejb-name>JPATestBean</ejb-name>
    <remote>egm.poc.jpa.JPATestBeanRemote</remote>
    <local>egm.poc.jpa.JPATestBeanLocal</local>
    <ejb-class>egm.poc.jpa.JPATestBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    - <session>
    <ejb-name>AuditInfoDAOH</ejb-name>
    <local>egm.poc.jpa.Audit</local>
    <ejb-class>egm.poc.jpa.AuditInfoDAOH</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    - <assembly-descriptor>
    - <container-transaction>
    - <method>
    <ejb-name>JPATestBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>RequiresNew</trans-attribute>
    </container-transaction>
    - <container-transaction>
    - <method>
    <ejb-name>AuditInfoDAOH</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Regards
    Saji

    Hi,
    Seems the issue is not common. Can anyone throw some light on this ?
    Regards
    Saji

  • Annotations to replace ejb-jar.xml?

    Hi gurus,
      Seems that the newest NWDS7.1 does not create ejb-jar.xml for EJB project. And I was told that currently all what we can do in ejb-jar.xml can be done with annotations right now. But where can I find available annotation list? Particularly I need the annotation to get environment entry from JNDI, which can be done using ejb-jar.xml before. 
      Thanks in advance.
    B.R.

    Hi Lee,
    You can find all EJB annotations in the EJB 3.0 Simplified API spec and EJB 3.0 Persistence (JPA) spec.
    The NWDS also gives you tips as to the available annotations from the context menus of different nodes, e.g. in the Outline view, Java editor, etc.
    Last but not least, you can find pieces of annotation reference in the various subnodes of the [online help|http://help.sap.com/saphelp_nwce10/helpdata/en/44/e9af22b9dc03fde10000000a1553f6/frameset.htm].
    Particularly, you should be using @Resource for injecting env entry.
    HTH!
    \-- Vladimir

  • Do I must include orion-ejb-jar.xml in my CMP entity bean?

    Deal all:
    I've had a problem about deployment of my CMP entity bean.
    I don't know if I need to include orion-ejb-jar.xml in the jar
    file? Could anyone tell me what files I should include them in
    jar file and what config file(like data-sources.xml) I should
    modify them?
    Thanks!!

    The orion-ejb-jar.xml is not necessary...oc4j/orion auto-
    generates this configuration file when the application is
    deployed. You would only need this file if you are using o-r
    mapping, or changing some deployment time option with your ejb.
    The config/data-sources.xml file is used by the container. If
    you are using oracle, you will need to use the data-sources.xml
    for your database (the path needs the proper database name, and
    server host, and you will need to put in the password and
    username). Use the example with the oc4j docs to help you, or
    the one already in your config directory.
    regards,
    the elephantwalker
    www.elephantwalker.com

  • 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

  • Why we use EJB

    please tell me that , why we use EJB , i searched it on google but didn't find the answer .
    Please help me out
    Thanks in advance ...

    http://en.wikipedia.org/wiki/Ejb
    http://en.wikipedia.org/wiki/Enterprise_JavaBean
    http://www.developer.com/java/ejb/article.php/1434371/Introduction-to-EJBs.htm
    http://www.roseindia.net/ejb/
    http://openejb.apache.org/hello-world.html

  • Why to Use EJB rather then Direct Connection To Oracle Thru webDynpro?

    Hi
      Experts,
       I want to know that why to use EJB to connect to oracle rather then direct connection via WebDynpro.
       Please Give Me References to how to connect to oracle with EJB or WebDynpro.I want to tell you that i know JDBC,JAVA and basic web Dynpro.
      Please Reply Me Dear Friends...ASAP.

    EJB are better for a project beacuse the application is scalable, have less maintainence and have better performance.
    Have you gone throght these:
    Connect Oracle 9.2 DB to Web AS 6.40
    web dynpro - database connection
    web Dynpro application connecting to oracle
    /people/ramesh.jandhyala/blog/2007/01/02/webdynpro-and-oracle-using-dtos
    Regards,
    Ashwani Kr Sharma

  • 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>

  • Deploy ejb on wls7.0 weblogic.ejb.jar.xml ! help

    Morning !
    i'm try to deploy a EJB on wls7.0
    my descriptor is like this and i don't really undestand what's go wrong.
    thanks you to help
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 7.0.0
    EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <entity>
    <ejb-name>Compte</ejb-name>
    <bean-home-name>Compte</bean-home-name>
    <resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <jndi-name>DataSource</jndi-name>
    </resource-ref>
    <cmp-info>
    <database-map>
    <table>"Compte"</table>
    <column-map>
    <field-name>id</field-name>
    <column-name>"id"</column-name>
    </column-map>
    <column-map>
    <field-name>nomSte</field-name>
    <column-name>"nomSte"</column-name>
    </column-map>
    <column-map>
    <field-name>dateCreation</field-name>
    <column-name>"dateCreation"</column-name>
    </column-map>
    <column-map>
    <field-name>nbEmployes</field-name>
    <column-name>"nbEmployes"</column-name>
    </column-map>
    <column-map>
    <field-name>caSte</field-name>
    <column-name>"caSte"</column-name>
    </column-map>
    <column-map>
    <field-name>descSte</field-name>
    <column-name>"descSte"</column-name>
    </column-map>
    <column-map>
    <field-name>logo</field-name>
    <column-name>"logo"</column-name>
    </column-map>
    <column-map>
    <field-name>id_commercial</field-name>
    <column-name>"id_commercial"</column-name>
    </column-map>
    </database-map>
    <finder>
    <method-signature>findAll()</method-signature>
    <where-clause />
    <load-state>True</load-state>
    </finder>
    </cmp-info>
    </entity>
    <datasource-definitions>
    <datasource>
    <jndi-name>DataSource</jndi-name>
    <url>jdbc:odbc:dev_java</url>
    <username>sa</username>
    <password>lnx.sully</password>
    <driver-class-name>sun.jdbc.odbc.JdbcOdbcDriver</driver-class-name>
    </datasource>
    </datasource-definitions>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    the EXception is !
    Exception
    weblogic.management.ApplicationException: No deployment found at
    E:\bea70\weblogic700\server\bin\GRPEJB.jar.
    at
    weblogic.j2ee.J2EEApplicationContainerFactory.initializeDeployment(J2EEAppli
    cationContainerFactory.java:350)
    at
    weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRunti
    me.java:350)
    at
    weblogic.management.deploy.DeployerRuntime.access$0(DeployerRuntime.java:282
    at
    weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:947)
    at
    weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:721)
    at
    weblogic.management.deploy.DeployerRuntime.checkAndPerformDeployerActions(De
    ployerRuntime.java:941)
    at
    weblogic.management.deploy.DeployerRuntime.activate(DeployerRuntime.java:279
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:717)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
    99)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerI
    mpl.java:921)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:470)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:198)
    at $Proxy48.activate(Unknown Source)
    at
    weblogic.management.console.actions.mbean.ConfigureAppWizardAction.commit(Co
    nfigureAppWizardAction.java:248)
    at
    weblogic.management.console.actions.mbean.ConfigureAppWizardAction.perform(C
    onfigureAppWizardAction.java:100)
    at
    weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
    rvlet.java:171)
    at
    weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
    let.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:945)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :332)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :242)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:5360)
    at
    weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
    r.java:721)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3043)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2468)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    tahnks you !
    Unimon Thierry
    CGBI- CET-E-services
    69, Blvd Galliéni
    91 Issy les Mlx
    tele :01/55/95/54/22 Poste:5422
    Port :06/61/81/78/59
    Prof : mailto:[email protected]
    Pers : mailto:[email protected]

    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

  • Error compiling ejb-jar.xml. Help!!

    I do not know why this xml file is giving me the errors displayed below.
    Thank you in advance.
    Here is my xml file:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>ObjectConnectorBean</ejb-name>
    <display-name>ObjectConnector</display-name>
    <home>com.harris.netboss.shared.posting.ObjectConnectorHome</home>
    <remote>com.harris.netboss.shared.posting.ObjectConnector</remote>
    <ejb-class>com.harris.netboss.shared.posting.ObjectConnectorBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>com.harris.netboss.shared.posting.ObjectConnectorPK</prim-ke
    y-class>
    <reentrant>False</reentrant>
    </entity>
    </enterprise-beans>
    </ejb-jar>
    Here is the error message:
    org.xml.sax.SAXParseException: The content of element type "entity" must
    match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Exception.java:42)
    at org.xml.sax.SAXException.<init>(SAXException.java:45)
    at org.xml.sax.SAXParseException.<init>(SAXParseException.java:56)
    at
    weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
    at
    weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
    ror(XMLValidator.java:1280)
    at
    weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(Compile
    d Code)
    at
    weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
    ch(Compiled Code)
    at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
    Code)
    at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
    at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:128)
    at
    weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
    at weblogic.ejbc20.runBody(Compiled Code)
    at weblogic.utils.compiler.Tool.run(Tool.java:81)
    at weblogic.ejbc.main(ejbc.java:20)
    --------------- nested within: ------------------
    weblogic.xml.process.XMLParsingException: The content of element type
    "entity" must match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    . - with nested exception:
    [org.xml.sax.SAXParseException: The content of element type "entity" must
    match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    .] Line: 16 Column: 16
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at weblogic.utils.NestedException.<init>(NestedException.java:18)
    at
    weblogic.xml.process.XMLParsingException.<init>(XMLParsingException.java:17)
    at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:132)
    at
    weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
    at weblogic.ejbc20.runBody(Compiled Code)
    at weblogic.utils.compiler.Tool.run(Tool.java:81)
    at weblogic.ejbc.main(ejbc.java:20)
    ERROR: weblogic.xml.process.XMLParsingException: The content of element type
    "entity" must match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    . - with nested exception:
    [org.xml.sax.SAXParseException: The content of element type "entity" must
    match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    .] Line: 16 Column: 16

    looks like your xml file(ejb-jar.xml) is missing some required tag element or
    the elements are out of
    order. the format is specified in a dtd, you should take a look at the dtd for
    ejb-jar.xml. for wl5.1, try looking under c:\weblogic for ejb-jar.dtd
    Richard Ong wrote:
    I do not know why this xml file is giving me the errors displayed below.
    Thank you in advance.
    Here is my xml file:
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
    JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>ObjectConnectorBean</ejb-name>
    <display-name>ObjectConnector</display-name>
    <home>com.harris.netboss.shared.posting.ObjectConnectorHome</home>
    <remote>com.harris.netboss.shared.posting.ObjectConnector</remote>
    <ejb-class>com.harris.netboss.shared.posting.ObjectConnectorBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>com.harris.netboss.shared.posting.ObjectConnectorPK</prim-ke
    y-class>
    <reentrant>False</reentrant>
    </entity>
    </enterprise-beans>
    </ejb-jar>
    Here is the error message:
    org.xml.sax.SAXParseException: The content of element type "entity" must
    match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Exception.java:42)
    at org.xml.sax.SAXException.<init>(SAXException.java:45)
    at org.xml.sax.SAXParseException.<init>(SAXParseException.java:56)
    at
    weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
    at
    weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
    ror(XMLValidator.java:1280)
    at
    weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(Compile
    d Code)
    at
    weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
    ch(Compiled Code)
    at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
    Code)
    at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
    at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:128)
    at
    weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
    at weblogic.ejbc20.runBody(Compiled Code)
    at weblogic.utils.compiler.Tool.run(Tool.java:81)
    at weblogic.ejbc.main(ejbc.java:20)
    --------------- nested within: ------------------
    weblogic.xml.process.XMLParsingException: The content of element type
    "entity" must match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    . - with nested exception:
    [org.xml.sax.SAXParseException: The content of element type "entity" must
    match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    .] Line: 16 Column: 16
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at weblogic.utils.NestedException.<init>(NestedException.java:18)
    at
    weblogic.xml.process.XMLParsingException.<init>(XMLParsingException.java:17)
    at weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:132)
    at
    weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
    at weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
    at weblogic.ejbc20.runBody(Compiled Code)
    at weblogic.utils.compiler.Tool.run(Tool.java:81)
    at weblogic.ejbc.main(ejbc.java:20)
    ERROR: weblogic.xml.process.XMLParsingException: The content of element type
    "entity" must match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    . - with nested exception:
    [org.xml.sax.SAXParseException: The content of element type "entity" must
    match
    "(description?,display-name?,small-icon?,large-icon?,ejb-name,home,remote,ej
    b-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-sche
    ma-name?,cmp-field*,primkey-field?,transaction-scope?,env-entry*,ejb-ref*,se
    curity-role-ref*,security-identity?,resource-ref*,resource-env-ref*,query*)"
    .] Line: 16 Column: 16

  • 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 --------

  • Parsing ejb-jar.xml using jaxb

    hi all,
    how to parse the ejb-jar.xml using jaxb? can anybody send the information about the API which we have to use to parse the ejb-jar.xml? (ejb2.0)
    i need the details about all ejbs in an application, (like jndi name, Home and Remote name). so, how can i parse the ejb descriptors?
    regards,
    panneer

    Hi Panneer,
    Well, parsing the EJB descriptors is, in principle, a task for the EJB container where they are deployed. From what you wrote I assume that you need to gather that kind of info to visualize in some (monitoring?) tool. Is that correct?
    If so, the question would be whether you have access to the EJB jar on the file system (before it's deployed) or you can only connect to the server with the already deployed EJBs. In the latter case, this information is shown in the [NWA plugins|http://help.sap.com/saphelp_nwce10/helpdata/en/0b/5b5a42ea221153e10000000a155106/frameset.htm]. There are also some [telnet commands|http://help.sap.com/saphelp_nw04/helpdata/en/79/3cf82ade038d45a21fbfdaee349b22/frameset.htm] in NW 04 and 7.0 (04s).
    If you have access to the EJB jar file, you can parse the descriptors using DOM or SAX, but I'm not aware of any pre-defined JAXB API for this purpose. Probably you can also generate the mapped classes yourself and use them, however I'm not sure how that works with DTD (because of EJB 2.0).
    HTH!
    \-- Vladimir

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

  • Can't create a JAXB binding for ejb-jar.xml using xjc

    Hi all,
    I have been trying to build a JAXB binding for EJB deployment descriptors, mainly because I have to update a hand-cranked ejb-jar.xml file on the fly with some additions that have come from a code generator.
    I have tried to use
    xjc ejb-jar_2_1.xsd j2ee_1_4.xsd ejb-jar_2_1.xsd
    xjc on the schema definitions I found at http://java.sun.com/xml/ns/j2ee/ but I can't get it to work. It produces reams of errors, see below for a short extract.
    Of course, someone could put me out of my misery and tell me where to find a binding that someone else has done. I can't be the first chimp on the planet that has wanted to do this!
    Any help much appreciated.
    errors:
    [WARNING] warning: "blockDefault" attribute of <schema> is not supported
    line 3 of xml.xsd
    [WARNING] warning: "finalDefault" attribute of <schema> is not supported
    line 3 of xml.xsd
    [WARNING] warning: <key> identity constraint will be ignored by JAXB validation
    line 117 of j2ee_web_services_client_1_1.xsd
    [WARNING] warning: <key> identity constraint will be ignored by JAXB validation
    line 115 of ejb-jar_2_1.xsd
    [WARNING] warning: <keyref> identity constraint will be ignored by JAXB validation
    line 129 of ejb-jar_2_1.xsd
    [WARNING] warning: <key> identity constraint will be ignored by JAXB validation
    line 145 of ejb-jar_2_1.xsd
    [WARNING] warning: <keyref> identity constraint will be ignored by JAXB validation
    line 159 of ejb-jar_2_1.xsd

    Exception initializing 'oracle.dbtools.raptor.MonitorJDBCAddin' in extension 'Oracle SQL Developer': oracle.classloader.
    util.AnnotatedNoClassDefFoundError:
    Missing class: oracle.jdbc.OracleDriverThe Oracle driver is not on the classpath.

Maybe you are looking for

  • Query cannot be parsed within the Builder ORA-00900: invalid SQL statement

    Why am I getting the error message "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00900: invalid SQL state

  • Math power function in script logic

    Hello all! Can anybody help me how  I can do math "power" function in BPC 5.1 Script Logic? Thanks

  • Multiple dynamic Hyperlinks in Single Cell

    My Requirement is similar to http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c3f1cbeb-20b8-4457-9189-3e451c2a5af9/multiple-hyperlinks-in-single-cell-in-ssrs?forum=sqlreportingservices single Data column will be displaying csv values and need

  • Dynamic compilation in memory

    Hello, I have used javax.tools.ToolProvider to compile a simple class that comes from a CharSequence object in memory, and it works just fine. Now, I need to reference another class that comes also from a CharSequence object in memory. Which method i

  • Opening a fiel in custom FileDialog (VERY VERY URGENT)

    hi everybody, I have a problem and stuck. I have developed a MDI application that provides all function like open saved files, create new, edit and lots of other. It only opens, save ,edit etc the graphical diagrams inside JInternalFrames. I have an