JSF/ADF/Toplink object from multiple schemas

We are considering starting a new project using JSF/ADF/Toplink using a already existent database.
How is it possible to create toplink object from tables when tables belongs to different schemas?
I think there must be a way to do this and in jdeveloper forum suggested me to post the question here.
Thank you very much.
Michele

Michele,
When you are in the wizard where it lets you select the tables you can select one schema and query and select your tables. Then you can switch schemas and query and select additional tables.
When using TopLink this way you will most likely need the SQL generated qith schema qualified tables. To do this go to the map (under TopLink node) and edit its defaults tab and check the option 'Qualify Table Names with Schema Name".
Doug

Similar Messages

  • Oracle JDeveloper 10.1.3 Toplink Objects from Table Bug.

    i try this with updates and without them.
    toplink bug or toplink Wizzard Bug: I have create a conection to data base(MySQL) I use mysql-connector and everything works... i see the tables then i try to create "TOplink objects from Table " , choose connection ,for Schema i choose "none". When i choose AutoQuerry it shows the columns i add columns , I choose OK. When it ask for a name for the package i give him mypackage, when it ask for class name i also choose my package.Users(the table is Users) after which i have the following exception in MessageBox:
    "oracle.jdeveloper.cm.ds.db.InvalidNameException : Object must have a name."
    on details i get :
    oracle.toplink.addin.mappingcreation.MWProjectCreationException: oracle.jdeveloper.cm.ds.db.InvalidNameException: Object must have a name.
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.generateMappedDescriptorsForTables(MappingCreatorImpl.java:277)
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.generateMappedDescriptorsForTables(MappingCreatorImpl.java:196)
         at oracle.toplink.addin.wizard.jobgeneration.JobWizard$1.construct(JobWizard.java:416)
         at oracle.ide.util.SwingWorker$1.run(SwingWorker.java:119)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.jdeveloper.cm.ds.db.InvalidNameException: Object must have a name.
         at oracle.jdeveloper.cm.ds.db.validators.AbstractValidator.validateName(AbstractValidator.java:54)
         at oracle.jdeveloper.offlinedb.validators.OfflineSchemaValidator.validateName(OfflineSchemaValidator.java:29)
         at oracle.jdeveloper.cm.ds.db.validators.AbstractValidator.validateObject(AbstractValidator.java:187)
         at oracle.jdeveloper.cm.ds.db.validators.AbstractValidator.validateObject(AbstractValidator.java:122)
         at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider.validateObject(AbstractDBObjectProvider.java:822)
         at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider.validateSchema(AbstractDBObjectProvider.java:858)
         at oracle.jdeveloper.offlinedb.OfflineDBObjectProvider.createSchema(OfflineDBObjectProvider.java:1954)
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.updateOfflineDBandMWDatabaseWithTablesToMap(MappingCreatorImpl.java:450)
         at oracle.toplink.addin.mappingcreation.MappingCreatorImpl.generateMappedDescriptorsForTables(MappingCreatorImpl.java:242)
         ... 4 more
    in the messege log i get :
    Starting Java object generation...
    Creating offline database objects...
    A problem was encountered creating offline database objects.
    Aborted Java object generation.
    Message was edited by:
    JOKe
    Message was edited by:
    JOKe

    I have tried this out in the EA release of JDev, and have reproduced the problem you reported. However, trying out the latest development build, the problem does not occur, so this bug has been fixed. You'll pick up this fix when we next release the software on OTN.

  • Accessing the same object from multiple classes.

    For the life of me I can't workout how I can access things from classes that haven't created them.
    I don't want to have to use "new" multiple times in seperate classes as that would erase manipulated values.
    I want to be able to access and manipulate an array of objects from multiple classes without resetting the array object values. How do I create a new object then be able to use it from all classes rather than re-creating it?
    Also I need my GUI to recognize the changes my buttons are making to data and reload itself so they show up.
    All help is good help!
    regards,
    Luke Grainger

    As long as you have a headquarters it shouldn't be to painfull. You simply keep a refrence to your ShipDataBase and Arsenal and all your irrellevant stuff in Headquarters. So the start of your Headquarters class would look something like:
    public class Headquarters{
      public Arsenal arsenal;
      public ShipDatabase db;
    //constructor
      public Headquarters(){
        arsenal = new Arsenal(this, ....);
        db = new ShipDatabase(...);
    //The Arsenal class:
    public class Arsenal{
      public Headquarter hq;
      public Arsenal(Headquarter hq, ....){
        this.hq = hq;
        .Then in your ShipDatabase you should, as good programing goes, keep the arraylist as a private class variable, and then make simple public methods to access it. Methods like getShipList(), addToShipList(Ship ship)....
    So when you want to add a ship from arsenal you write:
    hq.db.addToShipList(ship);
    .Or you could of course use a more direct refrence:
    ShipDatabase db = hq.db;
    or even
    ShipList = hq.db.getShipList();
    but this requires that the shiplist in the DB is kept public....
    Hope it was comprehensive enough, and that I answered what you where wondering.
    Sjur
    PS: Initialise the array is what you do right here:
    //constructor
    shipList = new Ship[6];
    shipList[0] = new Ship("Sentry", 15, 10, "Scout");
    " " " "etc
    shipList[5] = new Ship("Sentry", 15, 10, "Scout");PPS: To make code snippets etc. more readable please read this article:
    http://forum.java.sun.com/faq.jsp#messageformat

  • Cant view objects from another schemas

    Hi everybody!
    I have a 10.1.2 Jdeveloper and a 9.2.4 Oracle database.
    I successfully created a database connection.
    With provided login I can access to tables from another schemas in SQL Worksheet, but I cant see any objects from those schemas in the connection tree.
    What's wrong?

    The Schemas are being filtered so that you only automatically see the schema for the connection that you logged on with. To change the schemas that are visible you need to :
    1) Select the connection name in the Navigator (you should see that it has a filter icon overlaid showing that it is being filtered)
    2) Invoke the context menu and select 'Apply filters'
    3) Shuttle over the other Schemas you wish to see and press OK
    Regards,
    Lisa Sherriff
    JDev QA

  • Moving objects from one schema to another

    Hi,
    again as part of my learning exercise, I was trying to move objects from a schema in 10GR2 to 11GR2 database.
    I am able to use exp and imp commands to achieve this objective -
    On source database -
    $> exp userid=scott/tiger owner=(schemaname) file=data.dmp statistics=none
    Copied the dump file on target server and then
    $> imp userid=scott/tiger file=data.dmp fromuser=uname touser=scott
    And this works fine.
    What I am not able to understand is how I can achieve this by using datapump instead?
    Your help is much appreciated.
    Thanks.

    Thanks.
    Worked perfectly.
    This is what I did (in case someone is in my position)-
    On source database-
    expdp scott/tiger schemas=<source schema>directory=DATA_PUMP_DIR dumpfile=data.dmp job_name=some_job
    Copied dump file to target server.
    On target database-
    $> impdp scott/tiger directory=DATA_PUMP_DIR dumpfile=data.dmp remap_schema=<source schema>:<target schema> job_name=imp_kob

  • Is there a way to access object from other schema?

    1. Is there a way to access object from other schema
    Without using synonym/public synonym without prefixing schema owner?
    2. If you do not see any object in all_objects by same name owned by connected user or public, can there still be objects hidden from this view? for instance synonyms created by SYSTEM
    TIA for help

    Well, you missed something somewhere. If there is no
    ALTER SESSION SET CURRENT_SCHEMA=whoeverthen there must be either public synonym for the object as this shows:
    SQL> CREATE USER a identified by a;
    User created.
    SQL> GRANT CREATE SESSION to a;
    Grant succeeded.
    SQL> CREATE USER b identified by b;
    User created.
    SQL> GRANT CREATE SESSION, CREATE PROCEDURE, CREATE PUBLIC SYNONYM to b;
    Grant succeeded.
    SQL> connect b/b
    Connected.
    SQL> CREATE PACKAGE test AS
      2     PROCEDURE testit;
      3  END;
      4  /
    Package created.
    SQL> CREATE PACKAGE BODY test AS
      2  PROCEDURE testit IS
      3  BEGIN
      4     NULL;
      5  END;
      6  END;
      7  /
    Package body created.
    SQL> connect a/a
    Connected.
    SQL> desc b.test
    ERROR:
    ORA-04043: object b.test does not exist
    SQL> connect b/b
    Connected.
    SQL> GRANT EXECUTE ON test TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc b.test;
    PROCEDURE TESTIT
    SQL> desc test;
    ERROR:
    ORA-04043: object test does not exist
    SQL> connect b/b
    Connected.
    SQL> CREATE PUBLIC SYNONYM test FOR TEST;
    Synonym created.
    SQL> connect a/a
    Connected.
    SQL> desc test
    PROCEDURE TESTITAnother possibility without public synonyms is that crv had granted the other user privileges on some object, and the other user creates a private synonym for that. When crv granted privileges on a different object with the same name, the private synonym became valid again. Something like:
    SQL> connect /
    Connected.
    SQL> drop public synonym test;
    Synonym dropped.
    SQL> GRANT CREATE SYNONYM TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    ERROR:
    ORA-04043: object test does not exist
    SQL> desc b.test
    PROCEDURE TESTIT
    SQL> CREATE SYNONYM test FOR b.test;
    Synonym created.
    SQL> desc test;
    PROCEDURE TESTIT
    SQL> connect b/b
    Connected.
    SQL> REVOKE EXECUTE ON test FROM a;
    Revoke succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    ERROR:
    ORA-04043: object "B"."TEST" does not exist
    SQL> desc b.test
    ERROR:
    ORA-04043: object b.test does not exist
    SQL> connect b/b
    Connected.
    SQL> DROP PACKAGE test;
    Package dropped.
    SQL> CREATE FUNCTION test (p_num IN NUMBER) RETURN NUMBER AS
      2  BEGIN
      3     RETURN p_num * 10;
      4  END;
      5  /
    Function created.
    SQL> GRANT EXECUTE ON test TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> desc test;
    FUNCTION test RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_NUM                          NUMBER                  INSo, I would go looking for the synonyms.
    TTFN
    John

  • How do I select from multiple schema's

    How do I select from multiple schema's
    Tried:
    SELECT * FROM schema1.table1, schema2.table2
    WHERE schema1.table1.column1 = schema2.table2.column2;
    Errored......

    Thanks
    We finally got in touch with our DBA and he said the same thing.
    SELECT t1.*,
    t2.*
    FROM schema1.table1 t1,
    schema2.table2 t2
    WHERE t1.column1 = t2.column2;
    I'll try it afther I finish a task my boss just gave me.
    BRB then.

  • SELECT from multiple schema's

    How do I select/insert/update/delete from multiple schema's.
    Tried:
    SELECT * FROM schema1.table1, schema2.table2
    WHERE schema1.table1.column1 = schema2.table2.column2;
    Errored......

    Hello
    you need to use an alias for each table
    tylerd@UAT51> select dual.dummy from dual, dual
      2  /
    select dual.dummy from dual, dual
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    tylerd@UAT51> select dual_1.dummy,dual_2.dummy from dual dual_1, dual dual_2
      2  /
    D D
    X X
    1 row selected.

  • How to suppress compiler errors without excluding database objects from the "Schema Compare" tool (using VS2013/SSDT)

    Hi,
    In short: How to suppress compiler errors without excluding the object from the "Schema Compare" tool ??
    A bit longer:
    We have a SQL Server 2008 project in Visual Studio 2013 running SQL Server Data Tool.
    An old database, with a lot of history in, has been imported into SSDT and there are many syntax errors preventing the project from compiling/running. An typical error is: "SQL70001: This statement is not recognized in this context".
    Running the "faulty" scripts on the server, executes just fine. I understand that there are syntax errors and they should be rewritten, but it's not gonna happen just like that - it is a slow process over a long period of time.
    I know it is possible to change Build Action to None, but that also exclude the object from appearing in the Schema Compare function/window.
    So - how to ignore some compiler errors and still having the objects to appear when doing "Schema Compare" ??
    Thank you in advance.

    Hi Steven,
    Thanks for your comments.
    Well, it sure does help in the future, but right now i would prefer the other way - to suppress some errors and still allow the scripts to build.
    The thing is that if we "rewrite" the objects into create scripts, then we have a huge test job ahead of us + the database environments (PROD vs DEV and UAT) does not share the same AD or DB users and therefore grants is lost if dropping/creating
    objects, right!
    If you drop a object before creating it, the drop will also drop the roles and grants and since they don't share user table, the create will not be able to add the permissions again. There might be a solution to that, but it is going to be very complicated
    for some newbies like us. We need something we can trust.
    BR
    Peter

  • Struts/ADF/Toplink conversion from 10.1.2 to 10.1.3

    Hi. We have a J2EE application based on Struts/ADF/Toplink.
    We just let the JDeveloper migrate the whole application itself.
    We solved a few minor problems, but now we have the greater one:
    - we have in domain classes some getX...(), setX...() methods, intended for example
    for getting attributes of nested objects or for conversion from String to Date.
    In older version, when you had some getXSomeAtr() method in domain class, the attribute
    XSomeAttr was automatically generated into Data Control.
    In newer version it's not! If you want the attribute to be in data control, you must
    have an private attribute XSomeAtr declared in domain class.
    Example - we have these attibutes (first two has their own getters and setters and are
    mapped in toplink, the third is unmapped)
         private Date datum;
    private String nazev;
    private String XDatumAsDate;
    and methods
    public String getXDatumAsDate() {
    return OurUtils.dateToStringAsDate(getDatum());
    public void setXDatumAsDate(String datum) throws ParseException{
    Date d = OurUtils.StringToDateAsDate(datum);
    setDatum(d);
    And the form look like this
    <html:text property="XDatumAsDate" .../>
    <html:text property="nazev"     .../>
    Reading is ok, but attempt to modify date in input field ends with
    "JBO-35009: Setting attribute for XDatumAsDate in object methodRSICollection failed"
    Are we doing something wrong ? We just need to have the date entering under our control and
    be able to enter dates in various formats.
    Thanks in advance for any comments.

    I compared the both old and new data control xml files and found the difference. The previous attribute descriptor has IsUpdateable="true" but the new has IsUpdateable="0".
    Manually changing won't help - data control generation of any class regenerates all data controls and puts back IsUpdateable="0". I'm stuck now.

  • View objects from different Schema from Web Object Browser

    I am logged in as dba and try to view the tables of another schema.
    However in the object browser I can only select my own schema.
    This happens with whatever user I use.
    From sqlplus I can access or create tables for another schema without any problems.
    Is this not supported or am I doing something wrong?
    Thanks for the help.

    Can you assign multiple schemas to a workspace in the XE version of HTML DB?
    I haven't found where to do it.
    Is it not possible because there aren't really workspaces in this version?

  • How can I drop the java objects from a schema

    hi..good afternoon all...
    How can I drop the java objects from a database schema???
    suppose the credentials are scott/tiger@db1
    Another thing is that...I have to do this from cmd(command prompt) as there is no plsql developer or sqldeveloper installed in the machine.
    plss help...thanks in advance...

    hi...i have already tried all the options..but it is showing the error..
    ora:01435 - user does not exist
    but when i have given the command...
    select object type, object_name, status from user_objects where object_type like'%JAVA%';
    then it is showing that the java_object is present....
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    SQL>
    SQL>
    SQL> set linesize 200
    SQL>
    SQL>
    SQL>
    SQL> select object_type, object_name, status from user_objects where object_type
    like '%JAVA%';
    OBJECT_TYPE OBJECT_NAME
    STATUS
    JAVA CLASS javaclass1
    VALID
    JAVA SOURCE javaclass1
    VALID
    SQL> drop java source javaclass1.java;
    drop java source javaclass1.java
    ERROR at line 1:
    ORA-01435: user does not exist
    SQL>

  • To find Missing DB Objects from one schema,sid to other schema,sid

    Hi Friends..
    I have an requirement as bellow...
    Recently we migrated from one schema to other ,some of the DB objects are missed while migrating.
    After Migration now the schema and SID are Different for newly created schema
    while comparing the newly created schema2 with old schema1 found that some of the DB objects are missed.
    So i need to find out the difference's from Schema1 to Schema2.
    But now schema 2 is having different sid and schema name and to make the changes in schema2 with respect to schema1.
    Please let me know how to go ahead with this....
    Thanks in advance...

    Hi,
    Here's one way:
    SELECT     object_name
    ,     object_type
    FROM     all_objects
    WHERE     owner     = 'SCHEMA1'     -- Case-sensitive
        MINUS
    SELECT     object_name
    ,     object_type
    FROM     all_objects
    WHERE     owner     = 'SCHEMA2'     -- Case-sensitive
    ;Use a database link for one half of the MINUS, if necessary.
    This will not detect objects that have the same name and type, but are different. For example, if both schemas have a table called TABLE_X, the query above will not display TABLE_X, even if the two tables have different rows and/or columns.

  • Help in writing  query few schema objects  from another schema.

    Hi Gurus,
    Could some one help in writing an sql which will give list of all the object of a schema "genp" visible in another schema "genp_v" and "gen_con" there is an dblink and few grants on those schemas .
    i dont have the password of any of those users i have connected as sys and i can not change the password of any of those users..
    Any help on this is highly apprciated.
    Thanks in advance .

    could you please update me for all the objects apart from just the tables .
    thank you so much .. it was just out of my head at that moment .
    cheers

  • Modeling tables with objects from Sys Schema

    I want to model some tables that have Object Columns of type AnyData.
    Problem is I can't model them in Designer without screwing up generation.
    If I create an AnyData object in Designer it gets created in my Schema and the table points to that AnyData instead of the Sys.AnyData.
    How can this be resolved?

    I have above mention script utlrp.sql many times it is going into loop and unable to compile below 6 objects
    select owner,object_name ,count(*) from dba_objects where status='INVALID' Group by owner,object_name
    OWNER OBJECT_NAME COUNT(*)
    SYS DBMS_IJOB 1
    SYS DBMS_DEFER 1
    SYS DEFLOB 1
    PUBLIC DEFLOB 1
    SYS DBMS_DEFER_SYS 1
    SYS DBMS_DEFER_SYS_PART1 1
    6 rows select
    Kindly check above invalid objects. I am unable to copile.
    **Kindly tell me the procedure how can I compile manually**.
    Regards.
    Muzafar

Maybe you are looking for