Orion-ejb-jar works in oc4j, but seemingly ignored while running in jdev

I'm using OC4J 9.0.2.0 and JDeveloper 9.0.2.
I have a set of entity classes. I'm trying to map the entity name to a different table name, and map the field names to different column names.
I have an ejb-jar.xml that sets the ejb-name, and I have an orion-ejb-jar.xml that uses the ejb-name, specifies a "table-name", and uses "cmp-field-mapping" elements. The "table-name" and "cmp-field-mapping" elements do what I said, using a table name different from the ejb name, and db column names different from the field names.
When I build and deploy this in standalone OC4J, it works fine. It creates the exact table and column names that I specified.
Now, how the heck do I get this to work in JDeveloper 9.0.2? Is this impossible as of this version? I need to know this.
In JDeveloper, I can edit the orion-ejb-jar.xml file, and I can do the "Edit Settings" option, and that all looks correct, but when I finally run the embedded OC4J, it creates the wrong tables with the wrong attributes.

I tried a simple test case and it seems to work fine
I create a entity bean by name "foo" with 2 fields "col1" (CMP PK) and "col2" (CMP field)
Select orion-ejb-jar.xml in project and right-click on it and choose settings
Select foo in the upper left hand items
Added table name on the right hand side "deployfoo"
Select CMP Field Mappings on the lower left hand side
Select col1 and in the persistence name add "firstcolumn"
Seelct col2 and in the persistence namd add "secondcolumn"
When I run the bean the table is created with the above name and columns
Message in log window
<<
Auto-creating table: create table deployfoo (firstcolumn VARCHAR2(255) not null primary key, secondcolumn VARCHAR2(255) null)
>>>
raghu
JDev Team

