3 Replies Latest reply on May 26, 2011 9:22 AM by Udo

    APEX Listener standalone Problem with web.xml

    user1116015
      Hello everyone,

      I hope somebody can help me with my apex_listener installation. Ive installed an 11gr2 Testsystem, removed APEX 3 (with apxremov.sql) and succesful installed APEX 4. Now I try to set up the connection to APEX in the Database with the new APEX-Listener.

      When I start my apex listener in the standalone Mode everything seems to work fine - no errors and the Listener is up, but when i open my browser and try to connect to the listenerConfigure page i get no response by the Listener - dont get me wrong, there is no html error it seems like an neverending redirect. (Firefox says Redirecterror, IE is constantly loading).

      There is also one INFO of the Listenerouput which could be the Problem:

      INFO: Not a valid WebApp, will be ignored : path=/oracle/system/inf/db11202/apex_standalone/apex/WEB-INF/web.xml

      Ive made no changes to the web.xml, so im a bit clueless...

      Any ideas?

      Of Course hear is the contet of the web.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4"
           xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
           <display-name>ApexMod</display-name>

      <!--
           <context-param>
                <param-name>config.dir</param-name>
                <param-value>${java.io.tmpdir}/APEX</param-value>
           </context-param>
      -->
           <context-param>
                <param-name>version</param-name>
                <param-value>1.1.2.131.15.23</param-value>
           </context-param>
           
           <listener>
                <listener-class>oracle.dbtools.rt.web.SCListener</listener-class>
           </listener>

           <servlet>
                <description>
                </description>
                <display-name>HttpEndPoint</display-name>
                <servlet-name>HttpEndPoint</servlet-name>
                <servlet-class>oracle.dbtools.rt.web.HttpEndpoint</servlet-class>
           </servlet>

           <servlet-mapping>
                <servlet-name>HttpEndPoint</servlet-name>
                <url-pattern>/*</url-pattern>
           </servlet-mapping>
           <servlet>
                <description>
                </description>
                <display-name>Config</display-name>
                <servlet-name>Config</servlet-name>
                <servlet-class>oracle.dbtools.apex.config.Config</servlet-class>
           </servlet>

           <servlet-mapping>
                <servlet-name>Config</servlet-name>
                <url-pattern>/Config</url-pattern>
           </servlet-mapping>
           <servlet>
                <description>
                </description>
                <display-name>Admin</display-name>
                <servlet-name>Admin</servlet-name>
                <servlet-class>oracle.dbtools.apex.admin.Admin</servlet-class>
           </servlet>

           <servlet-mapping>
                <servlet-name>Admin</servlet-name>
                <url-pattern>/Admin</url-pattern>
           </servlet-mapping>

           <servlet-mapping>
                <servlet-name>Admin</servlet-name>
                <url-pattern>/listenerAdmin</url-pattern>
           </servlet-mapping>

           <servlet-mapping>
                <servlet-name>Admin</servlet-name>
                <url-pattern>/listenerConfigure</url-pattern>
           </servlet-mapping>

           <servlet-mapping>
                <servlet-name>Admin</servlet-name>
                <url-pattern>/listenerStatus</url-pattern>
           </servlet-mapping>

           <servlet>
                <description>
                </description>
                <display-name>Forbidden</display-name>
                <servlet-name>Forbidden</servlet-name>
                <servlet-class>oracle.dbtools.apex.Forbidden</servlet-class>
           </servlet>

           <servlet-mapping>
                <servlet-name>Forbidden</servlet-name>
                <url-pattern>/____embedded/*</url-pattern>
           </servlet-mapping>

           <welcome-file-list>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>default.html</welcome-file>
                <welcome-file>default.htm</welcome-file>
                <welcome-file>default.jsp</welcome-file>
           </welcome-file-list>

           <security-constraint>
                <web-resource-collection>
                     <web-resource-name>APEX Listener Administration</web-resource-name>
                     <url-pattern>/listenerAdmin</url-pattern>
                     <http-method>GET</http-method>
                     <http-method>POST</http-method>
                </web-resource-collection>
                <auth-constraint>
                     <!-- NOTE: This role is not present in the default users file -->
                     <role-name>Admin</role-name>
                </auth-constraint>
           </security-constraint>

           <security-constraint>
                <web-resource-collection>
                     <web-resource-name>APEX Resource Templates</web-resource-name>
                     <url-pattern>/resourceTemplates/*</url-pattern>
                     <http-method>GET</http-method>
                </web-resource-collection>
                <auth-constraint>
                     <!-- NOTE: This role is not present in the default users file -->
                     <role-name>Admin</role-name>
                </auth-constraint>
           </security-constraint>

           <security-constraint>
                <web-resource-collection>
                     <web-resource-name>APEX Resource Templates</web-resource-name>
                     <url-pattern>/_/*</url-pattern>
                     <http-method>GET</http-method>
                     <http-method>PUT</http-method>
                     <http-method>POST</http-method>
                     <http-method>DELETE</http-method>
                </web-resource-collection>
                <auth-constraint>
                     <!-- NOTE: This role is not present in the default users file -->
                     <role-name>Admin</role-name>
                </auth-constraint>
           </security-constraint>

           <security-constraint>
                <web-resource-collection>
                     <web-resource-name>APEX Listener Status</web-resource-name>
                     <url-pattern>/listenerStatus</url-pattern>
                     <http-method>GET</http-method>
                </web-resource-collection>
                <auth-constraint>
                     <!-- NOTE: This role is not present in the default users file -->
                     <role-name>Manager</role-name>
                </auth-constraint>
           </security-constraint>

           <login-config>
                <auth-method>BASIC</auth-method>
                <realm-name>APEX</realm-name>
           </login-config>

           <security-role>
                <description>The role that is required to log in to the APEX Listener Administration</description>
                <role-name>Admin</role-name>
           </security-role>

           <security-role>
                <description>The role that is required to log in to the APEX Listener Status</description>
                <role-name>Manager</role-name>
           </security-role>

      </web-app>
        • 1. Re: APEX Listener standalone Problem with web.xml
          Udo
          Hello,

          do you have the Listener on the same machine that also runs your database? By default, both APEX Listener in standalone mode and the Embedded PL/SQL Gateway (EPG) use port 8080. The EPG is activated as web server for APEX in 11gR2 after a default installation concerning APEX. Since you removed the old APEX version before installing APEX 4 I assume you've made such a default installation. The APEX Listener would be an alternative for the EPG in that case.
          But you have to ensure you don't get a port conflict: You can either stop the EPG, or reconfigure any of the two web servers to use a different port, if you want to run them parallel.
          To change the port used by the APEX Listener in standalone mode, you simply add another parameter to the startup: -Dapex.port=8888 and you're done.
          To change the port used by the EPG, connect as sys and run the following
          EXEC DBMS_XDB.SETHTTPPORT(8888);
          COMMIT;
          If you want to disable the EPG, simply set the port to 0.

          Another reason could be insufficient access privileges on the directory used to extract the standalone instance to at startup. Could you check if the user that starts the Listener has read/write permissions on that folder and there is no quota/disk full issue in place?

          -Udo
          • 2. Re: APEX Listener standalone Problem with web.xml
            user1116015
            Hello Udo,

            thank you for your response. At first there are no port conflicts (ive tried many different and also changed the port of the epg), I also changed the -Dapex.home paramter to the $ORACLE_HOME directory and the User has all the permissions (read/write) - no effect so far. Enough disk space is also available. I think the ports are not the problem, because the APEX_LISTENER is running with the port i choosed but it is redirecting me endlessly within the browser - not to the listener config page or apex page, but it is up and running.

            Do you have to be root to run the listener?

            Also the EPG doesnt work properly. I tried the alternative: Embbed PL/SQL Gateway as well (like in the documentation) But when I change the port of the EPG (XDB) by using the command (tried that countless times with serveral portnumbers)

            EXEC DBMS_XDB.SETHTTPPORT(8888);
            COMMIT;

            the host is not reachable by the url http://<machine_name>:8888. As far as I know: if you change the port with the command above you should be able get any response by that machine... but it doesnt work.
            Although SELECT dbms_xdb.gethttpport from dual; returns 8888.

            At the moment i have an oracle 11gr2 DB with a valid Installation of oracle APEX 4.0 but I cant work with it.
            I think the last Option is to install the Oracle HTTP Server and use mod_plsql?

            -Christian
            • 3. Re: APEX Listener standalone Problem with web.xml
              Udo
              Hello Christian,
              Do you have to be root to run the listener?
              No, I can run it without problem as unprivileged user.
              The only problem you can encounter is a firewall policy. You may have to add a rule to allow incoming connections on that port as root (or other privileged user, e.g. via sudo).
              Also the EPG doesnt work properly. [...]
              the host is not reachable by the url http://<machine_name>:8888
              This should be http://<hostname>:8888/apex as the EPG has no contents in the default docroot.

              Thinking of this - which is the actual URL you typed when starting listenerConfigure?
              It should be http://<hostname>:8080/apex/listenerConfigure in the default scenario.
              I think the last Option is to install the Oracle HTTP Server and use mod_plsql?
              I don't think OHS will work better. Possibly you have a firewall issue if using the proper URL for both EPG and APEX Listener doesn't work.

              -Udo