7 Replies Latest reply on Aug 2, 2011 4:48 AM by 715920

    After XDB errors, cannot get into APEX workspace

    715920
      Dear all,
      for some reason, I don't know why, I got XBD error when try to login:
      A user name and password are being requested by http://localhost.com:8080. The site says: "XDB"
      Then I unlocked anonymous user schema, and renewed its password. It brought me to Apex login page but with no image (just text). However I couldn't logged in into the workspace.

      So I thought that something was corrupted even though I had worked before and I had not changed anything from that point.

      So I did this chained of attempts:
      1. Unlocked and renewed password XBD account
      2. Unlocked and renewed password APEX_040000 account
      3. Executed @apex_epg_config.sql $ORACLE_HOME
      4. Explicitly specified the image location when executing ./apex.war listener

      But none of the attempt fixed the problem. Has anybody had this problem before? What is the cause? How can I fix this? Please help...

      Regards,
      Val

      Edited by: Valerie Debonair on Aug 1, 2011 2:56 AM
        • 1. Re: After XDB errors, cannot get into APEX workspace
          Udo
          Hello Val,

          note that there's a difference between using the EPG and using APEX Listener. Both are web servers to host an APEX instance, but actually both are independent services. If you use EPG, you have to load the APEX images into the XDB as well. This is usually done when calling /apex_epg_config.sql/ , but I'm not sure if you set your ORACLE_HOME to the directory you unzipped the APEX install package to.
          Also make sure you unlocked the ANONYMOUS database user, which is used by the EPG. (see [url http://download.oracle.com/docs/cd/E17556_01/doc/install.40/e15513/otn_install.htm#CHDEIGGI]APEX Installation Guide)

          Anyway, you shouldn't start both APEX Listener and EPG (XDB HTTP Server) on the same port, as you'll have a port conflict then. Either change the port for the APEX Listener or the port for the XDB HTTP Server.

          For APEX Listener, you can add the parameter apex.port=<newport> to the startup, e.g.
          java -Dapex.port=8081 -jar apex.war
          For EPG you can run
          exec dbms_xdb.sethttpport(8081);
          commit;
          If all this is setup correctly without conflicts, you should be able to run EPG and APEX Listener next to each other.

          -Udo
          • 2. Re: After XDB errors, cannot get into APEX workspace
            715920
            Hi Udo,
            thanks for the reply. Now that you mentioned about EPG, I didn't realize that the error was related to it. But my configuration is strictly Apex Listener and Apex without EPG. I don't understand why I got such error in the first place.

            Furthermore, I don't have EPG running, just Listener, but the workspace login shell still doesn't have the image and I cannot log into it.

            Please advice.
            • 3. Re: After XDB errors, cannot get into APEX workspace
              715920
              OK,
              I restarted the listener with different port, 8081, in this case, and now it worked without problem. For some weird reason, 8080 was taken by I don't know what.....

              Thanks for the help, you're great!
              • 4. Re: After XDB errors, cannot get into APEX workspace
                Udo
                For some weird reason, 8080 was taken by I don't know what.....
                On most instances, the XDB HTTP Server is enabled by default, so I guess that's the service using port 8080 on your system. You currently should be able to use EPG, as you performed the configuration steps listed in your above, at least when calling from local host.
                You can disable the EPG by setting the port to "0" using the same statement I posted to change the port.
                If that doesn't help, you could run netstat -noab to see all services running on your system and search for port 8080 in the output.

                -Udo
                1 person found this helpful
                • 5. Re: After XDB errors, cannot get into APEX workspace
                  715920
                  hmm,
                  I ignorantly executed
                  1. Unlocked and renewed password XBD account
                  2. Unlocked and renewed password APEX_040000 account
                  3. Executed @apex_epg_config.sql $ORACLE_HOME
                  without knowing their consequences. I intended to configure APEX with APEX listener only without EPG, I did the steps following instruction from other site how to fix XBD error without knowing what it was.

                  How can I reverse the apex_epg_config.sql and totally remove EPG configuration? I didn't intend to do this.....
                  • 6. Re: After XDB errors, cannot get into APEX workspace
                    Udo
                    Well, that's not too easy. You can of course easily lock the accounts you've unlocked and disable the XDB HTTP Server as mentioned before.
                    You can also delete the images you've loaded into the XDB and the DAD-configuration with the following block (extracted from the APEX uninstall script)
                    declare
                        cfg XMLType;
                    begin
                        if dbms_xdb.existsresource('/i/') then
                          dbms_xdb.deleteresource('/i/',4);
                        end if;
                    
                        if dbms_xdb.existsresource('/images/') then
                          dbms_xdb.deleteresource('/images/',4);
                        end if;
                    
                        dbms_epg.drop_dad('APEX');
                    
                        cfg := dbms_xdb.cfg_get();
                    
                        if cfg.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings/servlet-mapping/servlet-name[text()="PublishedContentServlet"]') = 1 then
                            cfg := cfg.deleteXML('/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-mappings/servlet-mapping/servlet-name[text()="PublishedContentServlet"]/..');
                        end if;
                    
                        if cfg.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet/servlet-name[text()="PublishedContentServlet"]') = 1 then
                            cfg := cfg.deleteXML('/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-list/servlet/servlet-name[text()="PublishedContentServlet"]/..');
                        end if;
                    
                        dbms_xdb.cfg_update(cfg);
                        commit;
                        dbms_xdb.cfg_refresh;
                    
                    end;
                    /
                    On the other hand, it might be a good idea to have the EPG as a kind of fallback solution...

                    -Udo
                    1 person found this helpful
                    • 7. Re: After XDB errors, cannot get into APEX workspace
                      715920
                      hmm,
                      I think you're right, I better keep those image file. I kinda weary in executing any removal script, besides having backup doesn't hurt. Thanks for the tip....