cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use UME calls in standalone java application?

Former Member
0 Kudos

Hi,

I'm writing a small program to create an User on SAP Enterprise portal.

And i'm using the following properties in sapum.properties file.

###############################################################################

  1. SAP User Management Engine Configuration

###############################################################################

###############################################################################

  1. Logging settings

###############################################################################

##The external class for the portal logger should be used.

##If trace file from native logging api should be used, set this property to "com.sap.security.core.util.imp.UMTrace_EX"

##and set properties "ume.trace.trace_level" and "ume.trace.debug_exception_level" to a severity level from 1 to 5.

ume.trace.external_trace_class=com.sapportals.portal.prt.service.usermanagement.util.UMTrace_620_Portal

###############################################################################

  1. Data source settings

###############################################################################

##xml file that configures the persistence except roles

ume.persistence.data_source_configuration=dataSourceConfiguration_database_only.xml

##xml file that configures the roles persistence which are coming from the pcd

  1. NOTE: ume.persistence.pcd_roles_data_source_configuration AND ume.persistence.ume_roles_data_source_configuration

  2. mustn't be used together.

ume.persistence.pcd_roles_data_source_configuration=dataSourceConfiguration_PCDRoles.xml

##xml file that configures the roles persistence which are coming from the ume

  1. NOTE: ume.persistence.ume_roles_data_source_configuration AND ume.persistence.pcd_roles_data_source_configuration

  2. mustn't be used together.

#ume.persistence.ume_roles_data_source_configuration=dataSourceConfiguration_UMERoles.xml

##specification of the default cache

ume.cache.default_cache=distributableCache

###############################################################################

  1. LDAP settings

###############################################################################

##specifies the servertype NOVELL oder SUN

ume.ldap.access.server_type

##the ldap server name

ume.ldap.access.server_name

##the port of the ldap server

ume.ldap.access.server_port=389

##the user used for connecting to the ldap server

ume.ldap.access.user

##the password of the user

ume.ldap.access.password

##true if ssl is used, false if not

ume.ldap.access.ssl=false

##the path in the ldap server, where the users are found

ume.ldap.access.base_path.user

##the path in the ldap server, where the useraccounts are found; only nedded if a user object is not an account object

#ume.ldap.access.base_path.uacc=

##the path in the ldap server, where the groups are found

ume.ldap.access.base_path.grup

##the data for the connection pool

ume.ldap.connection_pool.min_size=1

ume.ldap.connection_pool.max_size=10

ume.ldap.connection_pool.max_idle_connections=5

ume.ldap.connection_pool.max_idle_time=600000

ume.ldap.connection_pool.max_wait_time=60000

ume.ldap.connection_pool.monitor_level=0

ume.ldap.connection_pool.retrial=10

ume.ldap.connection_pool.retrial_interval=10000

ume.ldap.connection_pool.release_check_interval=120000

###############################################################################

  1. database settings

###############################################################################

##specify if you want to user an internal or external connection pool

ume.db.connection_pool_type=jdbc/sapep

##if you are using an internal connectionpool please use the following properties to configure the connections

##specify the database driver

ume.db.jdbc_driver=com.sap.portals.jdbc.sqlserver.SQLServerDriver

##specify the database url

ume.db.jdbc_url=jdbc:sap:sqlserver://tlvs2k273:1433;DatabaseName=pubs;SelectMethod=cursor

##specify the database user

ume.db.jdbc_user=sa

##specify the user password

ume.db.jdbc_password=admin

##if you are using an external cnnectionpool

##(connection pool of the j2ee engine) please use the following properties to configure the connectionpool

##the context factory of the j2ee connection pool

ume.db.connection_pool.j2ee.initial_context_factory=com.inqmy.services.jndi.InitialContextFactoryImpl

##the provider url of the j2ee connetion pool

ume.db.connection_pool.j2ee.provider_url=localhost

##setting of the internal database connection pool

ume.db.connection_pool.internal.minsize=1

ume.db.connection_pool.internal.maxsize=30

ume.db.connection_pool.internal.max_idle_connections=5

ume.db.connection_pool.internal.max_connection_idle_time=600000

ume.db.connection_pool.internal.max_wait_process_time=600000

ume.db.connection_pool.internal.monitor_interval=500

ume.db.connection_pool.internal.connect_retrials=0

ume.db.connection_pool.internal.max_connection_usage_timel=600000

ume.db.connection_pool.internal.max_connection_usage_time_check_interval=60000

ume.db.connection_pool.internal.monitor_path=./

###############################################################################

  1. R/3 settings (for use as Master datasource)

###############################################################################

ume.replication.messaging.handlers=secondarysync

ume.replication.adapters.index_1=xmladapter?adapterid=q3c

ume.r3.sync.sender=SAPMUM

      1. Start of Required keys for R/3 connection

ume.r3.connection.master.client=800

ume.r3.connection.master.user=eagleeye

ume.r3.connection.master.passwd=1234

ume.r3.connection.master.sysnr=00

ume.r3.connection.master.useXML=false

    1. R/3 application name (only CRM and EBP are supported)

ume.r3.connection.master.application

      1. End of required keys

      1. Start of required-optional keys

      2. One of following 3 options is required:

      3. Option 1: application host name

ume.r3.connection.master.ashost=tlvs2k240.adprod.bmc.com

      1. Option 2: (name used to map to the sapmsg.ini file.)

#ume.r3.connection.master.r3name=

      1. Option 3: message server

#ume.r3.connection.master.msghost=<message server>

      1. Required when options 2 and 3 are used (e.g. PUBLIC)

#ume.r3.connection.master.group=<group of message server>

      1. End of required-optional keys

      1. Start of optional keys

ume.r3.connection.master.lang=en

      1. number of connections to create in the connection pool

