Forum Stats

  • 3,769,237 Users
  • 2,252,936 Discussions
  • 7,874,955 Comments

Discussions

Problems with APEX_UTIL.CREATE_USER with APEX 5.0

stuetz
stuetz Member Posts: 2
edited Nov 1, 2015 3:36AM in APEX Discussions

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

Tagged:

Answers

This discussion has been closed.