14 Replies Latest reply: Oct 1, 2013 3:31 PM by JChRase RSS

    Setting up Multiple Databases with Apex Listener

    patfmnd
      Hi,
      We have successfully installed Apex 2.1 listener with 1 database and now are trying to connect a 2nd. We are having trouble figuring out how to get the 2nd database Workspace Admin set up? We are using Weblogic 11g as our app server and on Oracle 11.2.0.2.

      Someone posted that you should initially use a 'dummy' database set up. We would appreciate any other pointers as to how to get Apex to point to the 'correct' database for the workspace set ups. Is there an added directory in the URL path to the correct workspace?

      Thanks,
      Pat
        • 1. Re: Setting up Multiple Databases with Apex Listener
          user11254565
          Hi Pat,

          I was struggling to have the first APEX Listener on Weblogic with APEX 4.2 setup. Then planning to have multiple database setup. Now, you are one step ahead of me. Would you be my help? Have you have the second database configured to the Listener yet?

          Thanks a lot,
          Julie
          • 2. Re: Setting up Multiple Databases with Apex Listener
            patfmnd
            Hi, Julie,
            Yes we have succeeded at connecting a 2nd database. Let me get back to you on how we configured the Apex Listener on Weblogic. It took some trial and error configuring the apex.war file but eventually got it configured correctly. Our Weblogic sys engineer was very persistent and got it working. Unfortunately he is out till Friday so I will post back with our configuration next week.

            Pat
            • 3. Re: Setting up Multiple Databases with Apex Listener
              DavideR
              Hi,

              I've the same problem to setting up a second database with Listener 2.0.
              I followed what the manual says:
              a) java -jar apex.war setup --database test
              b) java -jar apex.war map-url --type base-path /test test

              but when I tried to use the url:

              http://www.example.com:7001/apex/test

              I obtain this message: 404 - Not Found

              Any suggestions are appreciated...
              THanks,

              Davide
              • 4. Re: Setting up Multiple Databases with Apex Listener
                Colm Divilly
                DavideR wrote:
                Hi,

                I've the same problem to setting up a second database with Listener 2.0.
                I followed what the manual says:
                a) java -jar apex.war setup --database test
                b) java -jar apex.war map-url --type base-path /test test

                but when I tried to use the url:

                http://www.example.com:7001/apex/test

                I obtain this message: 404 - Not Found
                what happens for:
                http://www.example.com:7001/apex/test/
                Note the trailing slash
                • 5. Re: Setting up Multiple Databases with Apex Listener
                  patfmnd
                  Hi,
                  Our web logic engineer is off again, but I did find this info:

                  ‘java –jar apex.war map-url –type base-path –workspace-id /ancl ancl_db‘
                  Where no workspaces have been defined yet.

                  AND

                  ‘java –jar apex.war map-url –type base-path –workspace-id hr_example /bnr bnr_db ‘

                  I think the /bnr and the /ancl become the paths to the respective apex sites as in:

                  https://wls.nd.edu/apex/ancl/f?p
                  https://wls.nd.edu/apex/bnr/hr_example/ (for webservices)
                  https://wls.nd.edu/apex/bnr/f?p (for applications)

                  The configuration that was done by the engineer is working great for us. We are also successfully producing RESTful web service from our ERP ('bnr') then consuming on our Ancillary DB application ('ancl').

                  If there are other configuration details you would like to see, let me know and I will have our engineer send copies of our config.

                  Pat
                  • 6. Re: Setting up Multiple Databases with Apex Listener
                    DavideR
                    Hi,

                    I tried with http://www.example.com:7001/apex/test/ but I have this error page:

                    Error 500--Internal Server Error

                    java.lang.IllegalArgumentException: XMLStreamReader may not be null
                         at weblogic.xml.stax.XMLEventReaderBase.(XMLEventReaderBase.java:43)
                         at weblogic.xml.stax.XMLEventReaderBase.(XMLEventReaderBase.java:34)
                         at weblogic.xml.stax.XMLStreamInputFactory.createXMLEventReader(XMLStreamInputFactory.java:98)
                         at weblogic.xml.stax.XMLStreamInputFactory.createXMLEventReader(XMLStreamInputFactory.java:114)
                         at oracle.dbtools.common.x3p.impl.StAXEventIterator.read(StAXEventIterator.java:116)
                         at oracle.dbtools.common.x3p.impl.StAXEventIterator.(StAXEventIterator.java:41)
                         at oracle.dbtools.common.x3p.impl.X3PFactoryImpl.newReader(X3PFactoryImpl.java:42)
                         at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:135)
                         at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:116)
                         at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:124)

                    Thanks,
                    Davide
                    • 7. Re: Setting up Multiple Databases with Apex Listener
                      Colm Divilly
                      DavideR wrote:
                      Hi,

                      I tried with http://www.example.com:7001/apex/test/ but I have this error page:

                      Error 500--Internal Server Error

                      java.lang.IllegalArgumentException: XMLStreamReader may not be null
                           at weblogic.xml.stax.XMLEventReaderBase.(XMLEventReaderBase.java:43)
                           at weblogic.xml.stax.XMLEventReaderBase.(XMLEventReaderBase.java:34)
                           at weblogic.xml.stax.XMLStreamInputFactory.createXMLEventReader(XMLStreamInputFactory.java:98)
                           at weblogic.xml.stax.XMLStreamInputFactory.createXMLEventReader(XMLStreamInputFactory.java:114)
                           at oracle.dbtools.common.x3p.impl.StAXEventIterator.read(StAXEventIterator.java:116)
                           at oracle.dbtools.common.x3p.impl.StAXEventIterator.(StAXEventIterator.java:41)
                           at oracle.dbtools.common.x3p.impl.X3PFactoryImpl.newReader(X3PFactoryImpl.java:42)
                           at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:135)
                           at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:116)
                           at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:124)

                      Thanks,
                      Davide
                      Can you provide the full stack trace, that looks truncated, can you also provide your url-mapping.xml so I can try to reproduce?
                      • 8. Re: Setting up Multiple Databases with Apex Listener
                        DavideR
                        This is the complete trace of the error page using the url ( http://www.example.com:7001/apex/test/):

                        Error 500--Internal Server Error

                        java.lang.IllegalArgumentException: XMLStreamReader may not be null
                             at weblogic.xml.stax.XMLEventReaderBase.(XMLEventReaderBase.java:43)
                             at weblogic.xml.stax.XMLEventReaderBase.(XMLEventReaderBase.java:34)
                             at weblogic.xml.stax.XMLStreamInputFactory.createXMLEventReader(XMLStreamInputFactory.java:98)
                             at weblogic.xml.stax.XMLStreamInputFactory.createXMLEventReader(XMLStreamInputFactory.java:114)
                             at oracle.dbtools.common.x3p.impl.StAXEventIterator.read(StAXEventIterator.java:116)
                             at oracle.dbtools.common.x3p.impl.StAXEventIterator.(StAXEventIterator.java:41)
                             at oracle.dbtools.common.x3p.impl.X3PFactoryImpl.newReader(X3PFactoryImpl.java:42)
                             at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:135)
                             at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:116)
                             at oracle.dbtools.common.x3p.X3PFactory.newReader(X3PFactory.java:124)
                             at oracle.dbtools.common.config.db.UrlMappings$Builder.read(UrlMappings.java:168)
                             at oracle.dbtools.common.config.db.UrlMappings.existing(UrlMappings.java:99)
                             at oracle.dbtools.common.config.db.UrlMappings.urlMappings(UrlMappings.java:93)
                             at oracle.dbtools.common.config.db.DatabasePoolConfig.loadFromXML(DatabasePoolConfig.java:280)
                             at oracle.dbtools.common.config.db.DatabasePoolConfig.loadFromDBFromTime(DatabasePoolConfig.java:170)
                             at oracle.dbtools.common.config.db.DatabasePoolConfig.loadFromDB(DatabasePoolConfig.java:132)
                             at oracle.dbtools.common.config.db.DatabasePoolConfig.getPoolInfo(DatabasePoolConfig.java:58)
                             at oracle.dbtools.rt.jdbc.DatabaseConnectionFilter.poolInfo(DatabaseConnectionFilter.java:88)
                             at oracle.dbtools.rt.jdbc.DatabaseConnectionFilter.applyDatabaseConnectionInfo(DatabaseConnectionFilter.java:133)
                             at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:120)
                             at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
                             at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
                             at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
                             at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
                             at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
                             at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
                             at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                             at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
                             at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
                             at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
                             at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
                             at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
                             at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
                             at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
                             at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                             at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)


                        This is the content of url-mapping.xml

                        <?xml version="1.0" encoding="UTF-8"?>
                        <pool-config xmlns="http://xmlns.oracle.com/apex/pool-config">
                        <pool base-path="/test" name="test" updated="2013-05-02T15:10:50.938Z"/>
                        </pool-config>
                        • 9. Re: Setting up Multiple Databases with Apex Listener
                          Colm Divilly
                          Hi Davide,
                          can you provide your weblogic version, java version (is it an Oracle JDK or other), os version?

                          Thanks,
                          Colm
                          • 10. Re: Setting up Multiple Databases with Apex Listener
                            Colm Divilly
                            Hi Davide,
                            thank you for your problem report, I have reproduced this issue and filed BUG:16758176 to track it. It will be addressed in the next patch release of Listener. It would still be useful to know your exact weblogic, jdk and os versions.

                            Colm
                            • 11. Re: Setting up Multiple Databases with Apex Listener
                              DavideR
                              Hi Colm,

                              these are all the versions:
                              . weblogic -> 12.1.1
                              . OS -> IBM AIX 6.1
                              . JDK
                              java version "1.6.0"
                              Java(TM) SE Runtime Environment (build pap6460sr9ifix-20110211_02(SR9+IZ94423))
                              IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr9-20101124_69295 (JIT enabled, AOT enabled)
                              J9VM - 20101124_069295
                              JIT - r9_20101028_17488ifx2
                              GC - 20101027_AA)
                              JCL - 20110211_02
                              . Listener 2.0.1

                              In the meantime are there any workaround to solve my problem?

                              Thanks,

                              Davide
                              • 12. Re: Setting up Multiple Databases with Apex Listener
                                Colm Divilly
                                Hi Davide,
                                there is no workaround, short of not attempting to map additional databases until the next patch release of Listener is shipped. I cannot comment on timelines for product releases, but we are focused on addressing issues as quickly as possible.

                                Thanks for your patience,
                                Colm
                                • 13. Re: Setting up Multiple Databases with Apex Listener
                                  DavideR
                                  Hi Colm,

                                  I just installed the new version of apex listener (2.0.2) and now everything works correctly with multi databases....

                                  Thanks a lot!!!

                                  Davide
                                  • 14. Re: Setting up Multiple Databases with Apex Listener
                                    JChRase

                                    Dear,

                                     

                                    I get similar problem with following configuration:

                                     

                                    Ubuntu 12.04

                                    Oracle SE 11g (11.2.0.3) for the first db and Oracle Express Ed 11g for the second db (xe)

                                    Weblogic 12c (12.1.1)

                                    Apex Listener 2.0.3

                                     

                                    I configured the additional db successfully running java -jar apex.war setup  --database xe 

                                     

                                    Then I created 'Url Routing' running java -jar apex.war map-url --type base-path /f?p=200:1 xe

                                     

                                    The complete url is http://www.xxx.com:port/apex/f?p=200:1 (we use Apache functionnalities to rewrite rules),  I tried also with the complete URL without success.

                                     

                                    I restart Weblogic.

                                     

                                    The Apex application is still connecting to the first database.

                                     

                                    Why ?

                                     

                                    Regards,