ume.r3.connection.master.poolmaxsize=10

      1. Time in milliseconds to wait for available connection before error

ume.r3.connection.master.poolmaxwait=10000

###############################################################################

  1. Security Policy

###############################################################################

ume.logon.security_policy.useridminlength=6

ume.logon.security_policy.useridmaxlength=20

ume.logon.security_policy.userid_in_password_allowed=TRUE

ume.logon.security_policy.oldpass_in_newpass_allowed=TRUE

ume.logon.security_policy.password_min_length=6

ume.logon.security_policy.password_max_length=10

ume.logon.security_policy.password_mix_case_required=0

ume.logon.security_policy.password_alpha_numeric_required=0

ume.logon.security_policy.password_special_char_required=0

ume.logon.security_policy.password_change_allowed=TRUE

ume.logon.security_policy.lock_after_invalid_attempts=6

ume.logon.security_policy.auto_unlock_time=60

ume.logon.security_policy.password_expire_days=99999

ume.logon.security_policy.cert_logon_required=FALSE

ume.logon.security_policy.cookie_life_time=172800

###############################################################################

  1. security parameters

###############################################################################

  1. path of your IAIK keystore

login.ticket_keystore=ticketKeyStore

  1. Key pair alias with the Keystore ('sapportal' recommended for new install)

login.ticket_keyalias=TestKey

login.ticket_lifetime=8

  1. url of the SAP trustcenter that signed the portal key (req. for RA functionality)

trustcenter=https://tcs.mysap.com/invoke/tc/usercert

  1. logical adapter name of authenticating backend

  2. credentials are checked against this specified repository (see repository_configuration_file)

login.authentication_server=Corporate Authentication Server

#authschemes conf xml file

login.authschemes.definition.file=authschemes.xml

ume.superadmin.activated=false

  1. (Comma separated) list of role xml files

#ume.roles.xml_files = *role.xml

###############################################################################

                                                    1. Self Registration ################################

###############################################################################

      1. to enable self registration process. (default: true)

ume.logon.selfreg=true

ume.admin.selfreg_company=false

###############################################################################

                                                    1. Notification Mails ################################

###############################################################################

      1. mail host, separated by semicolon if several hosts

  1. ume.notification.mail_host=<mailhost1>;<mailhost2>;<mailhost3>

ume.notification.mail_host

        1. Email sending mode

      1. asynchronous is preferred especially when many emails are sent out

ume.notification.email_asynch=true

      1. Sending an email on the below events can be switched on(default)/off

ume.notification.create_request=true

ume.notification.create_approval=true

ume.notification.create_performed=true

ume.notification.pswd_reset_request=true

ume.notification.pswd_reset_performed=true

ume.notification.unlock_request=true

ume.notification.lock_performed=true

ume.notification.unlock_performed=true

ume.notification.delete_performed=true

ume.notification.create_by_batch_performed=true

ume.notification.update_by_batch_performed=true

ume.notification.create_denied=true

###############################################################################

  1. anonymous user

###############################################################################

      1. Defines which mode of anonymous logon is to be used. Default value is 1.

      2. 1 = Anonymous logon with named anonymous users is used.

      3. 0 = Simple anonymous logon is used.

ume.login.anonymous_user.mode=1

      1. Comma-separated list of guest users that are supported. These users must exist with this unique ids in the user repository. This parameter does only take effect if ume.login.anonymous_user.mode=1

ume.login.guest_user.uniqueids=anonymous

###############################################################################

  1. user admin

###############################################################################

ume.admin.search_maxhits_warninglevel=200

ume.login.guest_user.defaultid=anonymous

login.ticket_issuer=EP6

ume.license.sysid=EP6

-


And I'm getting the following error

Exception:Data source is not initialized!

com.sap.security.core.persistence.datasource.PersistenceException: Data source i

s not initialized!

at com.sap.security.core.persistence.datasource.imp.DataBasePersistence.

beginTransaction(DataBasePersistence.java:1919)

at com.sap.security.core.persistence.imp.DistributedTransaction.commit(D

istributedTransaction.java:224)

at com.sap.security.core.imp.UserMaint.commit(UserMaint.java:521)

at SAPEP_AccountManager.accountAdd(SAPEP_AccountManager.java:43)

at SAPEP_AccountManager.main(SAPEP_AccountManager.java:22)

Can any one help me please?

Accepted Solutions (1)

Accepted Solutions (1)

ssimsekler
Active Contributor
0 Kudos

Hi Ronni

This forum is not the right place where you can find your answer easily. To catch more answers you can try posting your question to one of the following forums:

1. <a href="https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-1&contenttype=url&content=https%3A%2F%2Fforums.sdn.sap.com%2Fforum.jspa%3FforumID%3D41">EP Content Development Forum</a>

2. <a href="https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode2-4&contenttype=url&content=https%3A%2F%2Fforums.sdn.sap.com%2Fforum.jspa%3FforumID%3D59">Java Programming Forum</a>

*--Serdar

Moved the post to Java Programming.

Thanks for the post, Mark.

Message was edited by: Mark Finnern

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ronni,

yes, you are able to call UME, but this has to be done in the SAP Java Application Server itself (i.e. servlet).

Regards, Jannis

Former Member
0 Kudos

do you have any answer for your post please ?

because we face a similar problem while updating groups instead of user in standalone java program ...

thank you,

Olivier.

Former Member
0 Kudos

Hi Olivier,

Even we could not succeed adding users into SAP Enterprise Portal from Standalone java program. Can you please let me know how I should proceed to add an user from standalone java program.

Thanks in advance

Sekhar

Former Member
0 Kudos

Ronni,

sorry but i don't understand ?

is this message for the comnunity or for me ?

because i don't know how to do it also ... my method doesn't update the database !!

regards,

Olivier.