3 Replies Latest reply on Nov 6, 2011 12:38 PM by Udo

    How to configure database connection in apex listener

    yoman
      Hi

      I have the following installation at my system
      Oracle DB Express 10g
      Application Express 4.1

      Now I want the application developed in App Express to be accessible from other computers so I installed
      Apex Listener 1.1.2.131.15.23 in standalone mode (if this step itself was wrong, please inform)

      Now I need to establish database connection of listener with database, so I am entering these details

      Username: APEX_PUBLIC_USER
      password: <pwd>
      connection type: basic
      host : localhost
      port : 8080 (my App Ex runs on this port)
      SID : oraclexe (which is the default when installing the Oracle XE DB , I suppose) OR how can I find it?

      On pressing Apply, I get the following error

      Request could not be processed due to error
      IO Error: Got minus one from a read call.

      Please help me complete the steps to be able to access the Application from other computers.

      Regards
      Saurabh

      Edited by: Saurabh on Nov 4, 2011 4:41 PM
        • 1. Re: How to configure database connection in apex listener
          Udo
          Hi Saurabh,
          Now I want the application developed in App Express to be accessible from other computers so I installed
          Apex Listener 1.1.2.131.15.23 in standalone mode (if this step itself was wrong, please inform)
          You could use the most recent version, and if you plan to use the APEX Listener as web server for a productive deployment of your application, you should deploy it onto one of the supported JEE servers rather run it in standalone mode. For development and testing, this would be fine.
          Username: APEX_PUBLIC_USER
          password: <pwd>
          connection type: basic
          host : localhost
          port : 8080 (my App Ex runs on this port)
          SID : oraclexe (which is the default when installing the Oracle XE DB , I suppose) OR how can I find it?
          There are three mistakes here:
          1. You use Oracle XE, which actually runs APEX on port 8080 using the Embedded PL/SQL Gateway hosted by the database internal web server (XDB HTTP Server). You need to realize that the APEX Listener is an alternatative web server to that scenario. You can have both active, but you need to assign a non-standard port to either XDB HTTP Server or APEX Listener to make it work. As default, both services use port 8080.
          2. Port 8080 is, as you already found out, the port your APEX runs on. For the connection parameters the APEX Listener uses to access the APEX instance inside your database you need to enter the database port. The default for this would be 1521.
          3. The default SID for the Database XE is actually XE .

          So, to summarize it:
          - You don't need APEX Listener if you want to use the database internal web server, but it is usually a good decision to separate frontend from backend.
          - In that scenario, you need to change the port for either database internal web server or for APEX Listener. I'd disable the database internal web server if you don't need it otherwhise.
          - You need to configure port 1521 (or the one your database listener uses if not running on default) for the APEX Listener database connection.
          - Probably your SID is XE if you installed the database with all settings on default.

          -Udo
          1 person found this helpful
          • 2. Re: How to configure database connection in apex listener
            yoman
            Hi Udo,
            thanks a lot for your response and I did gain a new perspective from it. If you could, then please share a little more on it.
            You could use the most recent version, and if you plan to use the APEX Listener as web server for a productive deployment of your application, you should deploy it onto one of the supported JEE servers rather run it in standalone mode. For development and testing, this would be fine.
            I used that version coz it was latest when I downloaded it (some 2 mnths back).. Yes I want to deploy my application developed in Application Express on local intranet and dont know how to go about it exactly.
            There are three mistakes here:
            1. You use Oracle XE, which actually runs APEX on port 8080 using the Embedded PL/SQL Gateway hosted by the database internal web server (XDB HTTP Server). You need to realize that the APEX Listener is an alternatative web server to that scenario. You can have both active, but you need to assign a non-standard port to either XDB HTTP Server or APEX Listener to make it work. As default, both services use port 8080.
            Hmm.. I dint know that XDB HTTP Server is by default installed and can be used without the need of Apex Listener. But maybe I dont have port conflict as I ran Apex listener using the following from its Install guide

            java -Dapex.home=/tmp/apex -Dapex.images=/usr/local/apex/images -Dapex.port=8585 -Dapex.erase -jar <temp directory>/apex.war
            So, to summarize it:
            - You don't need APEX Listener if you want to use the database internal web server, but it is usually a good decision to separate frontend from backend.
            I want to keep both frontend and backend on same machine. Can I do it using Apex listener?
            • 3. Re: How to configure database connection in apex listener
              Udo
              Hi Saurabh,
              I want to deploy my application developed in Application Express on local intranet and dont know how to go about it exactly.
              In that case you should consider a full-featured JEE server. If you don't already have a (licensed) version of the supported JEE servers, you could also try you luck on an unsupported one. GlassFish has the Open Source Edition that is quite close to the Oracle GlassFish Server. Apache Tomcat is another alternative that is capable of hosting the APEX Listener.
              I dint know that XDB HTTP Server is by default installed and can be used without the need of Apex Listener.
              That's the way every XE makes its APEX available - all comes out of the box.
              But maybe I dont have port conflict as I ran Apex listener using the following from its Install guide
              java -Dapex.home=/tmp/apex -Dapex.images=/usr/local/apex/images -Dapex.port=8585 -Dapex.erase -jar <temp directory>/apex.war
              Right, you don't have a port conflict here. But note that if you use the erase option, you'll lose your configuration upon every startup. And I guess you should choose a different location for the*home* because +/tmp/apex+ might be cleaned up automatically and you start wondering why the APEX Listener suddenly stops working.
              I want to keep both frontend and backend on same machine. Can I do it using Apex listener?
              Sure, you can use any web server on the same machine as your database. I wouldn't recommend to do it for "public access", but it should be no problem in an intranet scenario.

              -Udo
              1 person found this helpful