Newbie - JDev Missing Entities from Tables (JPA/EJB 3.0) Option

I'm trying to run through the 'Introduction to EJB3.0 Using Oracle JDeveloper and OC4J' tutorial. One of the early steps says to select the 'Entities from Tables' option under the Business Tier/EJB category. I have six options available - CMP Entity Beans from Tables, EJB Data Control Wizard, EJB Diagram for EJB1.1, 2.0 and 2.1, Entity Bean, Message-Driven Bean, and Session Bean.
I have JDev Studio Edition Verion 10.1.3.0.4 (SU5) - Build JDEVADF_10.1.3_NT_060125.0900.3673
I just downloaded it from OTN last week. <I>Did I miss a step somewhere?</I>

Thank you, Andrej. It appears the tutorial has not been updated for the version of JDev I have. I was able to get a few steps further down in the tutorial, but hit more stumbling blocks. This probably isn't something for a true java newbie to try. I'll see if I can find something more in line with my experience (or lack thereof).
Have a great evening.

Similar Messages

  • Entities from tables (JPA EJB 3.0) creation problem

    I have a problem to get all the entities created in JDev 10.1.3.3 on UBuntu Linux, JDK 1.5.11. I think that some relations missing also. When I try to connect from my Win XP machine to the same DB (Oracle XE) everything is fine. JDev on Win machine uses JDK 1.5.06. Maybe the problem is JDK version? Any advice?
    Thanks in advance

    Thank you, Andrej. It appears the tutorial has not been updated for the version of JDev I have. I was able to get a few steps further down in the tutorial, but hit more stumbling blocks. This probably isn't something for a true java newbie to try. I'll see if I can find something more in line with my experience (or lack thereof).
    Have a great evening.

  • Bufg in entities from tables wizard

    Environment Win XP 5.1.2600 Spanish; Jdeveloper 10132 with this table
    SQL> desc linea;
    Name                                      Null?    Type
    CODPROV                             NOT NULL VARCHAR2(3)
    CODLINE                               NOT NULL VARCHAR2(3)
    LINEA                                    NOT NULL VARCHAR2(30)
    CODSLINE                                             NUMBER(5)
    ESTADO                                                 CHAR(1)Codprov,Codline is PK
    The entities from tables wizard generates:
    package model;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.NamedQuery;
    @Entity
    @NamedQuery(name = "Linea.findAll", query = "select o from Linea o")
    public class Linea implements Serializable {
        public Linea() {
    package model;
    import java.io.Serializable;
    public class LineaPK implements Serializable {
        public LineaPK() {
        public boolean equals(Object other) {
            if (other instanceof LineaPK) {
                final LineaPK otherLineaPK = (LineaPK) other;
                final boolean areEqual = true;
                return areEqual;
            return false;
        public int hashCode() {
            return super.hashCode();
    }The same with Jdev 10133. any ideas?? the code for the wizard have not changed between 10132 and 10133?
    Thanks
    Alex Urzola R.

    It works for hr.departments; indeed the wizards generates some other entities in my project but generates this empty class with that table "Lineas" (which have a composite key) and when i ask to generate several entities aside with this one, it skip the generation of some other entity also.
    Note I'm Using JDK 1.5.0_08-b03 which is NOT part of neither 10132 nor 10133 dist.

  • Entities from (ms sql) tables = crash

    Hi,
    I'm trying to create entities from tables in ms sql server, but the wizard exits with no error message and the only entity generated has no members. The only message displayed in the EJB log is "Generating classes for Entity bean Name..."
    Is there any log where I could see what the problem is?
    RGS
    Jernej

    Jernej,
    Did you try running jdev\bin\jdev.exe from a console window - it should show any stack traces there.
    John

  • Creating Entities from database tables ?

    Hi everyone,
    I am trying to prpare an entity relationship diagrams for a small application that about 5 or 6 tables. Can someone please let me know how I can reverse engineer or make entities from tables ?
    Thanks
    IQ

    Hi there,
    I have checked to see that I" am using the correct container. Also this is a fresh Designer installation so there are not previous entities.
    I however notice a few warningas and and error. I am sure this should not be the cause for me not seeing tables in the table to entoty retrofit but I may be wrong. I am seing the following warnings/ errors. Is this the cause of my problem or could it be something else.
    CDS-15317 Warning: invalid Database User reference ('RCAR') in Database Object Grant to 'RCAR' - ignored
    CDS-15317 Warning: invalid Database User reference ('BOLDING_SHARED') in Database Object Grant to 'BOLDING_SHARED' - ignored
    CDS-15317 Warning: invalid Database User reference ('SKMT') in Database Object Grant - ignored
    CDS-15317 Warning: invalid Role reference ('PASD_USER') in Database Object Grant to 'PASD_USER' - ignored
    CDS-15014 Error: invalid Table reference ('EMPLOYEES') in Foreign Key 'EMP_FK'
    Processing Complete: 1 error(s), 281 warning(s)
    Please advise
    Thanks
    IQ

  • How to do a JSP talks with my "EJB from tables" ?

    Hi !!
    I'm new to Jdev.
    I have built a database, using MySql, and I also have built EJB from my tables.
    My EJB are Entity Beans and I have used the Wizard to create it from tables of my data base.
    Every EJB is working well and I have a simple JAVA client application which can use my
    beans to edit data in my database.
    Now I need create JSP pages that will use my beans, to edit my database too.
    So, I have created a new project and in this project I have built a JSP page, in the same workspace
    that has my beans' project.
    But I don't know what must I do to put my JSP page connected with my beans.
    1) What must I do?
    2) Is it possible to put a JSP page talking with a Entity Bean, or it will be necessary to create session beans?
    3) Is my beans' project a BC4J project? If not, how to change my beans' project to this goal?
    Any hint will be very helpful?
    Thanks.
    Rodrigo Pimenta Carvalho.
    Brazil.
    ==============================================================================

    There is a new feature to support this in the 9.0.3 preview release.

  • Query to return list of all missing primary key ids from table T1

    I found this query online that returns a start and stop for a range of all missing primary key id values from table T1. However i want to rewrite this query to return a whole list of all the missing primary key ids and not a start and stop range. any help plz?
    select strt, stp
    from (select m.id + 1 as strt,
    (select min(id) - 1 from T1 x where x.id > m.id) as stp
    from T1 m left outer join T1 r on m.id = r.id - 1 where r.id is null)x where stp is not null

    with t as
              select  1 as id from dual union all
              select  2 as id from dual union all
              select  3 as id from dual union all
              select  5 as id from dual union all
              select  8 as id from dual union all
              select 10 as id from dual union all
              select 11 as id from dual union all
              select 20 as id from dual
    select  id_start + level missing_id
      from  (
             select  id id_start,
                     nullif(lead(id) over(order by id) - 1, id) id_end
               from  t
      start with id_end is not null
      connect by prior id_start = id_start
             and prior dbms_random.random is not null
             and level <= id_end - id_start
    MISSING_ID
             4
             6
             7
             9
            12
            13
            14
            15
            16
            17
            18
    MISSING_ID
            19
    12 rows selected.Or:
    with t as
              select  1 as id from dual union all
              select  2 as id from dual union all
              select  3 as id from dual union all
              select  5 as id from dual union all
              select  8 as id from dual union all
              select 10 as id from dual union all
              select 11 as id from dual union all
              select 20 as id from dual
    select  id_start + level - 1 missing_id
       from  (
              select  min(id) id_start,
                      max(id) id_end
                from  t
       connect by level <= id_end - id_start
    minus
    select  id
       from  t
    MISSING_ID
             4
             6
             7
             9
            12
            13
            14
            15
            16
            17
            18
    MISSING_ID
            19
    12 rows selected.SY.

  • Insert old missing data from one table to another(databaase trigger)

    Hello,
    i want to do two things
    1)I want to insert old missing data from one table to another through a database trigger but it can't be executed that way i don't know what should i do in case of replacing old data in table_1 into table_2
    2)what should i use :NEW. OR :OLD. instead.
    3) what should i do if i have records exising between the two dates
    i want to surpress the existing records.
    the following code is what i have but no effect occured.
    CREATE OR REPLACE TRIGGER ATTENDANCEE_FOLLOWS
    AFTER INSERT ON ACCESSLOG
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    V_COUNT       NUMBER(2);
    V_TIME_OUT    DATE;
    V_DATE_IN     DATE;
    V_DATE_OUT    DATE;
    V_TIME_IN     DATE;
    V_ATT_FLAG    VARCHAR2(3);
    V_EMP_ID      NUMBER(11);
    CURSOR EMP_FOLLOWS IS
    SELECT   EMPLOYEEID , LOGDATE , LOGTIME , INOUT
    FROM     ACCESSLOG
    WHERE    LOGDATE
    BETWEEN  TO_DATE('18/12/2008','dd/mm/rrrr') 
    AND      TO_DATE('19/12/2008','dd/mm/rrrr');
    BEGIN
    FOR EMP IN EMP_FOLLOWS LOOP
    SELECT COUNT(*)
    INTO  V_COUNT
    FROM  EMP_ATTENDANCEE
    WHERE EMP_ID    =  EMP.EMPLOYEEID
    AND    DATE_IN   =  EMP.LOGDATE
    AND    ATT_FLAG = 'I';
    IF V_COUNT = 0  THEN
    INSERT INTO EMP_ATTENDANCEE (EMP_ID, DATE_IN ,DATE_OUT
                                ,TIME_IN ,TIME_OUT,ATT_FLAG)
         VALUES (TO_NUMBER(TO_CHAR(:NEW.employeeid,99999)),
                 TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'),       -- DATE_IN
                 NULL,
                 TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'),      -- TIME_IN
                 NULL ,'I');
    ELSIF   V_COUNT > 0 THEN
    UPDATE  EMP_ATTENDANCEE
        SET DATE_OUT       =  TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_OUT,
            TIME_OUT       =   TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_OUT
            ATT_FLAG       =   'O'
            WHERE EMP_ID   =   TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
            AND   DATE_IN <=  (SELECT MAX (DATE_IN )
                               FROM EMP_ATTENDANCEE
                               WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
                               AND   DATE_OUT IS NULL
                               AND   TIME_OUT IS NULL )
    AND   DATE_OUT  IS NULL
    AND   TIME_OUT IS NULL  ;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END ATTENDANCEE_FOLLOWS ;
                            Regards,
    Abdetu..

    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;Regards,
    Christian Balz

  • How to get missing records from one table

    I have one table with many records in the table. Each time a record is entered the date the record was entered is also saved in the table.
    I need a query that will find all the missing records in the table.
    so if I have in my table:
    ID          Date          Location
    1           4/1/2015        bld1
    2           4/2/2015        bld1
    3           4/4/2015        bld1
    I want to run a query like
    Select Date, Location FROM [table] WHERE (Date Between '4/1/2015' and '4/4/2015') and (Location = bld1)
    WHERE Date not in
    (Select Date, Location FROM [table])
    and the results would be:
    4/3/2015   bld1
    Thank you

    Do you have a table with all possible dates in it?  You can do a left join from that to your above mentioned table where the right side of the join is null.  If you don't have a table with all possible dates you could user a numbers table.
    Below is one way to achieve what you want with a numbers table...
    DECLARE @Table table (ID Int, DateField Date, Location VarChar(4))
    DECLARE @RunDate datetime
    SET @RunDate=GETDATE()
    IF OBJECT_ID('dbo.Numbers') IS NOT NULL 
    DROP TABLE NUMBERS
    SELECT TOP 10000 IDENTITY(int,1,1) AS Number
       into Numbers
        FROM sys.objects s1
        CROSS JOIN sys.objects s2
    ALTER TABLE Numbers ADD CONSTRAINT PK_Numbers PRIMARY KEY CLUSTERED (Number)
    INSERT INTO @Table (ID, DateField, Location)
    VALUES ('1','20150401','bld1')
    ,('1','20150402','bld1')
    ,('1','20150404','bld1');
    WITH AllDates
    as
    SELECT DATEADD(dd,N.Number,D.StartDate) as Dates
    FROM Numbers N
    cross apply (SELECT CAST('20150101' as Date) as StartDate) as D
    select * 
    from AllDates AD
    left join @Table T on AD.Dates = T.DateField
    where ad.Dates between '20150401' and '20150404'
    AND T.ID IS NULL
    LucasF

  • QM notification attachment links are missing from table SRGBTBREL

    Dear All,
    We have problem in our system and the documents(specially QM notifications-QM02 03) are not accessible from the content server only for a specific period (Nov to Dec 2009) due to a missing link in SRGBTBREL (No idea how the entries are deleted).
    Now we want to know, how we can establish a new link or restore the missing link in table SRGBTBREL ?
    Also if someone can tell how to find the relation between the PHIO_ID and notification number ?
    or the relation between Archive object id and notification..if we have this information then we can some standard function module provided by SAP.
    or anyone else have any better idea , please share
    Thanks in advance.

    Hello Syed,
    Thanks for your reply , the given links were quite useful and we got some ideas that what should be the approach.
    Approach to resolve the issue -
    At this moment we are trying to get the relation between the SOOD , SRGBTBREL, SOFFPHIO tables.
    SOFFCONT1 is no more useful for us as the documents are old and have been archived to Content Server.
    We have all entries in the SOOD table and also in SOFFPHIO table, but in the SRGBTBREL the links are missing and hence the documents are not visible in SAP.
    If somehow we can get the missing link is this table I am quite sure that documents wil be visible and accessible from SAP.
    Our main target is to relate SOOD SRGBTBREL and SOFFPHIO and get the PHIO_ID for the mising documents and then we have a functional module which will help to get the data from content server.
    As per my current unerstanding this is the relation between the tables
    SRGBTBREL-INSTID_B is related to: SOOD-OBJTP,SOOD-OBJYR,SOOD-OBJNO,
    Like FOL30000000000003EXT31000000002416
    Here
    SOOD-OBJTP = EXT
    SOOD-OBJYR = 31
    SOOD-OBJNO = 000000002416
    And This elelement is than linked to table SOFFPHIIO as follows:
    SOOD-IF_DOC_BCS = SOFFPHIO-LOIO_ID
    In the table SOFFPHIO you can find the PHIO_ID what is linked to
    SOFFCONT1 or the Archive Server
    I am trying to solve the problem by using the approach mentioned above , still somehow I have some difficulties to get the links between the tables.
    Can some one tell if my approach is correct or not ? or suggest with any other simple solution ?
    Thanks & Regards
    Javed Patel

  • Missing PRCTR from Number Range Table

    Hi There,
    I need to find out all the the available profit centre which not created yet ie no profit centre  available in CEPC from the number range table NRIV.
    I tried the FM number_get_next but nothing happened.
    Details given below:
    In the NRIV table I have got say following details :
    Object          From Number     To Number    etc     etc
    Y_PC          0000000001     0000000100
    Y_PC          0000000101     0000000150
    Y_PC          0000000160     0000000200
    Profit Centre Created Available in CEPC say
    In the no range 1 to 100
         0000000001
                    0000000002
                    0000000003 (Not created)
         0000000004
                    5 ,6 & 7 missing
         0000000008
    In the no range 101 to 150
         0000000101
                    0000000102
         0000000103
                    0000000104 (Not created)
         0000000105
                    6,7....upto 149...(Not created)
         0000000150
    Similarly in other ranges few nos missing
    My requirement is to read the NRIV table take all  from number and to number into an internal table  and for those nos find the  missing nos from the CEPC table .
    Appreciate your help.
    Regards.
    Sunanda

    Resolved by myself !!
    Cheers.

  • CMP Beans from Tables: Why does the Container try to create new tables?

    I'm trying to develop an EJB application using JDeveloper on 9iAS. I have several CMPs and have my tables that I want my CMPs to be based on already defined in my DB schema. I want to use CMP but I don't want the Container to create the tables, rather I want the Container to map my CMP EJBs to the already existing tables.
    The issue is:
    While creating these CMP EJBs in JDeveloper I chose the "New Enterprise Java Bean" EJB creation wizard using the option labeled "Container-managed Entity Beans from Tables". My assumption is that this does what I want, because the wizard prompts for a schema and table you want to map to. Then it creates the attributes & getter/setter methods, PK class, etc. all based on the table defintion automatically. Great. So why when I try to run my application do I get error messages for each EJB such as:
    Auto-creating table: create table STREET_TYPE (PK_STYP_ID NUMBER(8), STREET_TYPE VARCHAR2(20), primary key (PK_STYP_ID, STREET_TYPE))
    Warning: Error creating table: ORA-00955: name is already used by an existing object
    Huh?? I thought the idea is that the CMP EJB is mapped to the existing table in my schema. Why is the Container trying to create new tables?? Is this possible? Or am I missing something fundamental about how Containers create and manage CMPs? Or is this just a JDevelop container issue? TIA

    I presume you are getting the problem on application
    deploy? This happens when upon initialization of the application using the built-in OC4J container/app server that is part of JDeveloper. Here is the full messaging:
    [Starting OC4J using the following ports: HTTP=8989, RMI=23892, JMS=9228.]
    C:\OraHome1\jdk\bin\javaw.exe -ojvm -classpath C:\OraHome1\j2ee\home\oc4j.jar com.evermind.server.OC4JServer -config C:\OraHome1\jdev\system\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    Copying default deployment descriptor from archive at Q:\CBTCOF\COF_APPLICATION\COF_Project\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\OraHome1\jdev\system\oc4j-config\application-deployments\current-workspace-app\classes...
    Auto-deploying file:/Q:/CBTCOF/COF_APPLICATION/COF_Project/classes/ (No previous deployment found)...
    Auto-creating table: create table STREET_TYPE (PK_STYP_ID NUMBER(8), STREET_TYPE VARCHAR2(20), primary key (PK_STYP_ID, STREET_TYPE))
    Warning: Error creating table: ORA-00955: name is already used by an existing object
    [...OTHER SIMILAR ERROR MESSAGES]
    done.
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    If so, in the application.xml file of you
    OC4J instance the is a setting autocreate-tables,
    which by default is true!
    Set it to false as below and that should clear up
    your problem.
    <orion-application autocreate-tables="false"
    default-data-Hmm. I found at least a dozen or so files with that name and set everyone that had this attriute to "false", restarted the OC4J server and still got these errors.

  • JPA EJB generic DAO

    I am using Jdeveloper 11g R (11.1.2.3) & weblogic 10 G
    In my pages I use JSF & Facelet
    Hi All
      In a new project I am going to use JPA / EJB session beans and ADF Faces
      Also I am going to use similar pattern described in below link for a GenericDAO
      and inject instances of Generic EJB into my business EJBs
        http://www.adam-bien.com/roller/abien/entry/generic_crud_service_aka_dao
        https://blogs.oracle.com/theaquarium/entry/generic_jpa_dao_repository_implementation
      In second link some people mentioned this way is old and over simplified
      Any body have any comment / ideas or similar cases
      I don't want use any external open source libraries
    Thanks
    Mohsen

    I've read that article several months ago and didn't get a chance to try it out. However, I did work with Hibernate quite a bit.
    I believe the author would have us replace this:
    public update(Person person){
    with this:
    public void update(T o) {
    In the first function, its obvious that I'm updating a record in the Person table.
    In the second function, I need to have a list of all the possible table names (such as 'Person') to know which tables have an update function associated with it that I can use with the generic function. For example, some tables may be read-only and dont have an update function.
    Normally, the compiler helps you out by providing a dropdown list of functions an object has that you can choose from.
    Likewise, the compiler will have a dropdown list of all the different arguments (signatures) a function has.
    I dont think the generic function will provide this. As an end-user calling up a Hibernate function that you wrote, I want help from the compiler on what my options are. I don't want to dig into the Hibernate configuration file to determine weather update is allowed for a table or not.
    The downside of not using generics of course, is you have to write a DAO with CRUD functions for each and every table in the database (actually, for every graph, but lets not get into that).
    Also, I don't see an example of how the associations between tables is implemented in generics. For example, one to many relationships, etc. A developer may get bogged down trying to get generics to work for all those possiblies (then again, perhaps not, since I didn't try it).
    By the way, I don't see anything about generic DAO on the internet younger than 2 years old so I suspect it hasn't caught on.

  • How to create Insert & Update on master-detail form JPA/EJB 3.0

    Is there any demonstration or tips how to Insert record on master-details form for JPA/EJB 3.0 with ADF binding?

    I have master-detail forms (dept-emp). I drag the dept->operations->create method to JSF page. But when I click create button, only dept form is clear and ready for insert. But emp form is not clear. How can I add create method for this?
    Can you give some example how to pass the right object to the persist or merge method so that it can save both the two objects (master-detail tables)
    Thanks
    Edited by: user560557 on Oct 9, 2009 8:58 AM

  • How to get selected row from table(FacesCtrlHierBinding ).

    I'am trying to get selected row data from table:
    FacesCtrlHierBinding rowBinding = (FacesCtrlHierBinding) tab.getSelectedRow();
    Row rw = rowBinding.getRow();
    But import for oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding cannot be found from my JDev 11.
    What is correct package for FacesCtrlHierBinding?

    Hi, another problem.
    I fill table with data manualy from source:
    <af:table var="row" value="#{getCompanyData.com}"
    rowSelection="single" columnSelection="single"
    editingMode="clickToEdit"
    binding="#{getCompanyData.tab}"
    selectionListener="#{getCompanyData.GetSelectedCompany}">
    <af:column sortable="false" headerText="col1">
    <af:outputText value="#{row.id}"/>
    </af:column>
    <af:column sortable="false" headerText="col2">
    <af:outputText value="#{row.name}"/>
    </af:column>
    <af:column sortable="false" headerText="col3">
    <af:outputText value="#{row.phone}"/>
    </af:column>
    </af:table>
    and when I'am trying to use method to get selected row:
    RichTable table = this.getTab(); //get table bound to UI Table
    RowKeySet rowKeys = table.getSelectedRowKeys();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object selCompany = table.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) selCompany;
    row = rowData.getRow();
    I got an error:
    SEVERE: Server Exception during PPR, #1
    javax.el.ELException: java.lang.ClassCastException: data.COMPANY cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
    When I created tables by dragging data from date control, all worked fine.
    What could be a problem?

Maybe you are looking for