How to add two different database connections on Model

Hi,
In my application, I need to create View Objects on different databases. So I need to add two different database connections on the Model.
But it seems like Model can be connected to only one database. I tried adding another project to add the second db connection. But after I created a read-only View Object in the second project, it didn't generate corresponding data control in the Data Controls panel.
Could anyone help me on this?
Thanks!

Do you mean adding the second project folder in ViewController->Project Properties->Libraries and Classpath?Yes, either that or: ViewController -> Project Properties -> Dependencies
And I didn't see the first Model project in the ViewController classpath. Otherwise it wouldn't work. The first model project IS in 'classpath'. Here's how:
ViewController -> Project Properties -> Dependencies
I tried this and recreated the View Object. Still didn't generate the datacontrol. No idea why you had to recreate the VO.
Is your VO in an application module inside the SECOND project?
After you are sure that everything is in the ViewController's classpath, just try restarting JDeveloper.
This is very basic. has to work.

Similar Messages

  • How to add two different page numbers in a single page

    How to add two different page numbers in a single page? One is for page number of the whole article, the other one is for page number for each chapter in the article.

    It's quite complicated, see
    Two Page Numbering Schemes in the Same Document.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • How to add two different images on photoshop cs5?

    I was learning about the layers and masks and i seen that i have to have two images under each others under the layer option pannel, i tried many times to add images but it always shows in two different pannels as the folloing image I want to add two different images in this pannel to make any changes i want
    Thank you.
    image

    When you click on that icon Photoshop will add a revail all white layer mask and it will be the Photoshop target. Begin painting with black over the image part you wish to hide. Should you paint away something you want change to white paint and paint it back. Lower the brush opacity to fade in and out the image part.
    If you use ALT+Click on that icon a hide all black layer mask will be added as the current taget and hide all of the layer paint with whits to show.

  • How to run two different databases on different ports?

    I just created a second database on my machine with SID=B on which there was already a database with SID=A.
    Currently, the listeners for both DB instances work on the same default port 1521. How can i configure my Oracle instances so that the listener for A remains on port 1521 and listener for B listens on port 1531? I am new to database stuff so this might be a dumb question. Apologies in advance!
    Jimit

    Jimit wrote:
    I want it because when i am trying to create an informatica repository on database B, i am getting the error
    TNS 12154 - could not resolve the connect identifier specified.
    And what research led you to believe that creating another listener was the solution?  With a 12154, the request never left the client process .. it never got to the listener for the listener configuration to even matter.
    see: http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/ (ora-12154 TNS:could not resolve the connect identifier specified)
    The Listener service for database B is up and running, i am able to connect to database B through cmd and the tnsnames.ora file also has the TNS entry for database B.
    See the many previous comments regarding multiple listeners or listeners "dedicated" to a specific database.
    When i try to create my Informatica repository on database A which i installed earlier, it succeeds, however i cannot use database A because of certain restrictions.
    And what are those "certain restrictions"?  How can someone help if you hide the parameters under which you are working?
    Since there is no difference in database A and B except the SID, and the user ids i am using to create the repository have same privileges, i could not think of any other option.
    I can think of another option.  "Work the error message".   If you would research ora-12154 (tns-12154) you would find it has nothing whatsoever to do with listeners.
    Hence, do you think i should go for different ports for both listeners? Maybe it can help.
    It won't help.  It will just make matters worse.

  • How to use two different database Drivers in one application ????

    I want to select datas in a result set of a query on a ms access database table and insert these into a mysql table of a mysql database in one application.
    Now my problem is that only on database driver is acceptet in the same application even it`s instanciatet in a completely different class !!!
    Here's the structure of my program:
    class one:
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    database += filename.trim() + ";DriverID=22;READONLY=false}";
    java.sql.Driver driver0=new sun.jdbc.odbc.JdbcOdbcDriver();
    DriverManager.registerDriver(driver0);
    DriverManager.getDriver(database);
    con2=DriverManager.getConnection(database,"","");
    DatabaseMetaData dmd2;
    dmd2=con2.getMetaData();
    stmt2=con2.createStatement();
    rs2=("SELECT (.........
    until here all values can be selected correctly from ms access
    class2.get_gas_id(fla_gas);
    Now I want to insert these values into mysql.
    By despair i created a second class with another jdbc-method:
    class2:
    public class gas_select{
    public static int fla_gas_id;
    public static void get_gas_id(String fla_gas)
    java.sql.Statement stmt3;
    java.sql.Connection con3;
    java.sql.ResultSet rs3;
    FileWriter fout1;
    try
    java.sql.Driver driver1=new org.gjt.mm.mysql.Driver();
    DriverManager.registerDriver(driver1);
    DriverManager.getDriver(config.db_rge_stoffe); ==>
    config.rge_stoffe="jdbc:mysql://192.168.10.101:3306/rge_stoffe?user=<user>";
    con3=DriverManager.getConnection(config.db_rge_stoffe);
    java.sql.DatabaseMetaData dmd3;
    dmd3=con3.getMetaData();
    stmt3=con3.createStatement();
    rs3=stmt3.executeQuery("SELECT (Nr) from tblgaseliste where Gasart like "+"\'"+fla_gas+"\'");
    while(rs3.next())
    fla_gas_id=rs3.getInt("Nr");
    fout1.write(fla_gas_id);
    stmt3.close();
    con3.close();
    fout1.close();
    There's no result and no error message. Idon't know what to do !
    Has anyone an idea ???
    Edited by: goberger on Mar 27, 2008 3:35 PM

    Hi!
    If I understand your problem correctly, you can create connections to as many databases as you want in one class. In one of my programs I have connection to 3 separate databases, but here is an example:
    Connection mysql_con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbmysql", "root", "12345");
    Connection pg_con    = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5433/dbpgsql", "postgres", "12345");Then from mysql_con and pg_con create PreparedStatement or Statement then load selections into ResultSet and then use getString() to get a basic String type result that you want and so update table from each database.
    HTH
    Victor.
    BTW Here I use port 5433 for PostgreSQL connection because I SSH tunnel it from 5432 to 5433
    Edited by: vic_sk on Mar 27, 2008 4:23 PM

  • How to add two different background images - left and right

    I want to get something like this

    The way I have done that is to create the right image as a full width image and then place the left hand image over top and stretch the image to the left hand side of the page.
    Use background images on boxes instead of page background. I have done something similiar in the header of this site:
    http://www.signalpointdining.ca

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • Different database connections

    Hi,
    I have a problem in an application with two different database connections.
    I divided it into three projects one is the model project for a mysql database, one I the model project for an mssql database and one is a jsf project.
    But I only can use the first database project I add to the jsf project.
    If I use the other SessionFacade he uses the wrong database driver.
    My question is, is it possible to access two different databases out of one project?
    Thanks,
    John

    Does anyone know how to do this?
    I need the same, but i couldn't find any documentation about it.
    Looking forward to hearing good news.....

  • Different database connections at runtime

    How can I change different database connections at runtime on the same Application Module ?
    I use BC4J as business layer and uiXml as presentation layer.

    Does anyone know how to do this?
    I need the same, but i couldn't find any documentation about it.
    Looking forward to hearing good news.....

  • Connecting to two different database instances from a swing application.

    Hi All,
    I am developing a swing application which needs to interact with two different database instances of two different weblogic servers.
    More eloborately,
    I have some data in DB_Instance1 running on[b] Weblogic_Server1 and I need to insert the same data into DB_instance2 running on Weblogic_server2. Is it possible. Could some explain me how to do that..
    Thanks in advance...
    Sreekanth.

    Hi Rick,
    Try logging onto both Server first. You'll have to use either 2 separate ODBC DSN's or 2 separate OLE DB connections. Set them both for Trusted Authentication, you'll have to configure that on the Server also.Then try your query.
    If that doesn't work then you'll have to create a Stored Procedure or View that can link the 2 Server side.
    Thank you
    Don

  • How to handle transactions when two different databases are involved.

    consider two tables namely Table-A and Table-B part of two different databases namely ORACLE and MYSQL.
    Now the project requirement is updating the Table-A(ORACLE) and Table-B (MYSQL) as one transaction. i.e. either update both the tables or rollback both the tables.
    Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.

    NareshAnkuskani wrote:
    Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.No, that is not true.
    But anyway, you need to use distributed (XA) transactions. i believe that the latest version (5.0) of mysql actually has support for XA transactions. you need to use a to setup a distributed transaction and attach the connections for the two databases to that transaction. then it should function as you desire.

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • Can I use two different database with DBSystemLoginModule?

    Finally I can login with Database user id by DBSystemLoginModule on Embedded oc4j server.
    But I confused between [b]jazn-data.xml and system-jazn-data.xml.
    Which xml do I have to edit for jdbcUrl and jdbcDriver?
    Now I would like to use two different database(such as only sid is different).
    In this case I want to show specific database name as realm name.
    What should I do?
    When I use DBSystemLoginModule, I edit JdbcUrl in system-jazn-data.xml.
    So can I pass the parameter for sid programmatically?
    And also I tried to run my application with other database with DBSystemLoginModule on Embedded oc4j server.
    I changed few things(jdbcUrl at system-jazn-data.xml,jazn-data.xml in embedded-oc4j-server/config and database connection for BusinessComponents at Project Properties of Model/ViewController.
    But I got some error.
    Did I miss something?
    ----< my error messgae >------
    500 Internal Server Error
    JBO-30003: The application pool (customer.model.datamodel.CMAppModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)     Message was edited by:
    Message was edited by:
    sdcsdc

    I think I understand now, you are modifing the custom login modules configuration within the system-jazn-data.xml file. This is a bit dangerous! Didn't you register the login module in your orion-application.xml? For example, this is the way I do it:
    <web-module id="customProv-web" path="customProv-web.war" />
    <persistence path="persistence" />
    <!--data-sources path="./data-sources.xml"/-->
    <security-role-mapping name="sr_developer">
    <group name="developers" />
    </security-role-mapping>
    <security-role-mapping name="sr_manager">
    <group name="managers" />
    </security-role-mapping>
    <jazn provider="XML">
    <property name="custom.loginmodule.provider" value="true"/>
    <property name="role.mapping.dynamic" value="true"/>
    <property name="role.compare.ignorecase" value="true"/>
    </jazn>
    <!-- Configuring a Login Module in an Application EAR file. -->
    <jazn-loginconfig>
    <application>
    <name>customProv</name>
    <login-modules>
    <login-module>
    <class>oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule</class>
    <control-flag>required</control-flag>
    <options>
    <option>
    <name>data_source_name</name>
    <value>jdbc/OracleDS2</value>
    </option>
    <option>
    <name>roles_fk_column</name>
    <value>userName</value>
    </option>
    <option>
    <name>table</name>
    <value>userinfo</value>
    </option>
    <option>
    <name>groupMembershipTableName</name>
    <value>groupinfo</value>
    </option>
    <option>
    <name>groupMembershipGroupFieldName</name>
    <value>role</value>
    </option>
    <option>
    <name>usernameField</name>
    <value>userName</value>
    </option>
    <option>
    <name>user_pk_column</name>
    <value>username</value>
    </option>
    <option>
    <name>passwordField</name>
    <value>passWord</value>
    </option>
    </options>
    </login-module>
    </login-modules>
    </application>
    </jazn-loginconfig>
    <log>
    <file path="application.log" />
    </log>
    <namespace-access>
    <read-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </read-access>
    <write-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </write-access>
    </namespace-access>
    </orion-application>

  • How to config the oracle database connection pool in IAS

    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

    Jacky,
    You need do the following for oracle type4 driver:
    1) register the driver:
    $IAS_HOME/bin/jdbcsetup
    Driver Identifier: Oracle_Type4_816 (whatever name you like)
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Driver Classpath: .../classes12.zip (install this this zip file somewhere
    and add this zip into the Classpath later).
    2) DataSource Setup:
    start iAS Administration Tool (iASAT)
    Choose Database, unfold iAS1 (your app server instance),
    choose External JDBC Datasource -> add: DataSource Registration
    JNDI Name: yourPoolName
    Driver Type: Oracle_Type4_816 (select what you just register)
    DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
    Username: your_user_name
    Password: your_passwd
    (Datasource Pool: using defaults for now): you can also customrize the
    parameters for the pool.
    3. Add classes12.zip into CLASSPATH.
    In your application, you can use JNDI lookup to get the DataSource from
    which you get the connection from the pool.
    Hope this helps.
    Good luck.
    Xuran
    "Jacky Yan" <[email protected]> wrote in message
    news:9m0tmp$[email protected]..
    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

  • Synch Between Tables in Two different Databases

    Synch between Two Tables in two different Databases.
    I have two identical tables, table T1 in Database D1 and table T1 in Database D2. User can insert/update/delete/select from both of these tables in respective databases. Being said that how can keep them in Synch? Any thing added/modified/deleted should reflect in other. We like this to be Real-Time.
    We are thinking of creating a cross (two way) DB link between them and then update/insert/delete both the tables when changing one. Any suggestions?
    Thanks

    One of my colleagues used snapshot in their previous projects, but he told me that the performance of it wind down while the records in tables increase. I have no idea about the exact situation, but I'm believing we'd think twice about it.
    eilison
    [email protected]

Maybe you are looking for

  • Help!! I'm having trouble with my battery. It won't charge.

    My macbook pro suddenly stopped charging. The light on the cord is green, but as soon as I unplug it it turns off and the battery in the top right corner says "battery is not charging". Please help!!

  • Javascript Menus not Working in version 2.0 per &SESSION. not interpreted

    Hi. <br> I had an application in HTMLDB 1.6 and I built javascript cascading menus using the syntax:<br> <\a href="http://myserver.com:7777/pls/htmldb/f?p=104:13:">Expense Accounts</a\> (backslashes added to prevent this from displaying as link) And

  • How to connect Java into BarTender Label Printing Software

    Hi, I have one problem, my company have bartender label printing software 32 bit version, previously they use VB6 for controlling the dublicate printing of lable,but the software is gone. Now i want to do this in Java, but i don't know how to connect

  • 10.4.5 Update Package fails to install

    Hello, I've downloaded the 10.4.5 update (MacOSXUpdCombo10.4.5PPC.pkg) but it won't install. It gives errors during the process, then asks to try again. I had this problem with the 10.4.4 update as well. I'm still at 10.4.3. I have never had problems

  • Reliable messaging between XI and BTS

    I came across this document describing how reliable messaging between XI and BTS can be implemented using the SOAP extensions. This document has been authored by - André Fischer, Project Manager CTSC, SAP AG - Matthias Allgaier, Consultant XI, SAP De