Problem creating java objects in DB tables with numbers in their name.

I use JDeveloper 11.1.1.0.2 to create toplink pojo to database Oracle 11 g. Many of the tables have numbers in their names. When I create java objects to tables, for some reason any all numbers are abandoned on the names. If a table with the name T1_TRANS creates a java object named TTrans instead of T1Trans. The numbers are also abandoned as well domain names.

I have previously built pojo for this database with JDeveloper10.1.2.X and have never experienced this problem. All the class and property names can be changed by hand, of course, but with the number of tables in this database that would be very time consuming.

Is there a setting somewhere that I'm missing? Any help would be greatly appreciated. Thank you.

Hello

This is a bug that the numeric values in table names must be included in the generated class names. We have addressed this issue and the fix should be available in the next major release of JDev. In step 5 of Tables Wizard Java objects, you can rename the default class for each table names before the generation. This approach is little if all goes well-less bulky that rename classes after generation. However, there is no best solution for workaround. Let me know if I can provide you with additional information.

Thank you, John

Tags: Fusion Middleware

Similar Questions

  • Problems of creating Java object in JBoss environment

    We are migrating our application from one Oracle/IIS environment to a MySql/JBoss one and most of the things have been properly converted.

    However a Java object that is called from a page of the CF is not be created. I've looked everywhere and can't find no logging a problem. I see the classpath in the CF settings. The class runs as expected if called from the command line.

    Any ideas as to what to try or where to look for clues?

    Sorry for the late reply, thanks for the suggestions.

    The answer (for me) was to put the .jar files in the directory /cfusion.war/WEB-INF/lib rather than /cfusion.war/WEB_INF/cfusion/lib (which are listed in the class path). What makes this particularly annoying, it's that when you preview of CF settings there is no indication that my pot is in the class path. Well, it works.

  • Problem in inserting records into a table (MS Access) where the name of the column against

    I have a table with the name of column say first #Name and when I insert a value in the table it gives an error and it does not let me insert some values which he... Is it possible to enter the value in this column by fleeing this hash. I have a constraint that I can not change the name of the column...

    If it was Oracle you would put quotes around the name of the column. Not sure if happens the same for MS Access, because I do not play with the toy databases.

    for example

    Insert into tablename ("First#Name") values ('Fred');
    
  • Create the object on the table of the default user space only

    Hi all

    Is any way I can limit a user to create tables rather THAN on the system tablespace, not counting that change the quota 0 on system M user?

    Can I restrict a user to create objects only on its own default tablespace?
    change the quota user 0 M on < all other tablespaces except default user >?

    Thank you.

    Hello

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> create user ann identified by "ann" account unlock;
    
    User created.
    
    SQL> grant CREATE SESSION to ann;
    
    Grant succeeded.
    
    SQL> grant CREATE TABLE to ann ;
    
    Grant succeeded.
    
    SQL> conn ann/ann
    Connected.
    SQL> create table t1 (col1 int);
    
    Table created.
    
    SQL> create table t2 (col1 int) tablespace system;
    
    Table created.
    
    SQL> select TABLE_NAME, TABLESPACE_NAME from user_tables;
    
    TABLE_NAME                     TABLESPACE_NAME
    ------------------------------ ------------------------------
    T1                             USERS
    T2                             SYSTEM
    
    SQL> select * from session_privs;
    
    PRIVILEGE
    ----------------------------------------
    CREATE SESSION
    CREATE TABLE
    
    SQL> show user
    USER is "ANN"
    SQL> insert into t1 values (1);
    insert into t1 values (1)
                *
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'USERS'
    
    SQL> insert into t2 values (1);
    insert into t2 values (1)
                *
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'SYSTEM'
    
    SQL> alter user ann quota 10m on users;
    
    User altered.
    
    SQL> select * from DBA_TS_QUOTAS
      2  where tablespace_name='USERS';
    
    TABLESPACE_NAME                USERNAME                            BYTES
    ------------------------------ ------------------------------ ----------
     MAX_BYTES     BLOCKS MAX_BLOCKS DRO
    ---------- ---------- ---------- ---
    USERS                          ANN                                     0
      10485760          0       1280 NO
    
    SQL> insert into t1 values (1);
    
    1 row created.
    
    SQL> insert into t2 values (1);
    insert into t2 values (1)
                *
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'SYSTEM'
    

    Oracle - possibility to create a segment, perhaps with option different option of creations of segment. You can not insert in the segment until you have the opportunity on the tablespace. I hope that you understood.

    Note: try to provide the version number of oracle's four-digit

    -Pavan Kumar N

    Published by: pounet on March 14, 2011 12:34

    Published by: pounet on March 14, 2011 12:36

  • Problem when adding new column on table with report form

    Hello

    I have a form on table (either emp) with report(select_empno,ename,job_from_emp).i have insert, update, delete operations on the table.

    Now I added a new column DOB for alteration report emp.i sql query to show the new column altered report.i insert process (Block anonymous plsql) to insert this column too all by creating a new row.but the problem is with update.i am not able to find how to upgrade this new column while doing the update to line level.

    pls let me know if you can give some ideas on this.


    Kind regards
    CK

    Well, sorry for sounding terse.

    I have a few questions.

    Have you added the item to the form page and associated with the database column?
    You use your own PL/SQL page process to update or do you use the 'row emp process' process produced auto?
    If it's your own please send the code with the word {noformat}

    {noformat} (with the curly brackets and in lower case) above and below it. Your code should be formatted like this once you've hit post message:
    

    BEGIN

    NULL;

    END;

    Cheers
    
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    
  • How to create a form on a table with 3 columns for a PK

    Hi all

    We have a table that has 3 columns that make up the primary key and I want to create a form based on this table; Let us on the 'create form Page' it is only 2 options that identifies the first and second columns of PK.

    Is there a way I could add the third column PK.

    Kind regards
    Mel

    Mel:

    I don't think you can use the form wizard to create the form for you in this case. You can create the form manually or modify the table to have a new column that will act as a substitute PK for the table. This column can be filled from a sequence and must have a Unique key limited defined against it.

    CITY

  • Two constraints of primary key of a table with two different constraint name

    Hi guys

    I am creating the table below

    Table name: TITLE_COPY

    Column name Copy_id Title_id Status

    Key type

    PKPK, FK
    UniqueNN, UNN, UNN
    CheckAvailable, destroyed, leased, reserved
    Table Ref FKTitle
    FK Ref ColTitle_id
    Data typeNumberNumberVarchar2
    Length101015

    The SQL statement below can create it

    CREATE TABLE title_copy (copy_id NUMBER (10),)

    title_id CONSTRAINT NUMBER (10) title_copy_title_id_fk title (title_id) REFERENCES.

    primary key constraint title_copy_title_id_pk title_id (copy_id)

    status VARCHAR2 (15) NOT NULL CONSTRAINT status_ck CHECK (status IN ('AVAILABLE', 'DESTROYED', 'RENTAL', 'RESERVED'))

    );

    Two primary keys (title_id, copy_id) are created with the same name of constraint (title_copy_title_id_pk) (-> table-level constraint). What happens if I want to have two different names of the primary key constraint, say title_copy_title_id_pk for the title_id column and title_copy_copy_id_pk for the copy_id column?

    I can do that with a column-level constraint? Something like below (complains about the additional primary key)

    CREATE TABLE title_copy (copy_id NUMBER (10) CONSTRAINT title_copy_copy_id_pk PRIMARY KEY,)

    constraint title_copy_title_id_pk primary key (title_id).

    title_id CONSTRAINT NUMBER (10) title_copy_title_id_fk title (title_id) REFERENCES.

    status VARCHAR2 (15) NOT NULL CONSTRAINT status_ck CHECK (status IN ('AVAILABLE', 'DESTROYED', 'RENTAL', 'RESERVED'))

    );

    In summary, I can define two primary keys with the name of different constraint in a column-level constraint?

    There are no two primary keys. There is a primary key made up of two columns - also called a composite key.

    A table can have at least a primary key. You can, if you wish, create a unique constraint on a different set of columns.

  • HashMap.hashCode () for the hash table with keys matching their values

    Hello

    I found something strange with Hashmaps:

    in the following code:

    HashMap < integer, whole > m1 = new HashMap < integer, whole > ();
    HashMap < integer, whole > m2 = new HashMap < integer, whole > ();
    M1.put (1,1);
    M1.put (2.2);

    M2.put (2.2);
    M2.put (1,1);
    M2.put (5.5);

    System.out.println (M1. Equals (m2));
    System.out.println (M1.hashCode ());
    System.out.println (m2.hashCode ());


    The result is:
    0
    0
    fake

    It seems that when a HashMap receives if key-value pairs the key = its hashCode value becomes 0!
    I'm sure that I did not just fall on a bug in Collections so could someone please explain to me why this happens?

    PS: If you're wondering why the hell would someone do such a Hashmap, I found it useful in the following situations:

    class MyCount {}
    int count;
    The name of the string;
    int age;

    MyCount (String name, int age) {}
    myIdName = name;
    This.Age = age;
    Count = 0;
    }

    void add (int c) {}
    Count += c;
    }

    public int hashCode() {}
    return 31 * age + name.hashCode ();
    }
    }

    Class MyCountClusterer {}
    Collection < MyCount > cluster (counts MyCount []) {}
    < MyCount, MyCount > HashMap countMap = new HashMap < MyCount, MyCount > ();
    for (MyCount c: account) {}
    MyCount CHP = countMap.get (c);
    If (mapC == null) {}
    CHP = new MyCount (c.name, c.age);
    countMap.put (c, c);
    }
    mapC.add (c.count);
    }
    Return countMap.values ();
    }
    }

    It is an unfortunate result of the way in which HashEntry.hashCode () is defined.

    In your case I remove the class MyCount count and change the value to an AtomicInteger.

  • Multiple tables with the same field name

    Hi, I have a query that pulls a field named 'Total' from 20 different tables (week1 - semaine20). When I try to view the results as #Week1.Total #, for example, I get an error saying that Total is not defined in week1. I also tried totalHours.Week1.Total (totalHours is the name of my request), but get the same thing - Week1.Total is not defined in totalHours. Help, please! Thank you!

    Alias your colunms...

    SELECT
    request.ID, request. FirstName, request. LastName,
    Request.SEM, request.year, request.banner,
    Week1.id AS wk1_ID, Week1.Total AS wk1_total,
    Week2.id AS wk2_ID, Week2.Total AS wk2_total,
    Week3.id AS wk3_ID, Week3.Total AS wk3_total,
    Week4.id AS wk4_ID AS Week4.Total wk4_total...
    ... etc.

    They will now have different names in the output. (The table name prefix that is used in your query on each column is never displayed in the output.)

    Phil

  • Create a table with one column '&amp; '.

    Hi all

    I need to create a column on my table with the character &. I try this way:

    SQL > CREATE TABLE 'CRIMIS_CARGA '. "" TM_EXCEL_CONSEN ".
    2 (NUMBER OF 'LINEA',
    3 'ID_INSTITUCION & ASSOCIATE' VARCHAR2 (510 char));

    but I can't because that ASD sqlplus to associate value...

    The ideas people?

    Kind regards
    dbajug

    set the escape ' \'

    Oracle@test > CREATE TABLE 'TM_EXCEL_CONSEN '.
    2 (NUMBER OF 'LINEA',
    3 VARCHAR2 (100)) 'ID_INSTITUCION\ & ASSOCIATE;

    Table created.

    Oracle@test > desc 'TM_EXCEL_CONSEN '.
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    NUMBER OF LINEA
    VARCHAR2 (100) ID_INSTITUCION & ASSOCIATE

  • How to insert a Java object in MySQL using ColdFusion

    Hello world

    I looked everywhere on the Internet better that I can try to find the answer. Still no results yet. I found a code to see how to insert a pure Java MySQL using Java object. It goes like this: first you establish a connection with the MySQL database by using the Connection object. Then, you use PreparedStatement object to prepare the sql statement. Then, you call its executeUpdate() method. Fact! That's how it's done in Java. But I'm trying to see if I can do it directly in ColdFusion. Say that I already have a Java object, including implemens Serializable interface myJavaOjbect. I want to insert in the java_objects_t table, which contains a column of type BLOB, called my_java_data. Then, in ColdFusoin, I try to do this:

    < name cfquery = "insertJavaObject" dataSource = "#Application.ds #" >

    INSERT INTO java_objects_t (my_java_data) values (#myJavaObject #)

    < / cfquery >

    This query does not work because #myJavaObject # prove to be a String object, because it automatically calls the toString() method.

    Is it possible to insert a Java object into the table of MySQL database within the ColdFusion page? Or I have to use pure Java to do this?

    Thanks for the help, everyone!

    Use CFQueryParam, you should be already. Job done. POW pow pow.

  • How to name tables with variables (strings and integers)

    If I have berries in the program as

    M1, M2, M3, M4, M5,..., M20. And if I want to choose one of them at random, I have a way to loop in which there is a loop of research for the index number that is found in a table as M1 [1] = 1, M2 [1] = 2 and if I have a random number between 1 and 20, I can loop element tables [1].

    But y at - it another way with directly get the random matrix buy name. For example, I have the random number 14, which directs me to M14. How the name of the table to help me choose the M14 when I number 14...

    It is not clear why you need to do it this way, in particular there is no information on what values are other elements of the paintings.

    In general, there are several ways:

    1. you can have a table 2D - in this way, you need to separate tables and your first random number will choose the first dimension.

    2. you can place your berries in another table:

    var arrayOfArrays:Array = [M1, M2, M3,...];

    And extract them with random number. This is similar to the way 1 because you end up with table 2D anyway.

    3. you can create an object that has properties with the numbers and the values of these properties will be your berries:

    var arrayReferences:Object = {}

    A1: M1,.

    A2: M2.

    ....

    }

    Then you can get the berries with integer like this:

    trace (arrayReferences ["a" + 2]);

    Other means will involve several approaches to OBJECT-oriented programming.

    The last note, everything in AS3 is zero base (especially tables), so you better stick to it even in your naming conventions: M0, M1, etc...

  • How to access info child movieclip to an object in a table?

    Hello

    I created a whole bunch of clips dynamically.

    I gave a name based on a variable number to each item:

    MC. Name = "mc" + i;

    I also use addChild to add some dynamic text fields to each movieClip and named myText1 myText2.

    Then I push each movieClip object in a table:

    myArray.push (mc);

    When I have the movieClips addChild, they display fine, complete with each textField.  And if I use the following loop to find the name of each element of the array, I get:

    for (var i = 0; i < myArray.length; i ++)

    {

    trace (myArray [i]. (Name)

    }

    output:

    MC1

    MC2

    MC3

    MC4

    etc.

    What I want now is to be able to access text fields in each movieclip in the table.  However, I get errors when I try in different ways.  For example:

    for (var i = 0; i < myArray.length; i ++)

    {

    trace (myArray [i].myText1.Text);

    }

    gives error: a term is undefined and has no properties.

    How to access the values and the content of the children of the movieClip objects that are stored in the tables?

    Thank you

    Shaun

    For some reason, dynamically added children cannot be targeted like that.  If you have added the textfields dynamically, you may need to use the getChildByName() target.  It depends in part on how you created and whether or not you have direct access to them.  Aside from that, you can also assign the textfields to the variables that you create for the mc and target those who by their names of variables.

    These two approaches demos the following:

    var mc:MovieClip = new MovieClip();
    addChild (mc);

    var tf:TextField = new TextField();
    TF. Text = "this is the text";
    mc.addChild (tf);

    first way

    TF. Name = "tfield."
    trace (TextField (MC.getChildByName ("TField")). (Text);

    second way

    MC.tfid = tf;
    trace (MC.tfid.Text);

    You can also store the textfields in the tables are created and they have direct access to them with the need to target the mc... the index must be the same as the one you use for the mc anyway.

  • 'CREATE JAVA' error: ORA-29506: derived from the USING clause invalid query

    Hello

    I created a table with the following attributes:

    name varchar2 (200);
    LOB_DATA blob


    I loaded a java source file in the lob_data blob.

    I then called the SQL:

    create or replace and compile the java source named "RemoteCommand" using blob
    Select lob_data from str_blob_table where name = 'RemoteCommand.java ';

    and I get the error:

    ORA-29506: invalid query from the USING clause
    ORA-00936: lack of expression
    29506 00000 - "query invalid derived from USING clause.
    * Cause: The USING clause does not form a valid query.
    * Action: Correct the USING clause.



    If I simply copy and paste the query part of the USING clause:

    Select lob_data from str_blob_table where name = 'RemoteCommand.java ';

    I get a valid result in SQLDeveloper.


    Any thoughts on what is happening here?

    A few notes:
    1. it is a 8i database.
    2. it works very well on a 9i database, but according to the SQL reference for 8i, it should work as well.

    Thank you
    Brent

    Try to delete "select" in the USING clause, that is to say change the SELECT BLOB SUPPORT... for BLOB to HELP... The original form of the syntax of JAVA to CREATE did not expect the SELECT token must be explicitly provided. Somewhere between 8i and 9i the parser was changed to try the provided text as well as what, with SELECT prefixed. So a CREATE JAVA statement you tried working in 9i but in 8i fails because SELECT would always be added before you try using the clause as a query, resulting a SELECT duplicate token.

  • How to build a list or a table with fixed values?

    Is it possible to create a list or a table with fixed values, but with a variable length?

    for example:

    var columns = "name, age, function;

    var insertParams = generateList ( listLen (columns), ',','.) » ); *

    fact: insertParams = ',?,??


    * (this function does not exist. This is just to illustrate what I need)

    I know that this feature is easily created by creating a loop, but I was wondering if it was possible with a single line of code.

    Thank you

    If he can generate a table in the same way, which would be as well.

    Our messages have clashed. But I think that repeatString() would do the trick. You could cut the rear comma with left() or convert it to a table. By default, ListToArray() will silently ignore the trailing comma.

Maybe you are looking for

  • No matter what I can not import bookmarks from Safari 5.1

    I tried exporting bookmarks in Safari under html, remove all Tags and Tags. I tried simply "import data from another browser. Nothing I try works. Are there any other title tags I need to delete?

  • Skype frozen when I press the button "call"!

    Hello! Yesterday I installed the program Amd Gaming Evolved.This told me: you need to upgrade your driver, so I did. After that, I tried to call someone on Skype, and then my PC froze. I tried to press ctrl + alt + del but nothing.

  • Secuencial copy job on ix2?

    Hello Is it possible to program an ix2 copy tasks so that they execute in sequence? Currently, I copy several jobs scheduled to run every day at pre-defined but hours does the ammout of information to copy can vary the time required for backup, so I

  • Vista - Error Code: 800F082F (could not install KB974571)

    Strangely, this update is indicated as having been installed successfully on 19/06/2010. However, he was offered again on 09/07/2010 but cannot install. Patches installed search doesn't find it, and it's much too tedious to visually search among hund

  • Giving copies of OEM CD away

    Someone I know just got a free obsolete computer they're working that apparently wasn't going to be scrapped, but was offered to employees. Hard drive of the computer had been a DoD cleaning and had no BONES. However, the computer had a sticker of CA