Similar Messages

  • Error while migrating orion-ejb-jar.xml from OC4J 9.0.4.1

    I am trying to use Toplink migration tool to take our existing orion-ejb-jar.xml file and toplink-ejb-jar.xml file to new 10.1.3 deployment. While running the migration tool I get the following error
    WARNING: Oc4j native CMP setting optimistic-locking on
    entity(TransactionTypeEntityBean) is not migrated and supported.
    java.lang.IllegalArgumentException: MWDatabaseField[9BE2B5]
    (TAX_RULE.TAX_RULE_ID)
    at
    oracle.toplink.workbench.mappingsmodel.desc.relational.MWRelationalPrima
    ryKeyPolicy.addPrimaryKey(MWRelationalPrimaryKeyPolicy.java:99)
    at
    oracle.toplink.tools.migration.RuntimeCMPProjectToMWProjectConverter.con
    vertDescriptor(RuntimeCMPProjectToMWProjectConverter.java:297)
    at
    oracle.toplink.tools.migration.RuntimeCMPProjectToMWProjectConverter.con
    vertDescriptors(RuntimeCMPProjectToMWProjectConverter.java:265)
    at
    oracle.toplink.tools.migration.RuntimeCMPProjectToMWProjectConverter.con
    vertProject(RuntimeCMPProjectToMWProjectConverter.java:144)
    at
    oracle.toplink.tools.migration.MigrationManagerBase.convertAndWriteoutMW
    Project(MigrationManagerBase.java:369)
    at
    oracle.toplink.tools.migration.MigrationManagerBase.migrate(MigrationMan
    agerBase.java:358)
    at
    oracle.toplink.tools.migration.io.MigrationIOManager.buildMigratedJarFil
    e(MigrationIOManager.java:243)
    at
    oracle.toplink.tools.migration.io.MigrationIOManager.operateEarEntry(Mig
    rationIOManager.java:181)
    at
    oracle.toplink.tools.migration.io.MigrationIOManager.operateEar(Migratio
    nIOManager.java:145)
    at
    oracle.toplink.tools.migration.io.MigrationIOManager.operateIO(Migration
    IOManager.java:88)
    at
    oracle.toplink.tools.migration.MigrationManagerBase.startMigration(Migra
    tionManagerBase.java:280)
    at
    oracle.toplink.tools.migration.MigrationManagerBase.run(MigrationManager
    Base.java:121)
    at
    oracle.toplink.tools.migration.MigrationManagerBase.run(MigrationManager
    Base.java:97)
    at
    oracle.toplink.tools.migration.TopLinkCMPMigrator.main(TopLinkCMPMigrato
    r.java:59)

    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

  • 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

  • Orion-ejb-jar.xml is overwritten every deployment and not using from .jar

    My application is an ear file containing a single jar and a war.
    My configuration looks like:
    /applications/<appname>/myejbs.jar
    within myejbs.jar, exists meta-inf\orion-ejb-jar.xml
    Every time I redeploy (copy .ear into /applications and restart server) a version of orion-ejb-jar.xml is copied into /application-deployments/myejbs/orion-ejb-jar.xml but it is not the version that I bundle within my jar. It appears this is the auto-generated version.
    Why is this file being overwritten? I thought it should detect if a version of orion-ejb-jar already exists and leave it intact if so. Is there a config setting I've missed somewhere?

    Well, we had the some problem.
    We solved it when we wrote in the orion-ejb-jar.xml deployment version for actual oc4j.
    example orion-ejb-jar.xml for oc4j 904:
    <orion-ejb-jar deployment-version="9.0.4.0.0">
    or
    <orion-ejb-jar deployment-version="1.5.0">
    example orion-ejb-jar.xml for oc4j 903:
    <orion-ejb-jar deployment-version="9.0.3.0.0">
    Zajo

  • 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

  • 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

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

  • JDeveloper / OC4J rewriting my orion-ejb-jar.xml

    Hi All.
    Im having a play around with OC4J and CMP entity beans and struts at the moment learning some stuff for a new job, so ive started to write a little test app to get used to things.
    Ive created a CMP entity - CustomerEntityEJB, manually defined the tables etc wrote and built it using JDeveloper 10.
    Ive created all the necessary classes and descriptors in JDeveloper and the bean compiles and deploys fine, however no matter what i do, the table attribute of the <entity-deployment> elemnt is ALWAYS removed from the orion-ejb-jar.xml file before its deployed and i have no idea why.
    Here are some snippets form the xml config files im using....
    ejb-jar.xml :
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>CustomerEntityEJB</display-name>
    <ejb-name>CustomerEntityEJB</ejb-name>
    <local-home>com.gb.ejb.entity.customer.CustomerEntityEJBLocalHome</local-home>
    <local>com.gb.ejb.entity.customer.CustomerEntityEJBLocal</local>
    <ejb-class>com.gb.ejb.entity.customer.CustomerEntityEJBBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>false</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CustomerEntityEJB</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>title</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>forename</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>surname</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>active</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    <ejb-ql>SELECT OBJECT(c) FROM CustomerEntityEJB c</ejb-ql>
    </query>
    </entity>
    orion-ejb-jar.xml as in JDeveloper:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" schema-major-version="10" schema-minor-version="0">
    <enterprise-beans>
    <persistence-manager name="toplink"/>
    <session-deployment name="CustomerSessionEJB" local-location="CustomerSessionEJB" />
    <entity-deployment name="CustomerEntityEJB" data-source="jdbc/PostgresDS" table="Customer" local-location="CustomerEntityEJB">
    <primkey-mapping>
    <cmp-field-mapping name="id"/>
    </primkey-mapping>
    <cmp-field-mapping name="active"/>
    <cmp-field-mapping name="email"/>
    <cmp-field-mapping name="forename"/>
    <cmp-field-mapping name="id"/>
    <cmp-field-mapping name="password"/>
    <cmp-field-mapping name="surname"/>
    <cmp-field-mapping name="title"/>
    </entity-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    orion-ejb-jar.xml as viewed in the OC4J enterprise manager.     
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.3.0" deployment-time="1151415a0e3" schema-major-version="10" schema-minor-version="0" >
    <enterprise-beans>
    <persistence-manager name="toplink" class="oracle.toplink.internal.ejb.cmp.oc4j.Oc4jPersistenceManager" descriptor="toplink-ejb-jar.xml">
    </persistence-manager>
    <session-deployment name="CustomerSessionEJB" location="CustomerSessionEJB" local-location="CustomerSessionEJB" persistence-filename="CustomerSessionEJB">
    <ejb-ref-mapping name="ejb/local/CustomerEntityEJB" location="TWA-EJB_CustomerEntityEJBLocal" />
    </session-deployment>
    <entity-deployment name="CustomerEntityEJB" location="CustomerEntityEJB" local-location="CustomerEntityEJB" concrete-bean-class="CustomerEntityEJB_ConcreteSubClass3" data-source="jdbc/PostgresDS" local-wrapper="CustomerEntityEJBLocalHome_LocalEntityHomeWrapper5">
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    As you can see, the orion-ejb-jar.xml that been deployed on the server has had extra attributes defined in it (like concrete-bean-class) which makessense - its adding in the bits i didnt to get th bean to deploy - however the table attribue is just removed, meaning my bean cant find the table - hence my app not working.
    i just dont know how to stop this and would be extremely grateful if someone could give me a clue how to get my bean up and working properly as this is driving me insane.
    Thanks in advance..
    Gareth.

    sorted - the <persistence-manager name="toplink"/> element was automatically generated by JDeveloper and put in my orion-ejb-jar.xml appears to be un necessary and seemed to be breaking eveything - as soon as i removed it, the bean seemed to deploy ok and pick up the table name =]
    as a bit of an aside does anyone know why it was automatically put there in the first place if it breaks things?

  • 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

  • Orion-ejb-jar ignored by JDeveloper deploying to OC4J

    orion-ejb-jar.xml is ignored by JDeveloper 903 when deploying to external OC4J 903. Specific mappings like those below are lost:
    <entity-deployment name="RequestEJB" copy-by-value="false" data-source="jdbc/OracleDS" exclusive-write-access="false" table="REQUEST">
    <primkey-mapping>
    <cmp-field-mapping name="requestid" persistence-name="REQUESTID" persistence-type="NUMBER(9)"/>
    </primkey-mapping>
    <cmp-field-mapping name="requestid" persistence-name="REQUESTID" persistence-type="NUMBER(9)"/>
    <cmp-field-mapping name="requestuser" persistence-name="REQUESTUSER" persistence-type="VARCHAR2(30)"/>
    <cmp-field-mapping name="requestlabel" persistence-name="REQUESTLABEL" persistence-type="VARCHAR2(12)"/>
    <cmp-field-mapping name="requestdate" persistence-name="REQUESTDATE" persistence-type="DATE"/>
    <cmp-field-mapping name="isurgent" persistence-name="ISURGENT" persistence-type="VARCHAR2(1)"/>
    </entity-deployment>
    Instead, JDeveloper creates a new orion-ejb-jar.xml with different table name:
              <entity-deployment name="RequestEJB" location="RequestEJB" local-wrapper="RequestHome_EntityHomeWrapper421" table="RequestEJB_modulab_Proj_n76ccv" data-source="jdbc/OracleDS" exclusive-write-access="false" locking-mode="optimistic" update-changed-fields-only="true" delay-updates-until-commit="true" min-instances-per-pk="0" max-instances-per-pk="50" disable-wrapper-cache="true">
                   <primkey-mapping>
                        <cmp-field-mapping name="requestid" persistence-name="requestid" />
                   </primkey-mapping>
                   <cmp-field-mapping name="requestuser" persistence-name="requestuser" />
                   <cmp-field-mapping name="requestlabel" persistence-name="requestlabel" />
                   <cmp-field-mapping name="requestdate" persistence-name="requestdate" />
                   <cmp-field-mapping name="isurgent" persistence-name="isurgent" />
                   <finder-method query="">
                        <!-- Generated SQL: "select RequestEJB_modulab_Proj_n76ccv.requestid from RequestEJB_modulab_Proj_n76ccv -->
                        <method>
                             <ejb-name>RequestEJB</ejb-name>
                             <method-name>findAll</method-name>
                             <method-params>
                             </method-params>
                        </method>
                   </finder-method>
              </entity-deployment>
    orion-ejb-jar is placed at the META-INF folder. Why does JDeveloper ignore it? It does not ignore orion-application.xml nor orion-web.xml. Must I configure project or deployment profiles not to overwrite orion-ejb-jar?

    I believe that it is not JDeveloper issue but OC4J one. It does not pick up new orion-ejb-jar.xml if you re-deploy bean(s). It should deploy your orion-ejb-jar.xml when you're deploying yor application for the first time (so there is not orion-ejb-jar.xml in deployments directory). If you want OC4J to pick changes up remove orion-ejb-jar.xml from $OC4J_HOME/application-deployments/<application>/<Bean>.jar/ and then deploy it either manually or with JDeveloper. I hope it will help.

  • Broken orion-ejb-jar.dtd?

    I use the Ant task <xmlvalidate> in an EJB project to check the EJB XML deployment descriptors against their DTDs. Checking the (Sun-specified) "ejb-jar.xml" is fine. JDeveloper creates the OC4J specific deployment descriptor "orion-ejb-jar.xml" with a reference to the DTD located at "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd". Now this DTD seems to be broken.
    Firstly, the DTD seems to have an invalid syntax. I'm not a DTD expert but Ant complains about lines 279-281 of that DTD :
    279: isolation (commited | serializable | uncommited | repeatable_reads)
    280: CDATA #IMPLIED
    281: locking-mode (pessimistic | optimistic | read-only | old_pessimistic)
    286: max-tx-retries CDATA #IMPLIED
    287: update-changed-fields-only (true | false) "true"
    There seems to be an attribut missing altogether at line 280 (see line 286) so I deleted that line. Then for lines 279 and 281, Ant complained about missing quotes - apparently, such an "enum" needs to have a "default value" (as in line 287), so I manually added such a value for each line.
    The final error was in the "orion-ejb-jar.xml" (created by JDeveloper itself). Here is a piece of that:
    <orion-ejb-jar>
    <enterprise-beans>
    <session-deployment max-instances="-1" name="DiscountCalculator"/>
    I assume that the "max-instances" attribute sets the number of EJB instances in the OC4J pool to "unlimited". However, according to the DTD, session beans don't have such a "max-instances" attribute (lines 10-21):
    <!-- Deployment info for a session bean. -->
    ELEMENT session-deployment (env-entry-mapping*, ejb-ref-mapping*, resource-ref-mapping*)
    ATTLIST session-deployment call-timeout CDATA #IMPLIED
    copy-by-value CDATA #IMPLIED
    location CDATA #IMPLIED
    max-tx-retries CDATA #IMPLIED
    name CDATA #IMPLIED
    persistence-filename CDATA #IMPLIED
    timeout CDATA #IMPLIED
    wrapper CDATA #IMPLIED
    replication CDATA #IMPLIED
    >
    So I copied and pasted the instances attribute from the entity bean section.
    How come the DTD is broken? Even the 9.0.3 OC4J docs (http://download-east.oracle.com/docs/cd/A97688_08/generic.903/a97677/dtdxml.htm#620714) talk about all sorts of features (such as the "max-instances" attribute for session beans) and still points to the DTD "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd" that doesn't have these features at all.

    Karsten,
    In case you are still on it, I stumbled upon this some time ago, too. My best guess is that they miss entire phrase, which I put in bold:
    ....mmited | repeatable_reads ) "commited"
    disable-wrapper-cache CDATA #IMPLIED
    locking-mode ( pesim...
    (There is a line break between '"commited"' and 'disable-wrapper-cache'. 'commited', 'uncommited' must be MISSPELLED exactly as above.)
    Btw, max-instances and min-instances are in the DTD that ships with 9.0.3 (jarred in oc4j.jar). This DTD, however, is still broken in the way that you found (it won't even XML-validate). How do they go around this? go figure! Oracle documentation? we all know ...
    Best regards,
    bjk

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

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

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

  • 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

  • Orion-ejb-jar.xml is not valid

    I am trying to parse orion-ejb-jar.xml as follows:
    package test;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.apache.xml.serialize.*;
    import org.xml.sax.*;
    import java.io.*;
    public class GetFieldSize {
    String filePath = null;
    Document document = null;
    public GetFieldSize(String filePath) {
    this.filePath = filePath;
    public void constructDocument() {
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    builder.parse(new InputSource(new FileReader(filePath)));
    } catch (FactoryConfigurationError fce) {
    fce.printStackTrace();
    } catch (ParserConfigurationException pce) {
    pce.printStackTrace();
    } catch (SAXException se) {
    se.printStackTrace();
    } catch (IOException ie) {
    ie.printStackTrace();
    public static void main(String[] args) {
    GetFieldSize getFieldSize = new GetFieldSize("Z:\\nosqms\\ProcessTools\\qTools\\qTools\\qTools\\src\\META-INF\\orion-ejb-jar.xml");
    getFieldSize.constructDocument();
    I got the following parse error.
    oracle.xml.parser.v2.XMLParseException: Expected '>'.
    void oracle.xml.parser.v2.XMLError.flushErrors()
    void oracle.xml.parser.v2.NonValidatingParser.parseMarkupDecl()
    void oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl()
    void oracle.xml.parser.v2.NonValidatingParser.parseProlog()
    void oracle.xml.parser.v2.NonValidatingParser.parseDocument()
    void oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
    org.w3c.dom.Document oracle.xml.jaxp.JXDocumentBuilder.parse(org.xml.sax.InputSource)
    void test.GetFieldSize.constructDocument()
    void test.GetFieldSize.main(java.lang.String[])
    When I opened the orion-ejb-jar.xml in IE, I got the following error:
    A string literal was expected, but no opening quote character was found. Line 87, Position 1
    CDATA #IMPLIED
    Seems like problem with http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd.
    How to rectify it?

    1: Replace
    isolation (committed | serializable | uncommitted | repeatable_reads)
    CDATA #IMPLIED
    locking-mode (pessimistic | optimistic | read-only | old_pessimistic)
    by
    isolation (committed | serializable | uncommitted | repeatable_reads) #IMPLIED
    locking-mode (pessimistic | optimistic | read-only | old_pessimistic) #IMPLIED
    2: in
    <!ELEMENT ior-security-config (transport-config?, as-context?
    sas-context?) >
    add the final comma:
    <!ELEMENT ior-security-config (transport-config?, as-context?, sas-context?) >

  • Missing listener-threads attribute in orion-ejb-jar.xml !!

    Hi All,
    I was trying to do some performance tuning as given in BPEL admin guide. For one of the BPEL property namely 'dspMaxThreads', guide says "Sum of dspMaxThreads of ALL domains should be <= the number of mdb listener threads on the workerbean". Now when i open <SOA_HOME>/j2ee/oc4j_soa/application-deployments/orabpel/orion-ejb-jar.xml and navigate to workerbean, i can not find any listener-threads attribute in message-driven-deployment tag.
    <message-driven-deployment name="WorkerBean" min-instances="100" resource-adapter="BPELjms">
    However there is a ReceiverThreads property set to 40.
    <message-driven-deployment name="WorkerBean" min-instances="100" resource-adapter="BPELjms">
    <config-property-name>ReceiverThreads</config-property-name>
    <config-property-value>40</config-property-value>
    </config-property>
    </message-driven-deployment>
    Now my question is that can i add listener-threads attribute to message-driven-deployment tag and then tune dspmaxthreads accordingly, Or
    i can make use of ReceiverThreads property to match with dspmaxthreads property. I am really confused b/w listener-threads and ReceiverThreads.
    Can anyone clarify the same ?
    I have ORACLE SOA Suite ver 10.1.3.1 (with 10.1.3.3 patch) installed.
    Thanks in advance.

    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

Maybe you are looking for

  • IOS 7.1 battery drain iPhone 4S

    While the performance increase on iOS 7.1 appears genuine - I'm experiencing serious battery drain on my iPhone 4S (64GB model). I have parallax disabled as well as background app refresh disabled. I updated from iOS 7.06 to 7.1 via USB cable attache

  • Passing a form bean  with a link

    Hii Javaties I am passing some parameters from a jsp page to the action class in the following manner �2=<bean write name="formbean" property="prop2" />Link Can anyone tell me is this the right approach to pass paramters from a link . Can i pass the

  • Firefox failing to stay logged in/ recognise certain websites

    Downloaded Firefox 4 the other day and have been having consistent issues with it not keeping me logged into Facebook, emails or news sites when I close the browser window. Additionally, it is failing to communicate properly with my bank and since it

  • Error extracting mzm.tvbnoepi.pkg while installing Xcode from App Store on OS X Loin

    Hi Folks. First post here. I am trying to install Xcode from App Store on Mac OS X Loin and there is this error which I am facing. Error extracting mzm.tvbnoepi.pkg This is persistant. I have reinstalled entire OS and then I tried to install XCode Ag

  • Running Adobe products on Macbook Air

    Hello, I am currently looking into purchasing a Macbook laptop which will be used for my home business as a Graphic Designer, primarily using Photoshop, Illustrator, Indesign and Dreamweaver, which I will be getting through Adobe's new Creative Cloud