O/R tool generates invalid ejb-jar.xml for 1-n cmp bean-to-bean relations

TopLink generates:
<ejb-relation>
<ejb-relation-name>Parent-Child</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Parent-has-childs</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>Parent</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>childs</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>child-owned-by-Parent</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete></cascade-delete>
<relationship-role-source>
<ejb-name>Child</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
what's wrong?
it's missing the following tag:
'<cmr-field-type>java.util.Collection</cmr-field-type>'
which should be in the <cmr-field> element after the <cmr-field-name>.
I cannot get the UI tool to add this tag, whenever I manually add it to the ejb-jar.xml it gets removed the next time I generate the ejb-jar.xml. Additionally, if I try to update the project from the ejb-jar.xml, the O/R tool loses ALL my mappings for entity beans.
Expected questions:
TopLink 9.0.3
WebLogic 7.0.1
CMP 2.0
JDK 1.3.1_03
Yes the getter/setter are defined (on the local interface and bean)
FYI,
Andrew

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>

Similar Messages

  • Generated orion-ejb-jar.xml

    I have app. which run under oc4j(version 020725.1695). If I try new
    oc4j(version 020927.1699), app doesn't run.
    If I compare generated orion-ejb-jar.xml by oc4j(version 020725.1695)
    with generated orion-ejb-jar.xml by oc4j(version 020927.1699) there
    is a differnce.
    What I'm doing wrong?
    thanks for any idea.
    Jan
    Differnce:
    Relationship
    my orion-ejb-jar.xml in project:
    <cmp-field-mapping name="samaCase">
         <entity-ref home="CaseBean">
    <cmp-field-mapping name="samaCase">
    <fields>
    <cmp-field-mapping name="oid" persistence-name="CASE_ID"/>
    </fields>
    </cmp-field-mapping>
    </entity-ref>
    </cmp-field-mapping>
    oc4j(version 020725.1695):
    <cmp-field-mapping name="samaCase">
    <entity-ref home="CaseBean">
    <cmp-field-mapping name="samaCase">
    <fields>
    ? <cmp-field-mapping name="oid" persistence-name="CASE_ID" />
    </fields>
    </cmp-field-mapping>
    </entity-ref>
    </cmp-field-mapping>
    oc4j(version 020927.1699):
    <cmp-field-mapping name="samaCase">
    <entity-ref home="CaseBean">
    <cmp-field-mapping name="samaCase">
    <fields>
    ? <cmp-field-mapping name="oid" persistence-name="OID" />
    </fields>
    </cmp-field-mapping>
    </entity-ref>
    </cmp-field-mapping>
    finders:
    my orion-ejb-jar.xml in project:
    - none
    oc4j(version 020725.1695):
    ? <finder-method query="SELECT oid FROM SM_RATE" partial="false">
    ? <!-- Generated SQL: "SELECT oid FROM SM_RATE" -->
    <method>
    <ejb-name>RateBean</ejb-name>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </method>
    </finder-method>
    oc4j(version 020927.1699):
    ? <finder-method>
    ? <!-- Generated SQL: "select SM_RATE.OID from SM_RATE -->
    <method>
    <ejb-name>RateBean</ejb-name>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </method>
    </finder-method>

    well, actually we delete the previously deployed application always. (we had to do it in old one, and also we try it in new oc4j. It didn't help.). New oc4j always rewrite our persistence-name CASE_ID on OID.
    You are right, we have mapping on old orion-ejb-jar.xml too. The purpose is that we have a variable samaCase and the colum in the table is CASE_ID.
    The question is, what we are doing wrong? Our app is running in old oc4j(version 020725.1695), and not in new oc4j(version 020725.1695). The problem is in the EJB relatinship.
    EJB-QL - ok.
    There is missing : " on the end. (behind the table name SN_RATE) Is it ok?
    <!-- Generated SQL: "select SM_RATE.OID from SM_RATE -->
    Jan

  • JBuilder plugin does not generate orion-ejb-jar.xml

    Hello,
    We are using JBuilder to code EJB's. I downloaded the OC4J plugins for JBuilder 5 and 6. Everything installed right but filling in the deployment descriptor does not automatically generate XML entries in the orion-ejb-jar.xml. I have to do this by hand.
    Deploying to OC4J 1.0.2.2.1 succeeds and also running OC4J 1.0.2.2.1 in the debugger of JBuilder succeeds.
    I would like to see an automatic process of filling in the right tags in the orion-ejb-jar.xml just as what happens in JDeveloper or in JBuilder for the ejb-inprise.xml.
    Who is responsible for making the plugins?
    The plugins are good but things must be better for working with JBuilder to Oracle 9iAS.
    Last big very big point is the lack of good documentation.
    Oracle, when you have good technology please tell me in good documentation how to use it otherwise how will I ever discover the good things. Maybe we are trowing things away because of not knowing.
    The plugins are only for working with OC4J 1.0.2.2.x.
    When will there be plugins voor OC4J version 2?
    With regards,
    Johan Borchers
    VDA informatiebegheersing.

    Here is the URL where you can download the JBuilder7 plugin for OC4J 903. It supports CMP and automatically generates orion-ejb-jar.xml, but the CMR mapping is supported from JBuilder8 and the corresponding plugin.
    http://codecentral.borland.com/codecentral/ccWeb.exe/listing?id=19237

  • How to generated weblogic-ejb-jar.xml through Jdeveloper

    I am using JDevloper Studio Edition Version 11.1.1.0.2. My application works fine in OC4J 10.1.3.3.
    Now, I have to deploy my application on the Weblogic 10.3 server.
    My EJB already contains ejb-jar.xml, which has all the descriptions for EJB.
    I want to generate weblogic-ejb-jar.xml files for my EJBs through Jdeveloper, is there any option to do that in IDE?
    Regards
    Edited by: chandan_kk on May 18, 2009 12:41 PM

    Chandan,
    Right-click the project, New...
    Under the General category, choose Deployment Descriptor, then pick Weblogic Deployment Descriptor in the items. You can then choose weblogic-ejb-jar.xml in the next dialog.
    If you don't see Deployment Descriptor in the category list, try selecting the All Technologies tab instead of the Project Technologies tab.
    John

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

  • Orion-ejb-jar.xml for oc4j and xdoclet

    Does anybody try to use xdoclet to generate orion-ejb-jar.xml with ejb relation?
    Could somebody show me any example of definition relation for xdoclet and orion-ejb-jar.xml? (@orion:persistence...)
    thanks for any advice... :-)
    Zajo

    Hello,
    The warning message looks to be unrelated to the java.lang.IllegalArgumentException error. The warning states that optimistic locking cannot be migrated to the toplink-ejb-jar.xml file; this is stated in chapter 7 of the TopLink developer's guide at
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/MAIN/_pdf/b13593_v1_01.pdf
    The exception though seems to indicate that your orion-ejb-jar.xml contains EJBs mapped to the same table that are not related through EJB inheritance. I do it all the time with POJOs so this will work in TopLink, but you will need a support case to help get your project migrated if this is the case.
    Best Regards,
    Chris Delahunt

  • Ejb-jar.xml for  a file adapter in 710

    Hi,
    we moved our file adapter from 700 to 710. Now there is a problem in ejb-jar.xml. There are entries like this:
    <session>
    <description></description>
    <display-name></display-name>
    <icon/>
    <ejb-name>FileActConversionToSWIFTModuleBean</ejb-name>
    <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
    <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
    <local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
    <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
    <ejb-class>com.sapcons.xi.swift.FileActConversionToSWIFTModuleBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    The error messages are like this:
    Bean Interfaces: stateless bean "FileActConversionToSWIFTModuleBean" should have at least one of the following interface pairs: "local" and "local-home", "home" and "remote" or service endpoint interface
    Bean Interfaces: The home interface "com.sap.aii.af.lib.mp.module.ModuleHome" cannot be found in the search path.
    What is wrong? The interfaces ModuleHome etc. seem not to be here any more. Which interfaces should be entered in ejb-jar.xml for release 710?
    Thanks and regards, Marina

    Hi,
    yes, there is a module for file adapter. Some modifications were implemented, too. I can imagine that something was forgotten. It is possible to do the build, to deploy and to test the adapter, even if there are errors in ejb-jar.xml .
    Is there a list which things that changed between 700 and 710? 
    I have these 2 links with useful information:
    [Developing Adapters and Modules|http://help.sap.com/saphelp_nwpi71/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm ]
    [Javadoc PI 7.1 (Adapter, Module and Mapping Development)|http://help.sap.com/javadocs/pi/SP3/xpi/index.html]
    Is there further information for this topic?
         Thanks and regards, Marina

  • OC4J9.0.4 generates orion-ejb-jar.xml instead of using mine !!!

    META-INF directory of my EJB module of the EAR archive contains two descriptors: ejb-jar.xml and orion-ejb-jar.xml. But when I deploy the application OC4J generates its own orion-ejb-jar.xml and replaces mine with it. How it could be ?

    Hi Avi,
    I assume you are talking about your development
    environment (as opposed to your production
    environment). You do know that if you edit the
    deployed "orion-ejb-jar.xml" file, OC4J will pick
    that up and automatically re-deploy, don't you? Or
    simply copy your new "orion-ejb-jar.xml" file to the
    same directory as the deployed one (thus overwriting
    it) -- same effect.This is exactly what I end up doing. Are you saying that
    (a) the production environment will not suffer from this problem? (if so, how?)
    (b) I will have to edit the deployed orion-ejb-jar.xml file every time I deploy to production (admittedly, not too frequently)?
    regards
    George

  • Does TopLink 10g generate toplink-ejb-jar.xml and weblogic-ejb-jar.xml?

    Also, does it have the ability to deploy an EJB JAR to an app server of choice?
    Thanks in advance.

    TopLink's Mapping Workbench will generate the toplink-ejb-jar.xml file for use in CMP and will augment the base ejb-jar.xml file.
    http://download-west.oracle.com/docs/cd/B10464_04/web.904/b10313/pkg_depl.htm#1132804
    TopLink does not generate the container specific file for WebLogic. More details available at:
    http://download-west.oracle.com/docs/cd/B10464_04/web.904/b10313/pkg_depl.htm#1124592
    TopLink does not include any deployment capabilities. This is the roll of yor IDE or scripts.
    Doug

  • Weblogic-ejb-jar.xml for a Session EJB

    The weblogic-ejb-jar.xml generated for a Session EJB with local interfaces has a jndi-name element instead of local-jndi-name.
    1. Create a Session EJB.
    Select Include Local Interfaces.
    2. In the META-INF directory select New>General>Deployment Descriptors>weblogic-ejb-jar.xml
    The deployment descriptor generated has a jndi-name element.
    For a Session EJB with local interfaces the element should be local-jndi-name.
    thanks,
    Deepak

    weblogic-ejb-jar.xml jndi-name (instead of local-jndi-name) is with JDeveloper version 10.1.2 & 10.1.3

  • 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

  • How will be the weblogic-ejb-jar and ejb-jar xml for EJB Local Interface?

    Hi,
    I have one ear application which is using Stateless Session Beans. I don't have any Bean to Bean communication . At present, the client is invoking remote methods thro Home/Remote interfaces. My doubt is , shall I implement EJBLocal home/ local interface to obtain this same functionality cos, in this app, both client and EJb bean have been deployed in same JVM. Can Local interfaces only be applicable to Bean - Bean relation ship?If LocalHome/Local interfaces can be implemented in my scenario, then may I know how will be the ejb-jar.xml and weblogic-ejb-jar.xml?
    thanks and regards,
    Venkat.

    Local interfaces are for communication between ejbs and their clients when both are in the same JVM. The clients can be normal clients, jsps, servlets, and other ejbs. If the client is not in the same JVM you cannot use local interfaces even though your client is another ejb.
    Advantage of using local interface is it reduces the network overhead.
    For more information you can download Mastering Enterprise Java Beans Third Edition by Ed Roman. You can go through 45
    You can download pdf version from.
    http://www.theserverside.com/books/wiley/masteringEJB/index.tss.
    Let me know the URL of the ejb doc that you referred.
    Thanks..

  • Oc4j generated finders in orion-ejb-jar.xml file causing errors

    Any information or assistance would be greatly appreciated.
    I have encountered a problem with the generated orion-ejb-jar.xml file.
    It looks like the additional finder methods that are generated when the application
    is deployed are incorrect from the 9.0.3 version to the new 10.1.2.0.2 version.
    The original content of orion-ejb-jar.xml before additional finder syntax is added:
    <finder-method query=
    "NO_SYS_USER_OBJECT_HISTORY.USER_ID=UPPER($1) and
      NO_SYS_USER_OBJECT_HISTORY.AUTOID NOT IN(
      SELECT H1.AUTOID                             
      FROM   NO_SYS_USER_OBJECT_HISTORY H1,                                
             (SELECT AUTOID                                     
              FROM   NO_SYS_USER_OBJECT_HISTORY                                    
              WHERE  USER_ID=UPPER($1)                                    
              ORDER BY DATE_TIME DESC) H2                            
      WHERE  ROWNUM &lt;= $2
        AND  H1.AUTOID = H2.AUTOID)">
    <method>
      <ejb-name>NoUserHistoryEntry</ejb-name>
      <method-name>findOldest</method-name>
      <method-params>
       <method-param>java.lang.String</method-param>
       <method-param>java.lang.Integer</method-param>
      </method-params>
    </method>
    </finder-method>
    After deploying in 9.0.3 the following information is added to the orion-ejb-jar.xml file:
    <finder-method query=
    "NO_SYS_USER_OBJECT_HISTORY.USER_ID=UPPER($1) and
      NO_SYS_USER_OBJECT_HISTORY.AUTOID NOT IN(
      SELECT H1.AUTOID
      FROM   NO_SYS_USER_OBJECT_HISTORY H1,
             (SELECT AUTOID                                     
              FROM   NO_SYS_USER_OBJECT_HISTORY
              WHERE  USER_ID=$1   
              ORDER BY DATE_TIME DESC) H2
      WHERE  ROWNUM &lt;= $2
        AND  H1.AUTOID = H2.AUTOID)">
    <!-- Generated SQL:
      "select NO_SYS_USER_OBJECT_HISTORY.autoid
       from   NO_SYS_USER_OBJECT_HISTORY
       where  NO_SYS_USER_OBJECT_HISTORY.USER_ID=UPPER(?)
         and  NO_SYS_USER_OBJECT_HISTORY.AUTOID NOT IN(
              SELECT H1.AUTOID                             
              FROM   NO_SYS_USER_OBJECT_HISTORY H1,
                     (SELECT AUTOID
                      FROM   NO_SYS_USER_OBJECT_HISTORY
                      WHERE  USER_ID=?
                      ORDER BY DATE_TIME DESC) H2
              WHERE ROWNUM <= ?
                AND H1.AUTOID = H2.AUTOID) -->
    <method>
      <ejb-name>NoUserHistoryEntry</ejb-name>
      <method-name>findOldest</method-name>
      <method-params>
       <method-param>java.lang.String</method-param>
       <method-param>java.lang.Integer</method-param>
      </method-params>
    </method>
    </finder-method>
    After deploying in 10.1.2.0.2 the following information is added to the
    orion-ejb-jar.xml file:
    <finder-method query=
    "NO_SYS_USER_OBJECT_HISTORY.USER_ID=UPPER($1) and
      NO_SYS_USER_OBJECT_HISTORY.AUTOID NOT IN(
      SELECT H1.AUTOID
      FROM   NO_SYS_USER_OBJECT_HISTORY H1,
             (SELECT AUTOID
              FROM   NO_SYS_USER_OBJECT_HISTORY
              WHERE  USER_ID=UPPER($1)
              ORDER BY DATE_TIME DESC) H2
      WHERE  ROWNUM &lt;= $2
        AND  H1.AUTOID = H2.AUTOID)">
    <!-- Generated SQL (pk only):
      "select H1.autoid
       from   NO_SYS_USER_OBJECT_HISTORY
       where  NO_SYS_USER_OBJECT_HISTORY.USER_ID=UPPER(?)
         and  NO_SYS_USER_OBJECT_HISTORY.AUTOID NOT IN(
              SELECT H1.AUTOID
              FROM   NO_SYS_USER_OBJECT_HISTORY H1,
                     (SELECT AUTOID
                      FROM   NO_SYS_USER_OBJECT_HISTORY
                      WHERE  USER_ID=UPPER(?)
                      ORDER BY DATE_TIME DESC) H2
              WHERE  ROWNUM <= ?
                AND  H1.AUTOID = H2.AUTOID) -->
    <!-- Generated SQL (all columns):
      "select H1.autoid, H1.USER_ID, H1.OBJECT_CLASS_ID,
                 H1.DATE_TIME, H1.COMMENT_TEXT, H1.ACTION,
                 H1.ACTION_DATA, H1.SITE_DESCRIPTION
       from   NO_SYS_USER_OBJECT_HISTORY
       where  NO_SYS_USER_OBJECT_HISTORY.USER_ID=UPPER(?)
         and  NO_SYS_USER_OBJECT_HISTORY.AUTOID NOT IN(
              SELECT H1.AUTOID
              FROM   NO_SYS_USER_OBJECT_HISTORY H1,
                     (SELECT AUTOID
                      FROM   NO_SYS_USER_OBJECT_HISTORY
                      WHERE  USER_ID=UPPER(?)
                      ORDER BY DATE_TIME DESC) H2
              WHERE  ROWNUM <= ?
                AND  H1.AUTOID = H2.AUTOID) -->
    <method>
      <ejb-name>NoUserHistoryEntry</ejb-name>
      <method-name>findOldest</method-name>
      <method-params>
       <method-param>java.lang.String</method-param>
       <method-param>java.lang.Integer</method-param>
      </method-params>
    </method>
    </finder-method>
    The problem with the 10.1.2.0.2 generated finders is that it is prepending H1 when
    it should be NO_SYS_USER_OBJECT_HISTORY which results in the following error:
    Exception in thread "main" com.cdtelecom.vygroe.configuration.ConfigurationException:
    com.evermind.server.rmi.OrionRemoteException:
    Transaction was rolled back: Database error: java.sql.SQLException:
    ORA-00904: "H1"."SITE_DESCRIPTION": invalid identifier
    ; nested exception is:
            java.sql.SQLException: ORA-00904: "H1"."SITE_DESCRIPTION": invalid identifier
            at com.cdtelecom.vygroe.configuration.ConfigurationSession.internalRecordAction(ConfigurationSession.java:869)
            at com.cdtelecom.vygroe.configuration.ConfigurationSession.recordAction(ConfigurationSession.java:401)
            at com.cdtelecom.vygroe.configuration.Configuration.recordActionSaveOrder(Configuration.java:886)
            at com.cdtelecom.vygroe.configuration.Configuration.getOrder(Configuration.java:239)
            at test10g.main(test10g.java:47)
    I tried to manually edit the file but when I shutdown and restart oc4j it regenerates the file again.

    Jingzhi -- If you define the correct EJB-QL you should get the correct SQL generated for the finder. If that's not happening can you verify it against the OC4J v903 production release and see if it is still happening. I don't know if this helps with the JDeveloper problem specifically but if you don't need to create your own finders then that I hope should help.
    Thanks -- Jeff

  • How to prevent OC4J generating DD file orion-ejb-jar.xml?

    I am doing a migration from JBoss to OC4J. I already have the ejb-jar.xml file which is working under JBoss. The xDoclet generate all the parts except the CMR parts so I deployed the ear file without orion-ejb-jar.xml and I got generated version from OC4J. I merge the xDoclet version with the OC4J generated version by adding the CMR parts into my xDoclet version and modify the table name and persistance fields name generated by OC4J. I don't want to mapping all the relationships so I use:
    <ejb-relation >
    <ejb-relation-name>AppReport-User</ejb-relation-name>
    <ejb-relationship-role >
    <ejb-relationship-role-name>the-User-of</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source >
    <ejb-name>AppReports</ejb-name>
    </relationship-role-source>
    <cmr-field >
    <cmr-field-name>user</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role >
    <ejb-relationship-role-name>the-appreports-of</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source >
    <ejb-name>Users</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    Here I just want unidirectional EJB AppReports refewrence to Users but I don't want Users EJB reference back to AppReports. The OC4j will generate DD file orion-ejb-jar.xml again with all the missing parts combined with my merged version orion-ejb-jar.xml and put it under my deploment directory. It seems it voilate the ejb-jar.xml since I don't have <cmr-field-name> defined for AppReports. My question is how I can control this way and let OC4J not generate orion-ejb-jar.xml again.

    You need to have the orion-ejb-jar.xml in your app before you initially deploy it, otherwise OC4J will automatically create it for you. I would take to copy of the orion-ejb-jar.xml that is a result of the combination of OC4J and XDoclet generated and add this to my code base as the de-facto orion deployment descriptor to be included in all app deployments. On deploying the app, OC4J will see that a orion-ejb-jar file already exists and will not auto create one. Hope this makes sense!

  • Deploytool not deleting fields in ejb-jar.xml and sun-cmp-mappings.xml

    Java(TM) 2 Platform, Enterprise Edition 1.4 SDK Developer Release deploytool
    This situation was found on a simple, but original application using CMP EJB's. The database is MySQL using numeric id's and foreign keys.
    I changed some fields in the database and went through the usual 14 attempts at getting deploytool to recognize a new schema without success. The one thing that is noticed is that when I tried to open the CMP display in the Entity selection the tool would not show any data, also it appears to lockup; however, if you select EJB in the choice box of the upper left you can get the view to close.
    In desperation (mind you decoding machine generated XML is NOT my favorite activity) I looked at the descriptor viewer and notice fields existed in the descriptor that were deleted in the database. The tool had read the schema because the new fields were also present.
    In sun-cmp-mappings.xml the old <cmp-field-mapping> definitions were still present. and in ejb-jar.xml the <query> and <cmp-field> were still present.
    After deleting them out -- happy, happy, happy, joy, joy, joy. Deploytool accepted the new schema (keeping all the proper old stuff correctly. yea!!!) and a simple create mapping process brought the beans and database into sync.
    I didn't want to report a bug, since I am actually new to EJB's so if anybody wishes to comment please do. I just wanted to provide a heads up in case this was something not noticed.
    BTW I'm a recent expert at EJB's anybody got a job? :-)

    Have you tried to unmap your fields and relationships?
    Go through all your enterprise beans in the CMP Database window and click Unmap All until the Persistent Field Mappings table is empty of mappings. Then click Create Database Mappings, select the new schema, and verify the fields and relationships were mapped. This should clear out any old field mappings.
    -Ian Evans

Maybe you are looking for

  • 5G iPod, Charges only when connectec to Mac

    My subject pretty much describes it all. After months of working perfectly, all of a sudden I noticed my iPod wasn't charging with my car adapter. I bought a new adapter, and still no luck. Won't even just power the iPod, it'll go from the charging s

  • FI-AR Interest calculation Interest Block

    Hi, Can any one give suggession on the following. 1. When i calculate the Interest system is calculating the Interest on Interest. But my client is asking Interest should not calculate on Interest Line item. Is there any way to solve this issue? 2. I

  • Web Viewer for an app

    It looks like a web viewer exists. How can I direct a client/consumer to download and view the published app on a desktop?

  • My blackberry IM messages are being deleted without my o...

    my blackberry IM messages are being deleted without my or the other individual ending the conversation. How do I stop this from happening and can the old messages be retreived?

  • Sequence in forms

    I want to use oracle sequence in form to increment column Id of table. How to use it in form so that sequence should not increase in case of rollback.