Creating a user in EP using a java standalone application

Hi,
  I am trying to create a java application to create a user in Enterprise Portal.
  I am getting the following error:
com.sap.security.api.UMRuntimeException: Cannot lookup ManageConnectionFactory "jdbc/sapep". Possible reasons: 1) The connector in which ManagedConnectionFactory "jdbc/sapep" is defined is not deployed or not started, 2) Cannot deserialize object due to a naming exception.
ume.db.connection_pool_type=jdbc/sapep
ume.db.connection_pool.j2ee.xatransactions_used=false
ume.db.connection_pool.j2ee.is_unicode=true
ume.db.connection_pool.j2ee.oracle_native_driver_used=false: Cannot lookup ManageConnectionFactory "jdbc/sapep". Possible reasons: 1) The connector in which ManagedConnectionFactory "jdbc/sapep" is defined is not deployed or not started, 2) Cannot deserialize object due to a naming exception.
  Q1. Is it possible to create user from java standalone application.
  Q2. Pls. help to resolve the error or give any sample code if you have
  Thanks in advance.
Regards,
  Pratik

Hi Ravi,
How about something like this:
IUserMaint user = UMFactory.getUserFactory().newUser("myNewUser");
user.setFirstName("1st Name");
user.setLastName("2nd Name");
user.setEmail("[email protected]");
user.save();
user.commit();
IUserAccount uacc = UMFactory.getUserAccountFactory().newUserAccount("myNewUser", user.getUniqueID());
uacc.setPassword("initial");
uacc.setPasswordChangeRequired(false);
uacc.save();
uacc.commit();
Hope this helps.
Daniel

