This discussion is archived
5 Replies Latest reply: Nov 4, 2012 8:08 AM by timfox-Enkitec RSS

Multiple Database Connections with Apex Listener 2.0

timfox-Enkitec Newbie
Currently Being Moderated
I have managed to make the Apex Listener 2.0 work in both Standalone Mode as well as deploying in Glassfish. I have been trying to get the multiple database connection feature working but I'm seeing some odd results:

When I started the process, my configdir was set to /u01/app/oracle/product/apex/apex. The last directory is added during the configuration process.

I then added a new database connection using : java -jar apex.war setup --database <dbname>.  This seemed to work.

When I tried setting up URL mapping using any of the three methods mentioned in the help, I see the files I expected <dbname.xml>, but they show up in a new directory. The configuration process adds a /apex to the configdir each time I run the map-url configuration. So after adding one database / map-url configuration, my configdir now looks like this:

/u01/app/oracle/product/apex/apex/apex. The last /apex directory contains a default.xml and a url-mapping.xml, but navigating to the mapped url results in a 404 error.

Is this feature working for anyone yet?

Thanks
  • 1. Re: Multiple Database Connections with Apex Listener 2.0
    685473 Newbie
    Currently Being Moderated
    Hello Tim,

    I am facing the same 404 problem.

    Today I have installed APEX listener 2.0.0.268.17.04 as standalone listener.
    APEX is running under http://localhost:8082/apex

    Then I configured an URL mapping. The url-mapping.xml looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <pool-config xmlns="http://xmlns.oracle.com/apex/pool-config">
    <pool base-path="/test4" name="apex" workspace-id="arranje"/>
    </pool-config>

    If I try in the browser the URL http://localhost:8082/apex/test4, it sadly enough raises the 404 - Not found error.

    So I activated the options debug.debugger and debug.printDebugToScreen in the default.xml.
    The browser now shows:

    Oracle Application Express Listener
    404 - Not found
    No candidate found for: GET test4
    test4 not found

    (test4 is the base-path I configured)

    The command-box where the standalone listener is started, is not showing any extra debug information.

    Regards,

    Mathieu
  • 2. Re: Multiple Database Connections with Apex Listener 2.0
    734505 Newbie
    Currently Being Moderated
    I have the same experience. I can connect to the database of the inital setup but then I try to create a second DB connection with

    Create the connection

    java -jar apex.war setup --database edwdev1
    Sep 28, 2012 5:08:04 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /space/sw/oracle/products/apex/2.0.0/config/apex
    Enter the name of the database server [localhost]:ddb001-v.maximusbchealth.local
    Enter the database listen port [1521]:1521
    Enter 1 to specify the database service name, or 2 to specify the database SID [1]:1
    Enter the database service name:apex_edwdev1.maximusbc.ca
    Enter the database user name [APEX_PUBLIC_USER]:APEX_PUBLIC_USER
    Enter the database password for APEX_PUBLIC_USER:
    Confirm password:
    Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:3
    Sep 28, 2012 5:10:12 PM oracle.dbtools.common.config.file.ConfigurationFiles update
    INFO: Updated configurations: apex_al, apex_rt, apex, edwdev1, edwdev1_al, edwdev1_rt

    Then I create a routing based on theRequest Path Prefix:

    java -jar apex.war map-url --type base-path /edwdev1 edwdev1
    Sep 28, 2012 5:12:32 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /space/sw/oracle/products/apex/2.0.0/config/apex
    oracle@vs-dapp041:/sw/oracle/products/apex/2.0.0$

    Everything seems fine but when I try to access the second db I get:

    http://vs-dapp041.maximusbchealth.local:7501/apex/edwdev1 => 404 not found

    I am going to be at Open World next week and see if I can talk so someone at the apex stand there.
  • 3. Re: Multiple Database Connections with Apex Listener 2.0
    734505 Newbie
    Currently Being Moderated
    I found a solution that works for me but don't ask my why.
    When you run

    java -jar apex.war setup --database abc

    you will get a file <config_dir>/apex/conf/abc.xml. If I compare that with the inital config file ( <config_dir>/apex/conf/apex.xml)
    I can see that a lot of properties are missing in the new file. The new file only has db.password, db.servicename, db.username and db.hostname. In comparison the
    apex.xml file has about 43 properties. So I:

    cd <config_dir>/apex/conf/
    cp abc.xml abc.xml.old
    cp apex.xml abc.xml
    vi abc.xml
    => overwrite the db.password, db.servicename, db.username and db.hostname properties in the new abc.xml with the values from the back up abc.xml.old
    Restart the Managed Server through the Weblogic Server Console.

    I have done this in two environment and it has worked in both. I hope this will work for you.
    rene

    Edited by: user12004044 on Oct 11, 2012 10:13 PM

    Edited by: user12004044 on Oct 11, 2012 10:13 PM
  • 4. Re: Multiple Database Connections with Apex Listener 2.0
    patfmnd Newbie
    Currently Being Moderated
    Hi,
    In order for the apex listener to connect to a 2nd database, do you need to install Apex in that database as well?

    Thanks,
    Pat
  • 5. Re: Multiple Database Connections with Apex Listener 2.0
    timfox-Enkitec Newbie
    Currently Being Moderated
    Yep. The Apex Listener with Multiple Database Connections lets you consolidate the connection point so you don't need a separate web server or web application for each Apex install. The database you point to still needs to have the Apex schemas installed in it.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points