Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with APEX_UTIL.CREATE_USER with APEX 5.0

stuetzAug 23 2015 — edited Nov 1 2015

Hi all,

I am creating APEX-Workspaces and Users per JDBC.

Until APEX 4.2 it works well. But now wit APEX 5 there are issues:

Code which is sent to the db with 2 CallableStatements (autocommit on)

BEGIN apex_instance_admin.add_workspace(

  p_workspace_id => NULL,p_workspace => 'WS_TESTC19',

  p_primary_schema => 'TESTC19',

  p_additional_schemas => NULL);

END;

/

declare

  vSecurityGroupId NUMBER;

begin

  vSecurityGroupId := APEX_UTIL.FIND_SECURITY_GROUP_ID(

    p_workspace => 'WS_TESTC19'

  );

  wwv_flow_api.set_security_group_id(vSecurityGroupId);

  APEX_UTIL.CREATE_USER(

    P_USER_NAME => 'TESTC19',

    P_WEB_PASSWORD => 'xxxx' ,

    p_first_name => 'n/a' ,

    p_last_name => 'n/a' ,

    p_email_address => 'bitte eintragen',

    p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',

    p_default_schema => 'TESTC19',

    p_change_password_on_first_use => 'N',

    p_description => 'TESTC'

  );

end;

In SQLdeveloper this Code works well, but with APEX 5 there is an error:

ORA-20001: APEX.AUTHENTICATION.WORKSPACE_NOT_ASSIGNED

ORA-06512: at "APEX_050000.WWV_FLOW_SECURITY", line 2659

ORA-06512: at "APEX_050000.WWV_FLOW_SECURITY", line 2682

ORA-06512: at "APEX_050000.WWV_FLOW_SECURITY", line 2746

ORA-06512: at "APEX_050000.WWV_FLOW_API", line 2035

ORA-06512: at "APEX_050000.WWV_FLOW_API", line 2049

ORA-06512: at line 1

Maybe somebody has a hint.

Thank you in advance

Thomas

Comments

Hadar Paiss

Hi,
There are few issues in the upgrade that might arise concerning logins:
with default install oracle 19 password are case sensitive
The password 'format' changed. You can check in dba_users
You might need to add to sqlnet.ora the parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER=11
look into https://docs.oracle.com/en/database/oracle/oracle-database/18/spmsu/finding-and-resetting-user-passwords-10g-password-version.html#GUID-D7B09DFE-F55D-449A-8F8A-174D89936304
It will cover some of it.
Regards,
Hadar

User_YAOJZ

Thanks Hadar. The password issue I knew about. I added the code to SQLNET.ORA in both the oracle_home/network/admin folder and the instantclient/network/admin folder and now get an ORA-12504 error.
I added both a tnsnames.ora and listener.ora files to both folders (with appropriate settings) but can't get past the 12504 error.
Any ideas? Greatly appreciated!
tnsnames.ora (orcltest is name of database, brian-surface4 is name of PC)
LISTENER_ORCLTEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Brian-Surface4)(PORT = 1521))

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

ORCLTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Brian-Surface4)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcltest)
)
)
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oracle\WINDOWS.X64_193000_db_home)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\oracle\WINDOWS.X64_193000_db_home\bin\oraclr19.dll")
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Brian-Surface4)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

User_B9CRX

Just to clarify, do you mean you upgraded the database the app is still at Legacy 11g app client? You are testing this where the database and client are on the same host?

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 29 2015
Added on Aug 23 2015
3 comments
1,289 views