Forum Stats

  • 3,852,796 Users
  • 2,264,137 Discussions
  • 7,905,145 Comments

Discussions

I get a popup asking for xdb credentials

toki79
toki79 Member Posts: 75
edited Apr 21, 2012 2:22AM in APEX Discussions
Hi,

I am failing with apex. When I call apex in the browser I get a popup asking for xdb credentials.
I read that this can be the case when anonymous is locked or has expired. But here this is not the case.

If I answer the popup with the right credentials, I get a "not found".

Any ideas?

Thanks

Tobias
Tagged:
e952b9b0-23fa-4674-8e95-8c5b650a0018

Answers

  • Sashio
    Sashio Member Posts: 201 Bronze Badge
    I lost my nerves on that issue. Here's what I learnt by reading various sources (forums mostly, as well as documents people linked). I'd suggest you to research by yourself; don't blindly execute what follows - you might (or might not) screw your Apex installation.

    My environment, at a time, was 10g XE, Apex 4.0, Windows 7 Enterprise edition.

    OK then; here's a cript that is supposed to enable anonymous access to the ML DB repository. Some people said that it helpled (didn't help me). Connect as SYS.
    SET SERVEROUTPUT ON
    
    DECLARE
       l_configxml   XMLTYPE;
       l_value       VARCHAR2 (5) := 'true';                       -- (true/false)
    BEGIN
       l_configxml := DBMS_XDB.cfg_get ();
    
       IF l_configxml.
           EXISTSNODE (
             '/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access') =
             0
       THEN
          -- Add missing element.
          SELECT INSERTCHILDXML (
                    l_configxml,
                    '/xdbconfig/sysconfig/protocolconfig/httpconfig',
                    'allow-repository-anonymous-access',
                    XMLType (
                       '<allow-repository-anonymous-access xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">'
                       || l_value
                       || '</allow-repository-anonymous-access>'),
                    'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"')
            INTO l_configxml
            FROM DUAL;
    
          DBMS_OUTPUT.put_line ('Element inserted.');
       ELSE
          -- Update existing element.
          SELECT UPDATEXML (
                    DBMS_XDB.cfg_get (),
                    '/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access/text()',
                    l_value,
                    'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"')
            INTO l_configxml
            FROM DUAL;
    
          DBMS_OUTPUT.put_line ('Element updated.');
       END IF;
    
       DBMS_XDB.cfg_update (l_configxml);
       DBMS_XDB.cfg_refresh;
    END;
    /
    The result is supposed to be "Element updated" if everything goes OK.
    - XDB password request didn't vanish after running that script
    - Neither did it after logout/login to Apex
    - Neither after shutdown/startup the database
    - Neither after rebooting the computer

    Furthermore, someone said that you should unlock XDB user:
    SQL> select username, account_status from dba_users where username = 'XDB';
    
    USERNAME                       ACCOUNT_STATUS
    ------------------------------ --------------------------------
    XDB                            EXPIRED & LOCKED
    
    SQL> alter user xdb account unlock;
    
    User altered.
    
    SQL> select username, account_status from dba_users where username = 'XDB';
    
    USERNAME                       ACCOUNT_STATUS
    ------------------------------ --------------------------------
    XDB                            EXPIRED
    
    SQL>
    Unfortunately, that didn't help either (re-login, re-start, re-boot, re-whatever).

    Then I found that I might have missed running APEX_EPG_CONFIG.SQL (which configures the Embedded PL/SQL Gateway). Again, connected as SYS:
    SQL> @apex_epg_config C:\Oracle\apex_4
    It took almost 10 minutes to finish. The result? Nothing new - XDB password is back.

    My next thought was to actually provide XDB password. Do I know it? Of course not - so I set it:
    SQL> alter user xdb identified by xdb;
    
    User altered.
    When prompted again, I entered xdb/xdb as username/password. In vain, no difference.

    It lasted a week, absolutely no improvement, so I decided to export data from the database as well as a few Apex applications I have had. I uninstalled 10g XE (which, obviously, removed Apex), downloaded and installed 11gXE and Apex 4.1. It's been 3 months now and no annoying XDB password alert.

    If you were patient enough to read the whole message, you probably saw that all my attempts were unsuccessful. I still don't know what causes the issue nor how to resolve it (unless you find my "solution" a solution).

    As I said - do some more research - I saw people saying that they managed to fix the problem. I didn't.

    Best of luck!
  • bdsohail
    bdsohail Member Posts: 1
    hi toki79,

    I also fetched this problem. I use this url server:port/apex_admin .
    When proompts for passw I entered username sys and passw. It accepts but says that url not found.
    Then I use server:port/apex/apex_admin url and it works.

    Note: I user Oracle 11g with EPG.


    Sohail
  • jariola
    jariola Member Posts: 10,848 Gold Crown
    edited Apr 21, 2012 2:22AM
    Hi,

    Have you unlocked user ANONYMOUS?
    ALTER USER ANONYMOUS ACCOUNT UNLOCK;
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21673/otn_install.htm#CHDFJCBE



    Regards,
    Jari
    -----
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

    Edited by: jarola on Apr 21, 2012 9:21 AM
This discussion has been closed.