Update USR table from Java Code outside OIM

Hi,
I want to update a particular field in the USR table using the update query specifically from the java code. I dont want use updateUser api.
I have written the code which works fine for some userids. But for some user ids it gets the tcUtility object successfully but when trying to execute the update query, it throws the tcDatasetException with message as Data Access Error.
Please let me know how can i achieve this.
Also let me know the groups the userid should be member to execute a update query on OIM DB from external java code..
TIA...

You are performing an unsupported process. I suggest you correctly code a connection to OIM, and perform the update correctly.
If you need to update the database directly, use jdbc java connection and run the update. You can do a google search for jdbc and java to find plenty of samples.
-Kevin

Similar Messages

  • How to trigger tree table from java code

    Trying to trigger tree table from java code, using :
    AdfFacesContext.getCurrentInstance().addPartialTarget(treeTableComponent);
    But its not working. Am i using the correct approach?

    Sorry for the incomplete information,
    I have a tree table in a region and that region i am including inside a jspx file. In the region i have one popup and based on the input taken from the popup i want to trigger the table to show the data.
    For that i am trying :
    FacesContext context = FacesContext.getCurrentInstance();
    UIComponent component = findComponent( context.getViewRoot(),"treeTableID");
    if(component != null){
    AdfFacesContext.getCurrentInstance().addPartialTarget(component);
    public static UIComponent findComponent(UIComponent base, String id)
    if (id.equals(base.getId()))
    return base;
    UIComponent children = null;
    UIComponent result = null;
    Iterator childrens = base.getFacetsAndChildren();
    while (childrens.hasNext() && (result == null))
    children = (UIComponent) childrens.next();
    if (id.equals(children.getId()))
    result = children;
    break;
    result = findComponent(children, id);
    if (result != null)
    break;
    return result;
    Model is getting data before i use : AdfFacesContext.getCurrentInstance().addPartialTarget(component);
    But table is not calling getData() in model to show the populated data on UI.

  • Refreshing trinidad table from java code how to?

    my case
    jdev 11gR2
    jspx:
    <tr:table ...>
         <tr:column >
    <tr:commandLink partialSubmit="true" actionListener="#{backing.doDo}"...>
    <f:attribute name="tId"
    value="#{row.bindings.Id.inputValue}"/>
    </tr:commandLink>
    </tr:table>
    <tr:table value="#{bindings.View1.collectionModel}" binding="#{backing.table}"... >
    java:
    public void doDo(ActionEvent actionEvent) {
    Integer trackID = (Integer)getCmdLink().getAttributes().get("trackId");
         OperationBinding operationBinding = getBindings().getOperationBinding("ExecuteWithParams1");
         operationBinding.getParamsMap().put("parTrackId", trackID);
         operationBinding.execute();
         RequestContext rc = RequestContext.getCurrentInstance();
         rc.addPartialTarget(this.getTable());
    pageDef:
    <action IterBinding="View1Iterator" id="ExecuteWithParams1"
    Action="executeWithParams" ...>
    <NamedData NDName="parTrackId" NDType="java.lang.Long"/>
    </action>
    as long as I use partialSubmit="true" nothing happends, and I don't want to use full submit....What am I doing wrong?

    Hi,
    Try as follow
    public void doDo(ActionEvent actionEvent) {
    Integer trackID = (Integer)getCmdLink().getAttributes().get("trackId");
    OperationBinding operationBinding = getBindings().getOperationBinding("ExecuteWithParams1");
    operationBinding.getParamsMap().put("parTrackId", trackID);
    operationBinding.execute();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    adfFacesCtx.addPartialTarget((this.getTable());
    //RequestContext rc = RequestContext.getCurrentInstance();
    //rc.addPartialTarget(this.getTable());
    }

  • Accessing XI Tables (ABAP Stack) from Java code

    Hi,
    IS it possible to access tables like SXMSPMAST, SXMSPEMAS directly from Java code without the use of any RFC or BAPI in between?
    Cheers,
    Earlence

    I think it is technically possible, as you can get access to the JDBC Connector service using J2EE's JNDI feature ... Then you can use the internal DB datasource to read data from tables (read ONLY, cuz I'm not sure it is a good idea to update data "outside" the box, and reading can also have potiential perf or stability issue) ... Some (better) methods can also exist !
    Chris
    Edited by: Christophe PFERTZEL on Jan 15, 2010 3:07 PM

  • How to modify an existing xml file from java code.

    Hi
    I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile.
    For example if xml file(studlist.xml) is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    Now suppose i have set name to victor using student.setName,
    and set age to 20 using setAge from javacode,
    the new xml file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    <Student>
              <Name>victor</Name>
              <Age>20</Age>
         </Student>
    As observed this is not a valid xml file.But how can i modify without any errors?

    I know it's an old post, but I found this while doing a google search for something else, and don't like to leave it un-aswered
    Just in case anyone has a similar problem... In this case the new elements have been appended outside of the root element
    What you need to do is first get the root element and then append the new children to that, there are several ways of getting the root element, which depend on what you want to do with the elements you get back here's a simple (incomplete) way.
    // gets the root element of the specified file (code not shown)
    Element rootElement= new SAXReader().read(file).getRootElement();Then just append the new elements as below (this is non-generic code and would need to be modified for your situation)
    // write a new student element
    Element student = document.createElement("Student");  // creates the new student
    rootElement.appendChild(student); // ***appends it to the root element***
    Element name = document.createElement("Name"); // creates the name element
    name.appendChild(document.createTextNode("Fred")); // adds the name text to the name element
    student.appendChild(name); // appends the name to the student
    Element age= document.createElement("Age"); // creates the age element
    age.appendChild(document.createTextNode("26")); // adds the age text to the age element
    student.appendChild(age); // appends the name to the studentThen flush ya buffers or whatever and write the file
    Edited by: Dream-Scourge on Apr 23, 2008 11:10 AM

  • Executing a DDL statement from java code

    Hi all,
    this is code from jdev11.1.1.3 version. I am trying to execute a DDL statement in oracle db from java code, but "ORA-00900: invalid SQL statement" error is coming.
    I am trying to create a table in same schema in same db by using 'Copy' command.
    Same DDL command is executing from sql command prompt & table is being created. Plz help me , as how to do from java?
            public String cmb_action() {
            // Add event code here...
            try {
                //getting source db connection
                InitialContext initialContext = new InitialContext();
                DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/SourceConnDS");
                Connection sourceconn = ds.getConnection();
                sourceconn.setAutoCommit(false);
                String sql = "Copy from myschema/mypass@DB insert t_dept using select * from dept;"                       
                Statement stat = sourceconn.createStatement();
                stat.executeUpdate(sql);
                sourceconn.commit();
                System.out.println("done");
              catch (Exception ne) {
                // TODO: Add catch code
                ne.printStackTrace();
            return null;
        }

    I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
    But,
    Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
    Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
    Etc, etc,
    Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
    Regards
    Peter
    P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

  • Clear the Filter Criteria from java code programmatically

    Hi All,
    I am using jdev version 11.1.1.6.0.
    I do have ADF table for which I have added filter to each column .
    I created table using java class data control.
    Filter is working Fine .
    My use case is-
    When I click on search button data is populated in table.
    When anybody enters filter value in column suppose product and hit enter ,it filters data.
    if he clears and do not hit enter key and search again then it does not show all data it only show filtered data.
    So how can I programmatically clear all filters so on click of  search it will show all the values not filtered values.
    I have not used default Filter Behavior.
    Please check below code for reference
      <af:table value="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSet}"
                                  var="row"
                                  rows="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSize}"
                                  emptyText="#{bindings.AfMyAccOrderStatusHistorySearchVO.viewable ? 'No data to display.' : 'Access Denied.'}"
                                  fetchSize="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSize}"
                                  rowBandingInterval="0" id="tblStatusHistoryList"
                                  autoHeightRows="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSize}"
                                  rowSelection="single"      
                                  width="100%"
                                  partialTriggers="::cb5 ::cb8 ::cb1 ::cb2"
                                  filterModel="#{bindings.AfMyAccOrderStatusHistorySearchVO1Query.queryDescriptor}"
                                  queryListener="#{bindings.AfMyAccOrderStatusHistorySearchVO1Query.processQuery}"
                                  filterVisible="true" varStatus="vs"
                                  binding="#{AfMyAccOrderStatusHistoryAction.orderStatusHistorySearchList}">
    <af:column headerText="#{alfaprojectBundle['ordstatushistory.column.invoiceDate']}"
                                      width="70"
                                      sortProperty="invoiceDate"
                                      sortable="true" filterable="true"
                                      id="c7" filterFeatures="caseInsensitive">
                              <af:outputText value="#{row.invoiceDate}" id="ot16"/>
                            </af:column>                     
                            <af:column headerText="#{alfaprojectBundle['ordstatushistory.column.soldto']}"
                                       width="100"   
                                       sortProperty="soldTo"
                                       sortable="true" filterable="true"
                                       id="c14" filterFeatures="caseInsensitive">
                              <af:outputText value="#{row.soldTo}"
                                             visible="#{row.visibilityIsOrdrFirstItem}"
                                             id="ot23"/>
                            </af:column>
    So how to clear all filter values from java code.

    I can't get the example "Programmatically Manipulating a Table's QBE Filter Fields"
    Where is it ?
    https://smuenchadf.samplecode.oracle.com/samples/ClearTableColumnFilterFields.zip
    Thks

  • Java code in OIM

    Hello All,
    I am trying to run the below java code via OIM.Its a simple code for testing and I will later modify it.
    After reading the threads on forum I created the BI outside the main class.
    After adding the jar..I when I am adding a adptr task and selecting this jar it gives me an "error server could not load class"
    Please letme know If I am missing any thing in the code?
    Also once a code is created are there some predefined steps to make that functional?
    The code is working fine for me when test in eclipse
    package oimtest;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class myFirst {
    public void testmethod() throws SQLException, ClassNotFoundException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/orcl", "oimusr", "*****");//orcl is sid,oimuser is the username
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("MY QUERY HERE'");
    while (rset.next())
    System.out.println(rset.getString(1));
    conn.close();
    }

    I am using my oim on 1.5 and compiling on the same version
    2010-04-08 23:33:28,000 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
    *2010-04-08 23:33:28,015 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error in method: public abstract boolean com.thortech.xl.ejb.interfaces.tcADP.introspectAPI(java.lang.String,java.lang.String,java.lang.String,boolean) throws java.rmi.RemoteException*java.lang.NoClassDefFoundError: dbcontest (wrong name: oimtest/myFirst)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
         at com.thortech.xl.dataobj.tcADPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
    Edited by: Shalini Bhasin on Apr 9, 2010 12:17 AM

  • Executing jar from java code, then kill parent java code

    Please suggest if there is any best way around on executing jar from java code then killing parent java code.
    a) I have desktop based java application say "Monitor.java" which runs every 5 minutes.
    b) How can I START external java application say "execute.jar" from Monitor.java THEN EXIT Monitor.java
    I tried various options using "ProcessBuilder" and calling bat file but I need Monitor (parent application to EXIT, immediately after calling child (execute.jar)
    Try1) ProcessBuilder builder = new ProcessBuilder("java -jar execute.jar");          
    Process process = builder.start();
    Try2) Runtime r = Runtime.getRuntime();
    Process p = null;
    p = r.exec(new String[] { "cmd", "/c", "start C:/temp/Test.bat" });

    I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
    But,
    Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
    Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
    Etc, etc,
    Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
    Regards
    Peter
    P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

  • Generation of xml file from java code

    hi,
    I want to manipulate data in a xml file with java code.I have read data from xml file and also changed it. But i am unable to covert it again in xml file from java code. Can you please tell me how i can do this?

    Let me know which parser are you using currently for reading xml files so that i assist you. For now, you can refer to STAX Parser API under this link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • Is it possible to update internal table from database table

    Hello All:
              I know how to update database table from internal table in one shot (batch) but is the reverse possible? Can I update some fields in an internal table from a database table in one shot (without looping) because my internal table is huge? Could you please provide me any ideas how to acheive something like this? Thanks in advance and answers will be rewarded.
    thanks.
    Mithun

    Hello my friend,
    You can do it MAYBE , i think you can reverse the update doing a ROLLBACK, but only after you update....not after the program finishes..
    To update some fields at once use:
    UPDATE DBTABLE FROM TABLE IT_TABLE
    Hope this helps!!
    Gabriel

  • Starting exetutable java file from java code

    Hi I was wondering how I can start a executable java file from java code?
    thanks

    Hi Mkaveli,
    Yes, it's possible. If you have a JAR executable, you've just to call the main method of its starter class. For a simple executable class, just call its main method.
    This way :
    SomeStarter.main(null); // if there's no argumentSmall precision : the executable JAR or class must be specified in the classpath of your application.

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • Problem when connecting locally to Oracle Database 10g from Java code

    Good afternoon,
    I try to connect to my local Oracle 10g from JAVA code. Could somebody tells me what are the 'values' to enter in place of 'value1, value2, value3' in the following:
    final String connectionURLThin = "jdbc:oracle:thin:@value1:value2:value3";
    I tried to put my 'user' and 'pw' credentials I used when connecting with SQL*PLUS:
    value1=my_user_name
    value2=my_pw
    value3=my_schema
    but it doest work. Besides where could have I to put the 'WORKSPACE" name?
    Thanks for any help.
    Claude
    Details:
    ERR MESSAGE----------------------
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/dms/instrument/ExecutionContextForJDBC
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:365)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:854)
    at java.sql.DriverManager.getConnection(DriverManager.java:620)
    at java.sql.DriverManager.getConnection(DriverManager.java:200)
    at javaapplication6.ConnectionExample.driverManager(ConnectionExample.java:138)
    at javaapplication6.Main.main(Main.java:36)
    Caused by: java.lang.ClassNotFoundException: oracle.dms.instrument.ExecutionContextForJDBC
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
    ... 8 more
    Java Result: 1
    BUILD SUCCESSFUL (total time: 0 seconds)
    ---------------------ERR MESSAGE
    JAVA code------------------it compiles but throw an error when running there -> (*)...
    final String driverClass = "oracle.jdbc.driver.OracleDriver";
    final String connectionURLThin = "jdbc:oracle:thin:@jeffreyh3:1521:CUSTDB";
    final String userID = "scott";
    final String userPassword = "tiger";
    final String queryString = "SELECT" +
    " user " +
    " , TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS') " +
    "FROM dual";
    public void driverManager() {
    Connection con = null;
    Statement stmt = null;
    ResultSet rset = null;
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection(connectionURLThin, userID, userPassword); // (*) prob here
    stmt = con.createStatement ();
    rset = stmt.executeQuery(queryString);
    rset.close();
    stmt.close();
    } catch (SQLException e) {e.printStackTrace();
    --------------------JAVA JDK 1.6
    My system ------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    Yes, the network connection could not be established. Like the error said.
    What you're asking about is the exact reason, but that could be any number of things and not at all related to code. You could have the wrong host, the wrong port. A firewall could be blocking the outgoing connection, a firewall could be blocking the incoming connection. Etc. etc.

Maybe you are looking for

  • TV@nywhere A/D NB : Bad DVB-t video/sound

    Hi all. just bought a TV@nywhere A/D NB  for use with an old notebook i own (acer aspire 1662wlmi/P4 @ 3Ghz/1GB ram/Ati mobility9700 64Mb ram). The radio and and the analog Tv works like a charm but the DVB-t video is very crapy.Is keeps losing a lot

  • How to make an attendance monitoring system

    Hello there, I've just made a system that allows records the time in and time out of the some people. But how do you track people that didn't even check in at all? How do you know if there's a person that was supposed to be present, but didn't come a

  • PDF Annotation Management in Oracle 9iFS

    Do you need to manage and search for PDF annotations in Oracle 9iFS? Would you like to store PDF files that are used for document reviews in Oracle 9iFS? Do you need to search for files based on information stored in annotations (e.g., sticky notes,

  • Microphone output sound delay

    Hello, I'm a musician. Often, I plug my headphones into my laptop and listen to music. Then I plug my guitar in the microphone jack and enable the microphone sound output so I can play along with the music on my laptop. In other words, I use the lapt

  • Creating delivery through Pick and Pack manager.

    Hi All, I have code written in the addmode and update mode of the add button of delivery window.There is a checking in the pVal.beforeAction=true part and if that checking is true there is code part which runs on pVal.BeforeAction=false.This works fi