Similar Messages

  • How to create two level dynamic list using JSP , Java Script and Oracle

    I am new in JSP. And i am facing problem in creating two level dynamic list using JSP ,Java Script where the listdata will come from Oracle 10g express edition database. Is there any easy way in JSP that is available on in ASP.NET.
    Plz response with details.

    1) Learn JDBC API [http://java.sun.com/docs/books/tutorial/jdbc/index.html].
    2) Create DAO class which contains JDBC code and do all SQL queries and returns or takes ID's or DTO objects.
    3) Learn Servlet API [http://java.sun.com/javaee/5/docs/tutorial/doc/].
    4) Create Servlet class which calls the DAO class, gets the list of DTO's as result, puts it as a request attribute and forwards the request to a JSP page.
    5) Learn JSP and JSTL [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Also learn HTML if you even don't know it.
    6) Create JSP page which uses the JSTL c:forEach tag to access the list of DTO's and iterate over it and prints a HTML list out.
    You don't need Javascript for this.

  • Idea ? web interface + java standalone application

    Hello,
    I would provide a java standalone application. In parallel, I want create web interface (HTML+CSS+JS) that can write configuration files and read output files.
    Can I avoid the use of tomcat server ? May be, I know nice solution like jetty : is-it difficult ?
    Anyway, I'm looking for any piece of advice ..
    Thanks,
    From France
    Edited by: phpvik on May 4, 2009 8:10 AM

    What are the technical requirements? Just choose the server based on that.

  • Integrate Java standalone application when WIndows start

    Hello everybody.I would like to ask you if it is possible to load a Java standalone application when any Windows platform (NT/2000/98/XP) starts.
    How can I integrate an application when WIndows start?Do I have to include the bat file(which callls the java applictaion) into a Windows system file?
    Regards.

    You can do one of several things:
    1. Write a native executable that runs the Java Archive (JAR) using the java shell command.
    2. Write a Windows shortcut that runs the java shell command (again passing in the JAR).
    3. Purchase software that will produce a native executable that will run the JAR for you.
    4. Integrate JAR files as executable programs into your Kernel. In Windows this is not easy, but again, there are solutions on the Internet, but you will most likely have to purchase these.
    5. Configure the JAR file type so that when any JAR file type is double-clicked (and the default action is performed), the Java runtime is executed with the JAR as a parameter.
    5 is my usual solution, and for operating systems like Linux, and especially MacOS, it is much easier to get JARs to run 'more natively'.
    The answer to your question is simply 'Yes' but it is your choice of how to do this.
    As far as running the JAR when your desktop starts up (Explorer in this case), you can do two things - firstly there's a 'Run' item in your registery where you can place the location of your shortcut / executable, secondly, you can simply put the short-cut or the executable (I recommend a shortcut) in your 'Startup' folder of your Start Menu. (Start -> Programs -> Startup).
    I hope this helps.
    Gen.
    http://www.opetec.com/

  • How to call a servlet  by  java standalone application

    //program related to calling a servlet by java standalone application and printing the response on console
    import java.io.*;
    import java.util.*;
    import java.lang.Object;
    import java.net.*;
    public class Program
         public static void main(String s[])
         System.out.println("Hello this programm defines about how to call a servlet with a java application ");
         try{
              URL servlet = new URL("http://localhost:8080/anchor/studentform.html");
              URLConnection conn=servlet.openConnection();
              conn.setDoOutput(true);
              InputStreamReader isr=new InputStreamReader(conn.getInputStream());
              BufferedReader br = new BufferedReader(isr);
              String str =br.readLine();
              System.out.println("Source code is" +str);          
         catch(IOException e)
         System.out.println("exception is" +e);
    i am able to read only one line of the form, please help me out to read the whole form (file)

    You are only reading one line? Why aren't you reading the data in a loop? E.g. a while loop. (Keep reading till readLine returns null)
    Kaj

  • Creating a user defined control using java Beans

    Hi,
    I want to create a user defined control which is used to draw a line ...
    same as we using in VB as Line control.In java we will create the component using using Beans . I created a code
    which will draw a line in the run time .For tat i extend the class with JPanel,but i cant use the same program in beans....b'coz it simply draws the jpanel when we drag and drop that control in the form....
    so can u give me some ideas to create a control which is used to draw a line .....i am attaching the same which i did .....
    thank u in advance...
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Line extends JPanel
    BufferedImage image;
    Color color;
    Stroke stroke;
    Point start = new Point();
    Point end = new Point();
    public Line()
    color = Color.blue;
    stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT,
    BasicStroke.JOIN_MITER);
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if(image == null)
    initImage();
    g.drawImage(image, 0, 0, this);
    // Draw temp line over image.
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(Color.red);
    g2.drawLine(start.x, start.y, end.x, end.y);
    public void setTempPoints(Point p1, Point p2) {
    start = p1;
    end = p2;
    repaint();
    public void draw(Point p1, Point p2)
    Graphics2D g2 = image.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(color);
    g2.setStroke(stroke);
    g2.drawLine(p1.x, p1.y, p2.x, p2.y);
    g2.dispose();
    start = end;
    repaint();
    private void clearImage()
    Graphics g = image.getGraphics();
    g.setColor(getBackground());
    g.fillRect(0, 0, image.getWidth(), image.getHeight());
    g.dispose();
    repaint();
    private void initImage()
    int w = getWidth();
    int h = getHeight();
    image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    g2.setPaint(getBackground());
    g2.fillRect(0,0,w,h);
    g2.dispose();
    public static void main(String[] args)
    Line wbclient = new Line();
    DrawingListener listener = new DrawingListener(wbclient);
    wbclient.addMouseListener(listener);
    wbclient.addMouseMotionListener(listener);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(wbclient);
    f.setSize(400,400);
    f.setLocation(200,200);
    f.setVisible(true);
    class DrawingListener extends MouseInputAdapter
    Line wbclient;
    Point start;
    Point end;
    final int MIN_DIST = 5;
    public DrawingListener(Line fh)
    this.wbclient = fh;
    public void mousePressed(MouseEvent e)
    start = e.getPoint();
    public void mouseReleased(MouseEvent e)
    end=e.getPoint();
    if(start.distance(end) > MIN_DIST)
    wbclient.draw(start, end);
    public void mouseDragged(MouseEvent e)
    wbclient.setTempPoints(start, e.getPoint());
    }

    Hi Ravi,
    How about something like this:
    IUserMaint user = UMFactory.getUserFactory().newUser("myNewUser");
    user.setFirstName("1st Name");
    user.setLastName("2nd Name");
    user.setEmail("[email protected]");
    user.save();
    user.commit();
    IUserAccount uacc = UMFactory.getUserAccountFactory().newUserAccount("myNewUser", user.getUniqueID());
    uacc.setPassword("initial");
    uacc.setPasswordChangeRequired(false);
    uacc.save();
    uacc.commit();
    Hope this helps.
    Daniel

  • Create the user master records using the Enterprise Portal

    Hello gurus!!
    I'm configuring SRM 7.0 with EP.
    I'm configuring the organizational structure, and steps guide (pdf and Solution Manager ) are:
    1. Go to transaction SU01 and create an ABAP User. (SRMADMIN)
    2. Assign this user the administrator role /SAPSRM/ADMINISTRATOR
    3. As the administrator, creater the organizational plan
    4. Create the remaining organizational unit
    5. Using the Enterprise Portal application, Business Parter:Employee, create the user master records for the departmental managers.
    How I must create the user in Enterprise Portal? What user I have to use to log on in the Enterprise Portal application? Has the user to be integrated in the organzational structure??
    Thanks in advance!!!!
    Best regards.
    Maria.

    Hi,
    You can create users in WebDynpro application. You can also create users in USERS_GEN transaction.
    Regards,
    Masa

  • How to create relationship between two records using MDM Java APIs

    Hi,
    I am trying to create relationship between two records using Java Apis. Please guide me in doing this.
    Regards,
    Niraj

    Hi Niraj,
    There is ModifyRelationshipsCommand:
    http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/ModifyRelationshipsCommand.html
    Retrieve Relationship command:
    http://help.sap.com/javadocs/MDM/current/com/sap/mdm/schema/commands/GetRelationshipListCommand.html
    Also, please refer similar thread, MDM Java API and relationships.
    Hope it helps..
    Regards,
    Mandeep Saini

  • How to create multiple users in solaris using script

    hi
    how i can create multiple users (2000 users) using shell script with a common password .
    useradd is creating one user at a time.
    thanks

    I m new to solaris and scripting also.
    how i can write a script for this .

  • E-recruiting: create internal user failture when using RCF_CREATE_USER

    Hi, experts
        When I create candidate and internal user in E-recuriting using report RCF_CREATE_USER, the system returns me a message: "I::000 Enter at least one number for the business partner" , and so i can't create the user successfully.
        Can anyone show me the solution?
        Thanks very much.
        Best Regards,
        qiuguo

    Hi
    just a thought.....it may not be creating a CP /BP....check your authorization.....hope this helps.....b/r

  • While creating connection to MDM repository using MDM JAVA API

    I am getting the following error message:
    Unexpected field type 28
    I am able to debug that this error message is being displayed after executing the following line of code:
    /** Get the Repository schema */
    GetRepositorySchemaCommand repositroySchemaCommand =
    new GetRepositorySchemaCommand(simpleConnection);
    repositroySchemaCommand.setSession(repositorySession);
    repositroySchemaCommand.execute();
    Now can anyone please explain how to resolve this error?
    Thanks in Advance.
    Rajat

    public void getRepositoryConnection(
              java.lang.String hostName,
              java.lang.String repositoryName,
              java.lang.String userId,
              java.lang.String passWord) {
              //@@begin getRepositoryConnection()
              try {
                   if (simpleConnection == null) {
                        simpleConnection =
                             SimpleConnectionFactory.getInstance(hostName);
                        // Establish TCP Connection to the server
                        if (simpleConnection != null) {
                             //                              wdComponentAPI.getMessageManager().reportSuccess("Got Connected");
                             /** Establish a repository session with the respository */
                             //Set the region properties
                             RegionProperties dataRegion = new RegionProperties();
                             /** Set region code for the session */
                             dataRegion.setRegionCode("engUSA");
                             /** Set the locale on data region */
                             dataRegion.setLocale(new Locale("en", "US"));
                             /** Set the name of data region */
                             dataRegion.setName("US");
                             // Createa repository identifier
                             RepositoryIdentifier repositoryID =
                                  new RepositoryIdentifier(
                                       repositoryName,
                                       hostName,
                                       DBMSType.MS_SQL);
                             /** Create the User Session */
                             CreateUserSessionCommand createUserSessionCommand =
                                  new CreateUserSessionCommand(simpleConnection);
                             /** Set the repository identifier (mandatory)*/
                             createUserSessionCommand.setRepositoryIdentifier(
                                  repositoryID);
                             /** Set the region properties for the session (mandatory) */
                             createUserSessionCommand.setDataRegion(dataRegion);
                             createUserSessionCommand.execute();
                             /** Get the session identifier */
                             this.userSession =
                                  createUserSessionCommand.getUserSession();
                             AuthenticateUserSessionCommand authenticateUserSessionCommand =
                                  new AuthenticateUserSessionCommand(simpleConnection);
                             /** Set session identifier (mandatory)*/
                             authenticateUserSessionCommand.setSession(userSession);
                             /** Set id of repository user(mandatory) */
                             authenticateUserSessionCommand.setUserName(userId);
                             /** Set password (mandatory)*/
                             authenticateUserSessionCommand.setUserPassword(passWord);
                             /** Establish the session */
                             authenticateUserSessionCommand.execute();
                             SetUnicodeNormalizationCommand unicodeNormalizationCommand =
                                  new SetUnicodeNormalizationCommand(simpleConnection);
                             unicodeNormalizationCommand.setSession(userSession);
                             unicodeNormalizationCommand.setNormalizationType(
                                  SetUnicodeNormalizationCommand.NORMALIZATION_COMPOSED);
                             unicodeNormalizationCommand.execute();
                             CreateRepositorySessionCommand repositorySessionCommand =
                                  new CreateRepositorySessionCommand(simpleConnection);
                             /** Set the repository identifier */
                             repositorySessionCommand.setRepositoryIdentifier(
                                  repositoryID);
                             /** Obtain repository session */
                             repositorySessionCommand.execute();
                             /** Store the session id into the variable repositorySession */
                             this.repositorySession =
                                  repositorySessionCommand.getRepositorySession();
                             /** Authenticate the users session */
                             AuthenticateRepositorySessionCommand authenticatedRepositorySession =
                                  new AuthenticateRepositorySessionCommand(simpleConnection);
                             /** set the session id */
                             authenticatedRepositorySession.setSession(
                                  repositorySession);
                             /** set id of the repository user */
                             authenticatedRepositorySession.setUserName(userId);
                             /** set password */
                             authenticatedRepositorySession.setUserPassword(passWord);
                             authenticatedRepositorySession.execute();
                             /** Get the Repository schema */
                             GetRepositorySchemaCommand repositroySchemaCommand =
                                  new GetRepositorySchemaCommand(simpleConnection);
                             repositroySchemaCommand.setSession(repositorySession);
                             repositroySchemaCommand.execute();
                             this.schema = repositroySchemaCommand.getRepositorySchema();
              } catch (Exception e) {
                   wdComponentAPI.getMessageManager().reportException(
                        e.getMessage(),
                        true);
              //@@end

  • Creating 2000 users Id only using script (no exchange)

    I have received a request to create 200 users\
    Here are the details
    Purpose: To be used for the ABC load testing (new version) that use AD authentication
    Create new NT Domain users: (they can be created through script)
    Rules:
    - Create 2000 new NT users
    - No mailbox should be created/assigned
    - No rights should be provided to the users, they should only have possibility to be used for AD authentication
    - The users should have sequential names like ABC_LT0000 ==> ABC_LT1999
    - The passwords should never expire and not change.
    - The passwords should be communicated as a list of user/pwd separately to me: 
    - The user can be made part of a different organisationel unit to ease management of them.
    This is urgent. please advise

    I found this script and i modified it
    #csv format needs to be as follows: 
    #Alias,Firstname, Lastname,Name,UPN,OUpath,Database,password
    #change the name and path of the csv file as required. 
    $users = Import-CSV E:\Users\Hpssira\blkusr.csv 
    $users| foreach
    $Password = -AccountPassword ( ConvertTo-SecureString 'Pass@1234' -AsPlainText -Force) -Enabled $true
    new-mailbox -name $_.name -alias $_.alias -FirstName $_.Firstname -LastName $_.Lastname -userPrincipalName  $_.UPN -database $_.Database -OrganizationalUnit $_.OUpath -Password $Password –ResetPasswordOnNextLogon $true
    Missing expression after unary operator '-'.
    At E:\users\hpssira\tired.ps1:10 char:14
    + $Password = - <<<< AccountPassword ( ConvertTo-SecureString 'Pass@1234' -AsPlainText -Force) -Enabled $true
        + CategoryInfo          : ParserError: (-:String) [], ParseException
        + FullyQualifiedErrorId : MissingExpressionAfterOperator
    I am using my Last name First name as my ALias. is that correct or should i change it to samaccountname

  • How to find all users in hyperion using ListUsers java file...

    hi..
    please can anyone let me know that how i can use the ListUsers.java file to list all users having account.
    i have created class file from above and try to run it in follwoing way...
    java ListUsers username passwd ipadd port(i use 6795 which reportsitory port)
    but it gives me error like ..
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sqribe/rm/ReportMartException
    can any one plese let me is thr anything i am doing wrong.. i m sure that class in java file is same as the one i am using..
    thanks in advance.

    hey u will ge getting dataset after execution of the excute command i will try to explain it
    PreparedStatementUtil preparedstatementutil = new PreparedStatementUtil();
    preparedstatementutil.setStatement(dataProvider, "select usr.usr_email from usr usr where usr.USR_Login=?");
    preparedstatementutil.setString(1, "TEST1");
    preparedstatementutil.execute();
    tcDataSet tcdataset = preparedstatementutil.getDataSet();
    UserEmailAddr = tcdataset.getString("usr_email");
    here you are getting the email address from the dataset after executing the execute statement.
    hope this helps you
    Regards
    VM

  • Can I create ASP user validated website using existing MD5 passwords from SQL table?

    I'm attempting to build a user authenticated site in Dreamweaver CS5 using an existing USERS table from another site.  The password field in the existing SQL table appears to be MD5 encoded.  How can I MD5 encode the form field (or the SQL query) so that it verifies MD5 to MD5?
    Currently, it's comparing the form's plain text field to the MD5 encrypted password field in SQL.
    I've built a simple login form using the following:
    <form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
        <input name="username" type="text" id="username" accesskey="u" tabindex="1" /><input name="password" type="password" id="password" accesskey="p" tabindex="2" /><input name="submit" type="submit" value="submit" />
        </form>
    With the stock Dreamweaver Log In User Server Behavior as follows:
    <%
    ' *** Validate request to log in to this site.
    MM_LoginAction = Request.ServerVariables("URL")
    If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
    MM_valUsername = CStr(Request.Form("username"))
    If MM_valUsername <> "" Then
      Dim MM_fldUserAuthorization
      Dim MM_redirectLoginSuccess
      Dim MM_redirectLoginFailed
      Dim MM_loginSQL
      Dim MM_rsUser
      Dim MM_rsUser_cmd
      MM_fldUserAuthorization = ""
      MM_redirectLoginSuccess = "results.asp"
      MM_redirectLoginFailed = "error.html"
      MM_loginSQL = "SELECT user_name, password"
      If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
      MM_loginSQL = MM_loginSQL & " FROM dbo.users WHERE user_name = ? AND password = ?"
      Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
      MM_rsUser_cmd.ActiveConnection = MM_ADSX_STRING
      MM_rsUser_cmd.CommandText = MM_loginSQL
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 32, MM_valUsername) ' adVarChar
      MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 32, Request.Form("password")) ' adVarChar
      MM_rsUser_cmd.Prepared = true
      Set MM_rsUser = MM_rsUser_cmd.Execute
      If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
        ' username and password match - this is a valid user
        Session("MM_Username") = MM_valUsername
        If (MM_fldUserAuthorization <> "") Then
          Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
        Else
          Session("MM_UserAuthorization") = ""
        End If
        if CStr(Request.QueryString("accessdenied")) <> "" And false Then
          MM_redirectLoginSuccess = Request.QueryString("accessdenied")
        End If
        MM_rsUser.Close
        Response.Redirect(MM_redirectLoginSuccess)
      End If
      MM_rsUser.Close
      Response.Redirect(MM_redirectLoginFailed)
    End If
    %>
    Please help!

    unfortunately classic asp does not have a built in function for md5. what we used for our legacy sites is a javascript that hashes a string to MD5. here's the code we've used in the past http://pajhome.org.uk/crypt/md5/md5.html
    your asp should have something like this...
    <script language="jscript" src="path_to_js_file/md5.js" runat="server"></script>
    <%
    'hash the password
    Dim md5password       ' md5password variable will hold the hashed text from form variable txtPassword
    md5password = hex_md5(""&Request("txtPassword")&"")
    ' based on the code you posted...
    MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 32, md5password) ' adVarChar
    %>

  • How do I create a digital signature to use when filling out applications online?

    The application is asking me to add or create a digital ID to sign and encrypt documents. The certificate that comes with your digital ID is sent to others so that they can verify your signature.
    I have four options: Browse for an existing digital ID file
    Configure a roaming ID for use on this computer
    Create a self-signed digital ID for use with Acrobat
    Look for newly inserted hardware tokens

    Formscentral does not support forms with digital signature workflows. I suggest you see if our Echosign product meets your needs.

Maybe you are looking for

  • I can't see my iPod touch in iTunes, any help please?

    I already tried the apple support but I still have this problem. If anyone had this problem and could help me, great.

  • Acrobat 8 Pro Installation asks for a non-existent file

    I just did a clean install of Windows 7 Ultimate 64-bit on my Alienware laptop, FINALLY replacing the beta version. When I try to run the installation of Acrobat Pro 8 it gets most of the way through then stops, putting up a dialog instructing me to

  • Adobe Reader XI - Broken PDF association

    Hello, My aim is to leave Adobe Acrobat as the default PDF handler if Reader is installed after Acrobat. When I edit LEAVE_PDFOWNERSHIP and IW_DEFAULT_VERB settings in an MST file (as shown below). PDF association is broken. Clicking PDF files from t

  • Unable to connect to destination message installing of oracle 8.0.5

    Hi all, I have a hypervisor environment in which i am trying to install oracle 8 on Windows 2000 server. During the installation of pre-configured database (orcl), the installation stops giving error "Unable to connect to destination" and asks for pa

  • Why does MOVE effect return object to original position?

    I am trying to implement a MOVE for a CANVAS. The move works as desired however the Canvas returns to its original position. Essentially the move happens and then everything reverses and goes back to the original state. Code is below... Thanks in adv